Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Good old 16 bit DOS?
#31
I don't understand what's your point Spotted Cheetah, but it seems to me like that you've never fully understood what's the difference between RMODE and PMODE.

If you had ever done even simple asm stuff you would know that RMODE is real hell. 64K limit biggest obstacle. Once you get real machine concepts behind PMODE, you must admit that PMODE is better. Sure it's much harder to set up the CPU correctly, but with good DOS-extender this can be a snap. Settings segments etc. should be OS work. Programs run faster, asm programming gets lot simpler and if you are using DOS you can access the hardware same way having same supercontrol over it. 32-bit code is even same size as 16-bit one considering instruction encoding and 32-bit code segment bit setting Wink. You can have VESA modes at 120 Hz, you just must check the VESA docs and corresponding functions. You can even have super fast access to whole LINEAR VESA frame buffer unpossible in RMODE (sure VGA must support it, ATIs are worst hardware/firmware/software driver combo ever made Wink ). I personnaly have acheived way, with my blend of custom and modified very simple asm stuff, to access 4GB mem in QB through FLAT memory mode (not runnable in Win Wink ) and made 10% complete emulation layer through XMS of that system Smile. But now when FB is there, all that work became obsolete Sad.

Anyway PMODE is not modern, it is retro. Just remeber, it first appeared with 386, so it's quite old. When you are missing RMODE programming so much, go and get another old i486 or i386 and do it there (p220 is surely not retro). Today you can get them really for free. Under original DOS QB is quite stable. I have two such "vintage" machines to test my crazy experiments. Seeing then quite high performance of the mentioned FLAT system on my Sempron 2800 with 1 GB ram really makes me feel good Smile (compared to i486 one Smile ). And I'm not even moderately good programmer.

By the way I've done many really stupid & crazy errors in my asm+QB experiments (like forgetting to pop regs from stack etc.) which in DOS resulted in instant BEEPSnRESET but really I've never managed to crash WinXP, Ntvdm seems to me rock solid (almost Smile ). So I suggest that you check you install, there might be something wrong.

And I don't uderstand why you want to return to 16 bit, it's for i286 really and I doubt that there are any hobby hardware freaks which use that today, even when doing retro work. But I must admit that I have never programmed for SNES though.
Reply
#32
"Not know what PMODE is" - had you ever visited my web page? If you did you had probably
guessed that i went through this at least 2 years before... (Just got a little upset)
I coded a little in ASM too.


For me real mode DOS is the thing in what i grew up. Since the Soviet Union ruled here
it was not really possible to see any computer before real mode DOS's time. My first
one was a 3.86, and it's memory modules are still functioning in my 30MHz 4.86 which
sadly broke down now, but i had to do my programming on it a year ago (Possibly if
i replace it's BIOS chip to the one remained from the 3.86... It complains about
something in the CMOS memory...). Partially that's why i prefer it.

The other thing is that i know about most of the differences of the two system, and
it does not really hurt me to program in Basic in real mode while creating modern
apps with C(++), Simply there are so many differences that translating codes between
the two language in this case has not really got any value. But i do not want to mess
with two languages in the same system since that will gain me many headache due to
those damn translation works.

My P233 has absolutely no problem with real mode DOS. The sound card is not the best,
but everything else functions nicely in real mode if i need that.

I think plain protected mode like (almost) what you get in DOS is only suitable for
OS writers but nobody else due to that damn variety of hardware. It can happen that
you write a program, and after 5 years it will be impossible to run it because the
hardware changed. But real mode fits to everybody who would like to write retro: it
is something what was "standardised": You will find at least at about 500Kb of free
memory in 64Kb chunks, a fully VGA compatible monitor, keyboard, mouse, optionally
joystick, and an OPL2 chip at port 388H, or an OPL3 at 220H for music. Of course it
is more, but you can be sure that the most important things will be there especially
in newer DOS emulators. Of course this all might be there for protected mode too,
but that simply asks for more due to it's extended capabilities. But there is almost
nothing more what you can make sure that it will be there later too...

Finally on this subject real mode is not a mess as everybody thinks, it is just old:
it is not being protected so the programmer is free to do anything (Now everything is
so highly "protected" that you can not be sure what your compo does in 99% of it's
activity, and what it fills your memory with, and you can only hope that you will
understand 10% of it if you learn it for 10 long years... Personally i hate when my
compo wants to look more intelligent than me on it's own...). Of course the freedom
have some backyards: mostly that you have to take care of not writing over data
belonging to other things. This applies to pmode too, but there the system will kick
you on your back instead of messing up. I can not imagine why this behavior is that
much better for everybody here to throw away real mode, since most of your opinions
about it relates to this. The programmer have to do his/her work carefully. That's
it, no matter in wich system (s)he does.



At the other subject i hope that nothing bad will happen to FreeBasic. But as i said
i simply have no time to do code translations everywhere, so i will not start
programming in it as long as it is pmode only while keeping up in C(++) what is pmode
too.
fter 60 million years a civilization will search for a meteorite destroying most of the living creatures around this age...

There must be a better future for the Cheetahs!

http://rcs.fateback.com/
Reply
#33
Sorry now I have looked at your page some work in QB seems impressive. Me I'm not even that good in programming 3D things etc but I can tell you that what you are saying about PMODE simply isnt true:

Quote:I think plain protected mode like (almost) what you get in DOS is only suitable for
OS writers but nobody else due to that damn variety of hardware. It can happen that
you write a program, and after 5 years it will be impossible to run it because the
hardware changed.

PMODE is good for apllication writers too. One great advantage in PMODE is multiple setup possibilities. Benefit you get bysetting all your memory being accessible in one big data segment is enormous. Then you have no need to use segments when addressing so you can manipulate big chunks of data.

The hardware thing is same in RMODE, today (all the hardware already has almost disapeared) even Creative soundcards like Live! aren't supporting DOS SB front end and without tweaking you are not able to use 120GB HDD in DOS.


Quote:But real mode fits to everybody who would like to write retro: it
is something what was "standardised": You will find at least at about 500Kb of free
memory in 64Kb chunks, a fully VGA compatible monitor, keyboard, mouse, optionally
joystick, and an OPL2 chip at port 388H, or an OPL3 at 220H for music. Of course it
is more, but you can be sure that the most important things will be there especially
in newer DOS emulators.

All that things you mentioned are accessible in PMODE at same ports and addresses as in RMODE, or do you think they magically disappear when you switch to PMODE? Everything is there after switching to PMODE, there is not void. What PMODE programming really lacks is quite good BIOS support to do certain things. However you can always switch back to RMODE and call the BIOS routine. You can write in PMODE using "realmodish" thinking.

I think that the name of PROTECTED for this CPU operation mode was badly chossen by intel. Then DOS people think that they cannot program the old way. But they can. Protection in PMODE is not the neccesity, it is option. You can have perfectly unprotected memory as in normal DOS in PMODE (check for FreeDOS32). Segmentation is an option too, you can have even SEGMENTED PMODE if you like, as you can have PAGED PMODE if you want, but you are not forced to have them.

I have been doing some tests with FB on my vintage PC and it's runs nicely. I'am sure that with some direct inline asming (thank you victor) you can do the all that that nice tricks as in old QB, but better. If inline asm is not enough good for you you can link with some assembler. However not being able to access some resources from WinXP is not fault of PMODE at all, it's "fault" of XP's design.

Returning back to RMODE simply has no use. Even the worst sytem today has about 2 MB-4MB of memory which are not easy tu use from RMODE (mostly in RMODE programming its just ignored, nobody want's to mess with xms or ems) but can be used very simply from PMODE.

Having FB, which has ability to do PMODE programming and which was designed with 32 bits in mind, it is simply waste of time tring to port it to 16 bit. If you need smaller memory requrements or have another reason for 16 bits you can still use QB.

C++ and QB/FB can hardly be obviously similiar as QB/FB is procedural and C++ is object oriented. Most of the QB code out there is mess too, it's not an real code. If you mean this by unportable then I agree.
Reply
#34
Etko - are you reading ALL what i write before hitting Submit??

I did not thought that for example VGA will disappear. I only said that VGA is
not really enough with it's maximally 360*480, 256 color resolution for that
enormous capabilities what PMode offers.

I think you not understood well what i wanted to mention too: real mode and
the hardware "connected" to it is being nicely emulated with DOSBox for example.
I meant "standardized" because of this. Although DOSBox can emulate PMode too
it is not a really efficient thing. If somebody wants to do code for recent
computers, then he has to write and later matain his/her own OS, or build
software for an existing one (or ideally for more of the existing ones) instead
of messing with native PMode.

Of course retro might be written in PMode too, but that will not look so nice
like one getting out the most from real mode. If somebody switches to PMode and
get all of it's capabilities then (s)he thends to forget about taking care of
how much memory will be used up. Personally i really liked real mode because of
that limit: you had to plan your program really carefully if you wanted
something good.

I would like to keep using QB, but due to that i had to spend more with waiting
my computer to reboot than actually programming, i got enough of it. As i said
my next retro program, if i will have time for that, will be made in C. No more
QBasic mess.
fter 60 million years a civilization will search for a meteorite destroying most of the living creatures around this age...

There must be a better future for the Cheetahs!

http://rcs.fateback.com/
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)