VOGONS


First post, by Syntaxomat

User metadata
Rank Newbie
Rank
Newbie

I am on an Android tablet with the Magic Dosbox app installed and i want to know if it is true that DOSBOX emulate the 16 bit Big real mode only in Magic DOSBOX, or also in other DOSBOX versions for Windows/Linux too.

Because i can properly write into the linear framebuffer in hex c0000000 mashine s3-chip without using an EMS or XMS function. Both EMS and XMS are set to true in the config file of Magic DOSBOX. I remember in MS DOS i have to REM the emm386.exe-driver in the config.sys file for to swith into the 16 bit Big RM.

Reply 1 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author
Syntaxomat wrote on 2021-05-22, 09:53:

I am on an Android tablet with the Magic Dosbox app installed and i want to know if it is true that DOSBOX emulate the 16 bit Big real mode only in Magic DOSBOX, or also in other DOSBOX versions for Windows/Linux too.

Official DOSBox supports big real mode (aka unreal mode); but for unofficial builds, such as this Magic DOSBox app you refer to, you will have to ask where you get them.

Syntaxomat wrote on 2021-05-22, 09:53:

I remember in MS DOS i have to REM the emm386.exe-driver in the config.sys file for to swith into the 16 bit Big RM.

The EMS emulation of DOSBox is not like EMM386 in that it does not switch the emulated CPU into V86 mode, so it is more like a memory expansion board in that regard, and it does not get in the way of switching into other modes. However, if you want the software you are writing to be compatible outside of DOSBox then it's probably a good idea to check if the CPU is in V86 mode (VM bit is set in EFLAGS) before trying to switch.

Reply 2 of 4, by Syntaxomat

User metadata
Rank Newbie
Rank
Newbie

The question is do i have to enable the larger segment size for writing into the linear address of hex c0000000?
With Magic DOSBOX i only write to this location without to touch the segment size. Works the official version different?
Many thx.

Reply 3 of 4, by ripsaw8080

User metadata
Rank DOSBox Author
Rank
DOSBox Author

You will not be able to access the LFB in real mode; so you do have to switch to a different addressing mode, protected mode being most common. If this "Magic" DOSBox does not require switching the CPU mode in order to access the LFB then it seems like it would have very poor compatibility with software for DOS.

That said, it's not easy to know exactly what you're doing. You may be writing a 32-bit program where the development tools are handling protected mode for you, so from your perspective you don't have to do anything about switching the CPU mode.

Reply 4 of 4, by Syntaxomat

User metadata
Rank Newbie
Rank
Newbie

Ok. Now i understand. Many thanks.
I can use this batch file to enlarge the segment size of the data segment to 4 gb with a little help from Debug. After that i only have to use the data segment to copy a picture from the data segment of a 16 bit executable to the same data segment of the linear framebuffer in hex c0000000. That is easy to handle without using an instruction with a segment override prefix, but with using an address size prefix for the 32 bit address register.

@echo off
REM Switch into the 16 bit Unreal Mode/Big Real Mode
REM Usage: 4GB.bat
echo ecs:100>tmp.deb
echo FA E4 70 0C 80 E6 70 66 31 C0 8C C8 A3 67 01 66>>tmp.deb
echo C1 E0 04 66 89 C3 A3 B2 01 A3 BA 01 66 C1 C8 10>>tmp.deb
echo A2 B4 01 A2 BC 01 66 31 C0 B8 A8 01 66 01 C3 C7>>tmp.deb
echo 06 A0 01 27 00 66 89 1E A2 01 9C 0F 01 16 A0 01>>tmp.deb
echo 8C D2 0F 20 C0 0C 01 0F 22 C0 EA 50 01 08 00 00>>tmp.deb
echo B8 10 00 8E D0 B8 18 00 8E D8 0F 20 C0 66 83 E0>>tmp.deb
echo FE 0F 22 C0 EA 70 01 34 07 00 00 00 00 00 00 00>>tmp.deb
echo 8E D2 9D 31 C9 E4 64 24 02 E0 FA 75 1A B0 D1 E6>>tmp.deb
echo 64 31 C9 E4 64 24 02 E0 FA 75 EE B0 DF E6 60 31>>tmp.deb
echo C9 E4 64 24 02 E0 FA E4 70 24 7F E6 70 FB C3 00>>tmp.deb
echo 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00>>tmp.deb
echo FF FF 00 00 00 9A 00 00 FF FF 00 00 00 92 00 00>>tmp.deb
echo FF FF 00 00 00 92 FF FF>>tmp.deb
echo.>>tmp.deb
echo n 4GB.com>>tmp.deb
echo rcx>>tmp.deb
echo c7>>tmp.deb
echo wcs:100>>tmp.deb
echo q>>tmp.deb
debug<tmp.deb>nul
tmp.deb
4GB.com
del 4GB.com