Unreal Mode: Difference between revisions

Jump to navigation Jump to search
[unchecked revision][unchecked revision]
Content deleted Content added
No edit summary
m Reverted edits by Carver (talk) to last revision by Xenos1
Line 3: Line 3:
==Usage==
==Usage==
Unreal mode is usually recommended in the two following cases:
Unreal mode is usually recommended in the two following cases:
* You are trying to extend a legacy 16-bit DOS program so that it can deal with larger data and neither [[Virtual 8086 Mode]], nor xms are suitable for your needs.
* you're trying to extend a legacy 16-bit DOS program so that it can deal with larger data and neither [[Virtual 8086 Mode]], nor xms are suitable for your needs.
* You are trying to load something that will run in 32-bit mode which is larger than 640K (therefore you cannot load it in conventional memory) and you don't want to bother writing a protected mode disk driver yet, but you also want to avoid switching between real and protected mode to copy chunks from the conventional memory buffer into extended memory.
* you're trying to load something that will run in 32-bit mode which is larger than 640K (therefore you cannot load it in conventional memory) and you don't want to bother writing a protected mode disk driver yet, but you also want to avoid switching between real and protected mode to copy chunks from the conventional memory buffer into extended memory.


You still will not have full access to all physical RAM if you do not have the [[A20 Line]] enabled; all the "odd" 1 MiB blocks will be unavailable.
You still will not have full access to all physical RAM if you do not have the [[A20 Line]] enabled; all the "odd" 1 MiB blocks will be unavailable.
Line 114: Line 114:
</source>
</source>


{{Warning|This may not work on some emulators or some hardware.}}
WARNING: this may not work on some emulators or some hardware.


==Compiler Support==
==Compiler Support==
Line 125: Line 125:


You can try out unreal mode in DOS (e.g. in DOSBox, VirtualBox + FreeDOS) as the compiler fully supports the DOS + unreal mode combo in its C library. ''tests/vesalfb.c'' is a simple example of setting up a [[VESA]] graphics mode with the linear frame buffer enabled and drawing something on the screen in unreal mode.
You can try out unreal mode in DOS (e.g. in DOSBox, VirtualBox + FreeDOS) as the compiler fully supports the DOS + unreal mode combo in its C library. ''tests/vesalfb.c'' is a simple example of setting up a [[VESA]] graphics mode with the linear frame buffer enabled and drawing something on the screen in unreal mode.

== See Also ==
=== External Links ===
* [https://osdev.d0.cx/x86/UnrealMode Dorper OSDev Wiki on Unreal Mode]

[[Category:X86 CPU]]
[[Category:X86 CPU]]
[[Category:FAQ]]
[[Category:FAQ]]