carlsson wrote:MADrigal has collected some newsletters and books which contain small tidbits of the apparent creatiVision memory map. However I found it quite incomplete when I looked at it before. Does anyone have a complete map, or perhaps we could collaborate to put together one? It may be useful both for Basic programs and those of us interested in machine code, supposedly only runnable as a cartridge image.
Well, I'm not sure if I have a "complete" memory map. I know for sure that several areas get mirrored in memory. Here is the part of the memory map I remember (which I have used in my demos):
$0000-$03FF... 1K of RAM
$1002... Sound_Write
$1003... Sound_Status
$2000... VDP_Data_Read
$2001... VDP_Status_Read
$3000... VDP_Data_Write
$3001... VDP_Status_Write
Then there's the part from *somewhere* up to $BFFF, which is the cartridge ROM. "Somewhere" depends on the type (size and memory layout) of the cartridge... I think Luca knows more about this. However, all cartridges end at $BFFF.
Some important locations inside a cartridge are:
$BFFE... vector pointing at interrupt handler 1 of the cartridge
$BFEA... vector pointing at interrupt handler 2 of the cartridge
$BFFC... vector pointing at starting address of the cartridge (before title screen gets displayed / circumvents title screen)
$BFF0... table of 8 bytes to initialize the VDP registers on startup
Finally... $F800-$FFFF contain the 2K BIOS ROM. Luca has a documentation of that. The most important thing about the BIOS is the addresses accessed in the cartridge as given above.
I'd recommend you to download the source code of my "Christmas Demo" from this site, which is heavily documented and also goes into some detail about the Creativision's inner workings.
carlsson wrote:While I'm onto the subject, I expected to find heaps of clear documentation on the TMS 99X9 series video chips. Maybe I looked in the wrong places, but I barely found anything. The least I'd like to see is a register map, but even better a few simple usage examples. For example can the video matrix be read or only written to? I realize both the video and sound chips are addressed through I/O ports on the cV, which is a pain in the *** to me compared to those computers and consoles which have memory-mapped chips. In particular as the creatiVision contains so little RAM and ROM there would've been plenty of space for memory-mapped I/O.
Well, I have a datasheet of the VDP, which you can find here:
http://www.bitsavers.org/pdf/ti/_dataBooks/TMS9918.pdf
I don't know if you'd call that "clear", however. But I also know a good documentation on the web, here:
http://bifi.msxnet.org/msxnet/tech/tms9918a.txt
For the sound chip, you can find the datasheet here, as a zipped series of TIF images:
http://www.atarihq.com/danb/files/SN76489.zip
As for the memory map, well... the video chip, in this case, has its own 16K RAM, which is seperated from the main system's memory map and can be written to and read from through the VDP itself. The advantage of this is that the VDP doesn't hold up the CPU when it needs to access screen memory. The downside, however, is that VDP accesses are somewhat slower than if the memory area could be accessed directly, like it's done on the C-64 and the Atari 8-bits.
But I think it's somewhat of a moot point discussing about how the Creativision could have been produced differently. It has been designed the way it has been, and it's been 25 years now. Today's systems, of course, are designed much differently...
but I think every system using that TI video chip was designed that way. The CPU never has direct access to the VDP's video RAM. But it definitely can be written AND read, since it's also often used as storage, for instance, Creativision BASIC (and also TI Basic on the TI-99, which has the same video chip) stores your BASIC program in VDP RAM, since there's only 1K of direct CPU RAM. The unexpanded TI-99, by the way, has even less than that, only 256 bytes.