| |
cbmeeks
Registered: Oct 2005 Posts: 78 |
Simple (lol) coding questions please!
Been out of the 6502/10 loop for a while and thought I would jump back in and see what I can do. I have a few questions that I can't seem to get answers on. Any help is greatly appreciated.
1) Where can I find a good tutorial/example that shows how to do a simple screen scroll? I realize "simple" is a relative term but what I mean by a simple scroll is that I don't need 8-way (like Turrican) and I don't need to color-shift. My needs are simple. Think Metroid. :-) Metroid is a very basic scroller. Now, I know I need to double-buffer and since I will probably need to scroll in 2 pixel increments, I will need to copy 1000/4 chars per frame. I can cheat a little and save a few lines with a score bar. In theory, I know HOW I should do it but I guess I need that jump-start.
2) Can I wipe out BASIC and use that space (A000-BFFF) to store data? I'm at work now so I can't test. I could store a lot of map data in that 8k.
Thanks!!!!
cbmeeks
METROID
http://www.metroidclassic.com |
|
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
just go ahead, you know how to do it already like you said yourself :) (no i dont think there is an example around).
as for switching out basic, yes you can.... write $36 to $01 for banking out the basic rom, or $35 to bank out both basic and kernal. |
| |
cbmeeks
Registered: Oct 2005 Posts: 78 |
Quote: just go ahead, you know how to do it already like you said yourself :) (no i dont think there is an example around).
as for switching out basic, yes you can.... write $36 to $01 for banking out the basic rom, or $35 to bank out both basic and kernal.
BASIC and Kernal? I thought the Kernal code would need to be un-touched for basic IO stuff?
if not, does that mean I get a whopping 16k to store my data? Man, that would be sweet!
Thanks
METROID
http://www.metroidclassic.com |
| |
chatGPZ
Registered: Dec 2001 Posts: 11386 |
Quote:
I thought the Kernal code would need to be un-touched for basic IO stuff?
ofcourse if you want to use eg kernal disk i/o then you can't bank it out at the same time :) |
| |
cbmeeks
Registered: Oct 2005 Posts: 78 |
That makes sense. I don't know what I was thinking.
I was just crunching numbers and realized that I could fit almost the entire map/level data of the entire world (close to 900 rooms) into that 16k. :-)
I guess I will just have to split it and do some loading. But no big deal.
METROID
http://www.metroidclassic.com |
| |
cadaver
Registered: Feb 2002 Posts: 1160 |
Bank out the Kernal except when you need to load/save. Loading under the Kernal (or the IO area $d000-$dfff) is a bit trickier, since you have to bankswitch, read a byte, bankswitch again, then store that byte, but it's manageable. |
| |
cbmeeks
Registered: Oct 2005 Posts: 78 |
Quote: Bank out the Kernal except when you need to load/save. Loading under the Kernal (or the IO area $d000-$dfff) is a bit trickier, since you have to bankswitch, read a byte, bankswitch again, then store that byte, but it's manageable.
Oh, so you are saying that in order for me to load data into the area that contains the actual code to load data, I have to constantly turn the kernal on/off while doing it?
METROID
http://www.metroidclassic.com |
| |
Mantiz Account closed
Registered: Apr 2006 Posts: 36 |
Yes, bankswitching is required because otherwise the loaded data will go into the registers mapped at those memory locations. |
| |
cbmeeks
Registered: Oct 2005 Posts: 78 |
Cool. Thanks guys.
BTW, *IF* I actually manage to pull off this simple 2-way scroller, I will post a how-to for it.
I mean, you can get some advance code for Turrican but who the hell understands it! lol
METROID
http://www.metroidclassic.com |
| |
Burglar
Registered: Dec 2004 Posts: 1101 |
dunno if you already found it, but http://codebase64.org/ is a pretty good resource for sample code. |
| |
TNT Account closed
Registered: Oct 2004 Posts: 189 |
Quote: Bank out the Kernal except when you need to load/save. Loading under the Kernal (or the IO area $d000-$dfff) is a bit trickier, since you have to bankswitch, read a byte, bankswitch again, then store that byte, but it's manageable.
No need to switch memory when loading to $e000-$ffff. Saving, on the other hand... |
... 3 posts hidden. Click here to view all posts.... |
Previous - 1 | 2 - Next |