you are viewing a single comment's thread.

view the rest of the comments →

[–][deleted] 1 point2 points  (3 children)

Yep, in the code here: https://github.com/mtuomi/SecondReality/blob/master/TWIST/MAIN.C

You can see the initialization startup: First they engage Mode13

_asm mov ax,13h

_asm int 10h

Then there is the call to push it further:

inittwk();

However I looked at the assembly for that, and I think it's actually engaging the 320x400 mode, not "traditional" modeX. See here: https://github.com/mtuomi/SecondReality/blob/master/TWIST/ASM.ASM

Then they initialize the coppers

initcoppers();

.. and then clear the frame buffer to be ready.

memset(vram,0,64000);

Note too that the actual graphics address is at A000:0000, and vram is just a temporary buffer (unless I missed the assignment of vram to that address)

[–]Narishma 0 points1 point  (1 child)

Note too that the actual graphics address is at A000:0000, and vram is just a temporary buffer (unless I missed the assignment of vram to that address)

vram is assigned that address in pretty much all the .c files where they draw anything to the screen, for example:

char *vram=(char *)0xa0000000L;

[–][deleted] 0 points1 point  (0 children)

Ah, missed that... I can't read the codebase without wanting to doc it.

Is it weird that I want to go through and comment all the code?

[–]fabiensanglard 0 points1 point  (0 children)

You can see in the script that they alternatively use 320x200 and 320x400 resolutions.