TOS VDI easter egg

GFA, ASM, STOS, ...

Moderators: simonsunnyboy, Mug UK, Zorro 2, Moderator Team

TOS VDI easter egg

Postby shoggoth » Thu Dec 03, 2009 6:32 pm

Hi,

I found something interesting in the Falcon VDI. Apparently, the VDI has built-in support for 8-bit chunky screens and 32-bit truecolour. Naturally this does not apply to the hardware, but I've tested the former mode (640x480x8bpp chunky) with some degree of success on a 320x480x16bpp screen.

I realize that this is fairly useless w.o. hardware support, but it might come in handy for the upcoming SuperVidel.

To invoke these "new" VDI modes, all you need to do is to set up the Line-A variables properly (which is a royal pain in the lowe back), set the video hardware to a suitable resolution, and open a physical workstation towards devices 10 and 12 respectively (there are other "bonus" device numberes as well, but they don't add anything which wasn't already available through the falcon device(5).

The 32-bit mode needs to be enabled using a simple modification to the TOS binary, since it is hardwired to use a fixed framebuffer address (it's labelled as "MATRIX" in the device table, suggesting it was used with Matrix graphics cards - which has a fixed framebuffer address). By replacing this address w. NULL, the driver operates at the logical screen address instead.

Again, since there is no native 32-bit mode on the VIDEL, I emulate it by using a 1024x400x16bpp framebuffer (using a virtual screen). So far it looks like crap since colour tables etc. are not initialized properly, but drawing primitives and text output works as expected.

Note that I don't think this will work with NVDI w.o. hacking some driver files.

-- PeP
Ain't no space like PeP-space.
User avatar
shoggoth
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
 
Posts: 130
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden

Re: TOS VDI easter egg

Postby thothy » Thu Dec 03, 2009 11:09 pm

That sounds interesting... you could also try to hack one of emulators Hatari or Aranym to show such a mode...
User avatar
thothy
Hatari Developer
Hatari Developer
 
Posts: 381
Joined: Fri Jul 25, 2003 9:36 am
Location: Germany

Re: TOS VDI easter egg

Postby Cyprian_K » Sun Dec 06, 2009 8:20 pm

interesting,
PeP, can you post any sources?
User avatar
Cyprian_K
Captain Atari
Captain Atari
 
Posts: 254
Joined: Fri Oct 04, 2002 11:23 am
Location: Warsaw, Poland

Re: TOS VDI easter egg

Postby shoggoth » Mon Dec 07, 2009 2:07 pm

Cyprian_K wrote:interesting,
PeP, can you post any sources?


Not really, but check the "leaked" VDI sources at LP:s GFA webpage. In particular, check the file "devices.h" in the VDI sources.

The procedure to gain access to this stuff is a bit messy:
1. Patch VDI opcode 1, so that you can execute a piece of code prior and after the actual VDI function.
2. In that code, set up a suitable screen resolution and patch all relevant Line A variables.
3. Change the VDI device number to one of the undocumented devices
4. Execute the VDI function.
5. Before returning to the calling application, patch some stuff in Workout[].

In case of the 32-bit mode, you also need to patch the device structure for the device called "MATRIX" (again, check the leaked sources).

-- PeP
Ain't no space like PeP-space.
User avatar
shoggoth
Obsessive compulsive Atari behavior
Obsessive compulsive Atari behavior
 
Posts: 130
Joined: Tue Aug 01, 2006 9:21 am
Location: Halmstad, Sweden


Return to Coding

Who is online

Users browsing this forum: CommonCrawl [Bot], Yandex [Bot] and 0 guests