Log inRegister an accountBrowse CSDbHelp & documentationFacts & StatisticsThe forumsAvailable RSS-feeds on CSDbSupport CSDb Commodore 64 Scene Database
You are not logged in - nap
CSDb User Forums


Forums > C64 Coding > Simple (lol) coding questions please!
2007-09-24 14:43
cbmeeks

Registered: Oct 2005
Posts: 72
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
 
... 3 posts hidden. Click here to view all posts....
 
2007-09-24 15:25
cbmeeks

Registered: Oct 2005
Posts: 72
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
2007-09-24 15:25
cadaver

Registered: Feb 2002
Posts: 1153
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.
2007-09-24 15:28
cbmeeks

Registered: Oct 2005
Posts: 72
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
2007-09-24 15:32
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.
2007-09-24 16:30
cbmeeks

Registered: Oct 2005
Posts: 72
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
2007-09-24 16:35
Burglar

Registered: Dec 2004
Posts: 1031
dunno if you already found it, but http://codebase64.org/ is a pretty good resource for sample code.
2007-09-24 16:58
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...
2007-09-24 17:10
cbmeeks

Registered: Oct 2005
Posts: 72
Quote: No need to switch memory when loading to $e000-$ffff. Saving, on the other hand...

@Burglar:

Yeah, I found that one. Great site! If I finish the howto I will post it there.

@TNT:
I would only need to say game states. Unless I want to figure out a password system like the original Metroid. But thanks for the tip!


METROID
http://www.metroidclassic.com
2007-09-24 17:13
chancer

Registered: Apr 2003
Posts: 342
also look at puterman's tutorial , which is good.. again on the site burg has mentioned.

and

http://oldschool-gaming.com/c64_hex_files.php
2007-09-24 18:32
cadaver

Registered: Feb 2002
Posts: 1153
TNT: Heh, I guess was thinking ahead to loading compressed data with LZ77 or similar method (which needs the earlier loaded bytes), since I rarely load anything uncompressed :)
Previous - 1 | 2 - Next
RefreshSubscribe to this thread:

You need to be logged in to post in the forum.

Search the forum:
Search   for   in  
All times are CET.
Search CSDb
Advanced
Users Online
Mike
TBH
St0rmfr0nt/Quantum
Apollyon/ALD
JEZ
Guests online: 117
Top Demos
1 Next Level  (9.8)
2 Mojo  (9.7)
3 Coma Light 13  (9.7)
4 Edge of Disgrace  (9.6)
5 Comaland 100%  (9.6)
6 No Bounds  (9.6)
7 Uncensored  (9.6)
8 Wonderland XIV  (9.6)
9 Memento Mori  (9.6)
10 Bromance  (9.5)
Top onefile Demos
1 It's More Fun to Com..  (9.7)
2 Party Elk 2  (9.7)
3 Cubic Dream  (9.6)
4 Copper Booze  (9.5)
5 TRSAC, Gabber & Pebe..  (9.5)
6 Rainbow Connection  (9.5)
7 Wafer Demo  (9.5)
8 Dawnfall V1.1  (9.5)
9 Quadrants  (9.5)
10 Daah, Those Acid Pil..  (9.5)
Top Groups
1 Oxyron  (9.3)
2 Nostalgia  (9.3)
3 Booze Design  (9.3)
4 Censor Design  (9.3)
5 Crest  (9.3)
Top Organizers
1 Burglar  (9.9)
2 Sixx  (9.8)
3 hedning  (9.7)
4 Irata  (9.7)
5 MWS  (9.6)

Home - Disclaimer
Copyright © No Name 2001-2024
Page generated in: 0.048 sec.