4 ms·
Bingo! I did the same on an Atari. Also, a lookup table for the Y address, plus a fixed X address can get bitmaps blitted to the screen quickly. For special
by ddingus 4y ago
Bingo! I did the same on an Atari.
Also, a lookup table for the Y address, plus a fixed X address can get bitmaps blitted to the screen quickly.
For special case graphics, just code in the addresses, unroll the loop and use index X or Y to handle screen positioning.
LDX XPOS
LDA IMAGE0
STA SCREEN0, X
LDA IMAGE1
STA SCREEN1, X
LDA IMAGE2
STA SCREEN2, X
.
.
.
No multiply needed. Y addresses either coded at fixed position, or generated at runtime based on some event and or when there is time to compute it all off screen.
Trade RAM for speed!
- commandlinefan 4y agoSigh... I remember doing a lot of this stuff as a teenager, looking forward to the day when I'd be getting paid to do it. But by the time I got paid to do stuff, there was no market for this kind of low-level optimization any more. Shame.
- ddingus 4y agoI hear ya! Today, I mostly do it for fun on my old Apple machine. It is enjoyable to see what can be done. 1Mhz is actually quite a lot when one looks at the resolution and overall task to complete. And where to put it? Things like having the game run at 30Hz or 15Hz so more can be computed in game, in real time. Then, when it comes to drawing everything, often a simple screen clear, or page flip then draw does not make sense. Two screens takes too much RAM, etc... Single buffer, draw fast, only draw deltas, using XOR, all add up! Getting paid? I have done some assembly for money on Propeller chips, PIC, AVR, and the like. There are times in embedded land where doing these fun things pays off and makes sense. For what it is worth, a little fun can be had for income, but not much.