We are close to getting the units working as almost 'proper' C64s, with keyboard, FDD and joystick ports.
Unfortunately, we have both struggled to find the time to get to the bottom of the issues.
However, in the mean time, I have taken to trying out some experimenting in 6502 assembly with the VICE DTV emulator, ready to try on the real thing when we get it sorted.
And oh how easy things are with a fully set up system of Relaunch64, KickAss and VICE. I was anticipating something from the 'bad old days' of C64 assembly coding, but the run>debug>compile time is absolutely minimised. Even more so if you select the 'inject to RAM' option, as you dont then even have to warp speed load your program, it just gets laid into RAM, so instant running.
Moving on...
For quite a few years now, I have had the C64DTV as a target system (even as possibly a subset of the full game engine) for the game Ive been working on.
With that in mind, Ive been exploring all the new possibilities that Jeri Ellsworth has added to this great little system.
For those unfamiliar with the C64DTV, it is a fairly complete ASIC implementation of the C64, but with some added (as well as lacking) features:
Added stuff: (DTV v2+)
* 2Mb ROM
* 2Mb RAM
* Blitter (has some cool source and/or destination scaling options)
* DMA
* 256 colour 'chunky' mode
* Overscan mode (broken, but can be compensated for)
* Up to 15 of each A, X and Y registers(!)
* Skip internal cycle/burst mode for >64Kb SDRAM speed boosts (this allows in theory for up to a peak 4 MIPS operational speed of the processor)
* 8 Bit sample playback (on top of SID playback)
* extra ADSR envelope types
Some other bits are included, like less bandwidth intensive graphics modes (Fred1/2), etc.
Bad points:
* The SID filters are not present (probably the biggest negative point)
* From what Ive attempted so far (and from details back in the day) DMA/BLT units are a bit buggy. (Alpha and modulo problems; some fixed in DTV v3)
* Overscan mode is broken but can be used with work arounds (in a similar way to how the ST border needs switching at specific points for overscan).
Right then, enough of the details, lets start some action!
So to start with (bear in mind, Im *only* using the enhanced features of the DTV), lets set up the screen for chunky 256 colour mode and DMA transfer a image to the screen: (grey border colour is the actual raster time taken to transfer data to screen via the DMA system)
So far, so good...
Now lets try moving the block (in which case, we need to erase the previous contents; easy because the background is black):
image transfer = middle bar, Erase transfer = bottom to top bar; both from C64 RAM (<64Kb)
Here we see that we are nearing the limit of the DMA time for a single frame.
Depending on the if the blocks are moving, and if so, how fast they move, I will guess that we can move just over 2 64x64 blocks (size of the one in above picture) moving at 1px/frame.
The reason that the whole of the frame is almost spent in the above picture and there is only one block present, is because of my utterly inefficient erase block routine, which is actually blanking out the *whole* previous 64x64 block; something that doesnt have to be done unless the block is moving over 64px away from its current position in the next frame (which you will generally not be doing).
In any case, lets now have a look at what the blitter can do, but before we do, let me just post this 'politically correct version for this forum' DMA transfer pic:
Ok, same tests, but now with the DTV blitter:
First up, Blitter (from C64 RAM ($c001)) :
Much faster eh?
Blitter + erase (from C64 RAM):
Blitter (from DTV RAM ($6c001)): (sorry, didnt move the picture into >64Kb DTV RAM for this; oops!)
Blitter + erase (from DTV RAM):
DMA + BLT both from C64 RAM ($c001): (Raster time bar changed colour to dark red BTW)
DMA + (BLT+erase) from C64 RAM:
DMA + BLT (BLT from DTV RAM $6c001):
DMA + (BLT+erase) (BLT from DTV RAM):
DMA + BLT (Both from DTV RAM):
DMA + (BLT+erase) (Both from DTV RAM):
As can be deduced from the above images, both using the blitter *and* using the (>64Kb) DTV RAM are the faster options (as well as optimising the erase block routines lol).
I estimate around 5 64x64px blocks can be transferred per frame (just over double the DMA transfer rate).
Therefore, the wisest choice in the next step is to use BLT with images from higher DTV RAM to display a series of blocks across the screen, as would be done in a game.
Im sure the DMA will also come in handy and can be used to transfer audio data, or even perhaps 'feed' the blitter registers. Only time will tell.
I will take a breather for now though.

