Hi everyone!
I have a question. I want to design the screen for a video game.
Starting from the decimal address 7680 (initial part of the screen), and having 22 columns x 23 rows, I would have a total of 506 bytes to write.
Now if for example I used:
LDX [screenData]
STA $1E00,X
and I made a cycle, the value of X could not be higher than the fateful 255,
so how can I write the piece of data that I'm missing?
Is there a way to have just one cycle or do I have to break it in two?
Thanks
Davide
Screen Management
Moderator: Moderators
Re: Screen Management
If the value is constant then just write to both pages in a single iteration of the loopmysecretgarden wrote: ↑Sun Mar 03, 2024 6:06 am Starting from the decimal address 7680 (initial part of the screen), and having 22 columns x 23 rows, I would have a total of 506 bytes to write.
Now if for example I used:
LDX [screenData]
STA $1E00,X
and I made a cycle, the value of X could not be higher than the fateful 255,
so how can I write the piece of data that I'm missing?
Is there a way to have just one cycle or do I have to break it in two?
Code: Select all
LDX [screenData]
STA $1E00,X
STA $1F00,X
- Mike
- Herr VC
- Posts: 4853
- Joined: Wed Dec 01, 2004 1:57 pm
- Location: Munich, Germany
- Occupation: electrical engineer
Re: Screen Management
... yet people have managed to work with the 65xx being an 8-bit CPU all the time.mysecretgarden wrote:[...] the value of X could not be higher than the fateful 255, [...]
Please check out my VICMON primer thread for standard idioms to address into the screen.
If it's just the matter of initialising the screen contents from yet another buffer, use a two-fold unrolled loop for that (or four times unrolled if you include colour RAM).
-
- Vic 20 Amateur
- Posts: 41
- Joined: Sat Mar 02, 2024 8:57 pm
- Location: Canada
Re: Screen Management
Reading this is making my head hurt and spin at the same time.