Technical stuff about the game.

I converted this game from the Plus4 for a few reasons.
- give me a start in doing "emulation" type stuff of other systems features on the Atari.
- VBXE needs new releases, the situation has been a bit dry.
- it's not a bad game.

Luckily with this one, the Source Code was available from plus4.com so I grabbed it (and got the author's blessing to do the conversion).  Thanks again to Csabo.

The program itself is fairly simple, not too much tricky stuff like OS calls and such.  About the only system call was to "Get_ROM_byte" which is used on the Plus4 as a generic fetch routine which is RAM-based so it can switch out the ROMs and grab stuff from the RAM under them.

The biggest hurdles were the different mapping for the bitmap graphics, and the different way the Attribute data is stored on Plus4 vs VBXE.

The bitmap graphics are stored in the same way as C64, ie in 160 mode, position (x,y) 0,0 is byte 0, position 0,1 is byte 1.  0,7 is byte 7, then position 8,0 is byte 8.
The initial strategy was going to be to just use characters "emulating" a bitmap screen similar to G2F format but that version of the program just degraded into a bugfest and I scrapped it and started again.

So, the strategy used is that the Plus4 bitmap is kept in VRAM as well as an Atari one.  Each VBlank, 8 blits are used to copy the bitmap data across.

Similarly the same is done with the attributes.  Annoyingly the Plus4 in bitmap mode packs the Colour values for 2 types of pixels into one 1000 byte section of attribute RAM, and the Luma values for the 2 pixel types into another 1000 byte section.
To cater for this, I just changed the program itself.  So, the "emulated" Plus4 attributes get blitted to the VBXE attribute cells for PF0 and PF1 each VBlank.

Re the blits - almost all are triggered by the VBlank Immediate routine.  There is an optional blit before the rest that can copy some of the PF2 cells over, that's only required when the ball has to change colour.
The remaining blits, used to change the popup windows from multicolour to hires mode, are triggered within the main program loop.  As such, it has to "wait" for any executing blits to finish before doing so.

Aside from those, there's also some "one-off" blits, they're just used for initialising the screen at startup, e.g. multicolour mode at the left/middle and hires override for the status area on the right.

XDL - the nice thing about XDLs is the way you can just enable/disable overlays as needed, and still only need the one XDL in certain circumstances.
As such, the game just uses the two XDLs.  First one shows the moving logo while loading.
The game XDL contains the Overlay bitmap in narrow mode for the "Quadrillion" logo, as well as the Atrribute map which covers the entire "Atari" part of the screen.  Embedded within that is the text lines, which are only enabled when the instructions are displayed.