Character set questions.

Basic and Machine Language

Moderator: Moderators

Post Reply
adric22
Vic 20 Hobbyist
Posts: 143
Joined: Fri Mar 11, 2005 6:54 pm

Character set questions.

Post by adric22 »

Okay, so I am now getting to the point I want to redefine my character set. But the programmer's reference guide tells me that I cannot put the character set into expansion RAM. This poses some difficulty being that my ML program is actually loaded into RAM where the character set needs to go. I want my program to be able to be loaded like a regular BASIC program with the SYS command so that it is a simple load/run operation. I also didn't want to include the entire character set in the game's program. I had planned to have it copy the originals from ROM and then just add a few custom characters. At the moment the only way I can see I might make this work is to include the entire character set inside my program (making it 2K larger) and hope I can get the assembler to put the character set exactly where I need it.

Any suggestions on this?
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Yes. I would suggest you locate your character set at 5120 = $1400.

$1000 = screen matrix
$1201 = start of Basic, small bit of ML
$1400 = character set
$1600 = ML program continues

Either you include a ROM dump in your program at $1400 or write a routine to copy from ROM. Since you need a few custom characters anyway, the former suggestion is better.

POKE 36869,205 to enable the custom character set.
Anders Carlsson

Image Image Image Image Image
adric22
Vic 20 Hobbyist
Posts: 143
Joined: Fri Mar 11, 2005 6:54 pm

Post by adric22 »

carlsson wrote: $1000 = screen matrix
$1201 = start of Basic, small bit of ML
$1400 = character set
$1600 = ML program continues
I guess this is the plan I'm going to have to follow.. But I'm having some difficulty figuring out exactly where $1400 would be in my source-code. Obviously, I would put a JMP command right before the 2K of data for the characters, but I'm still having trouble figuring out where to put it.
adric22
Vic 20 Hobbyist
Posts: 143
Joined: Fri Mar 11, 2005 6:54 pm

Post by adric22 »

Nevermind.. I figured it out.. It was just trial and error basically.. Here's a screenshot. The new characters are really bringing the game to life. Also I was able to use a multi-color character for the water. I was surprised how easy that was.
Image
carlsson
Class of '6502
Posts: 5516
Joined: Wed Mar 10, 2004 1:41 am

Post by carlsson »

Usually you can put an ORG directive into the source code, and the assembler will pad out the program until that address. If the segment prior to the ORG overlaps the new address, you should get a warning.
Anders Carlsson

Image Image Image Image Image
Post Reply