Yup. Though I was thinking not only stuff like sprites, but large amounts of dynamic tiles too (with 512k).
Okay, let me get this straight, at least in my head.
You run the graphics through a compressor, and add that file to the cd (not necessarily as a seperate track). Then you load 1 page (8K) of graphics (compressed) from cd, and de-compress them. As you decompress (to other page(s) ), you add ST1/ST2 opcoded, and an rts for each gfx you want to load. Then you can map the page in and run the routine whenever you need the gfx loaded.
That, sir, is a masterful idea.
I did some avi to pce converter, but not avi directly. I outputted to a sequence of BMP files, and had my utility read them in sequence order. I was impatient not wanting to mess around with an avi lib. I only did 16 color frames. If you manage to do more than 16 color frames, you should share it
I had some code from another project that did most of the avi container handling. So the program ended up allocating 2 huge buffers for the avi video data. Then it read in a frame of data, and converted it to pce format, building the palettes as it it went. (It packed as many colors in a palette as it could, checking for colors already there, etc, etc... Once it had a frame of pce data, it compared it to the last frame in 8x8 tiles on a row by row basis, keeping a bitmap of which tiles needed updated. That was optimization 1 - only loading what was needed to the vdce. Using the same bitmap, it would fix any palettes (both the BAT entry and the color table) - but ususally that got skipped (video doesn't change palettes much except on cuts/fades. So it would sort of handle 256 color images, though it bombed out if a tile had more than 16 colors
The big problem was converting the audio, since that's ineterleaved with the video - in various sized chunks Didn't know about the clipping problem for adpcm then, so the sound was kind of scratchy.
Yeah, someday I'll add a better color converter (ie, nearest neighbor color changes for tiles with more than 16 colors) and re-write the audio converter.
I'd have to find a place to host it, beforeI released anything. And the code is, (being polite here) a big mess
Duplicating NEC / Hudson's firmware is a big legal grey area.
What if I just keep the general format of the functions, and replace parts with code from somewhere else? I'd eventually like to replace the cd routines with something faster; I'd also like to extend the bios with a few extra 'libraries' of code (kind of like how the psg player and math routines have their own pages)