|
Switching over to a more appropriate forum... :-)
I don't have a lot of time right now (reorganizing the house) but I still managed to type a quick BCD function. It seems to work to some extent, but my right-most digits are not displaying. My debug traces, however, reveal that I am storing the right values, so it's more of a memory read thing... will post back later when I have time to debug it properly.
And thanks for sharing the idea of the 1-bit pixels. It actually made me realize that I could, in theory, implement it in Flash for speed. See, Flash uses some kind of sprite called "Movieclips" (MC) for everything. Right now, I'm using 1 MC per pixel, but with your method, I could use 1/8 of the total MCs if I can come up with one MC that has 256 frames in it, with all the possible combinations. This could make schip8 emulation possible!
Now I just need a way to generate this MC (no way I'm drawing it by hand, and runtime drawing [as a precalc] would probably be too taxing).
Other than that, just a minor thing - I'm avoiding nested for() loops in Flash because there's a huge performance hit. In C you probably don't need to worry about it, however here's how I wrote my loop for Schip8 scrolling:
(pseudocode from memory, not the actual thing) x=0; y=0; for(offset=0; offset (smaller than) 128x64; offset++) { x++; if(x>64) { x=0; y++; } //process (x,y) }
Believe it or not this runs SO much faster than: for(y=0;y (smaller than) 32;y++) { for(x=0;x (smaller than) 64; x++) { //process (x,y) } }
It may be a Flash-specific glitch though.
 [download a life]
|