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 > KickAssembler: Why doesn't this work?
2007-09-27 02:38
cbmeeks

Registered: Oct 2005
Posts: 72
KickAssembler: Why doesn't this work?

SHIT...nevermind. I'm an idiot. I got it. I am so freaking tired...lol


Hope you guys don't mind these questions.

I have my chars pointed to $3000. I have char data I want to load into four tables. T1 - T4

T1 should contain chars 0 - 63
T2 should contain chars 64 - 127
etc...

This is my LoadBinary piece:
.var template = "T1=64,T2=64,T3=64,T4=64"
.var chars = LoadBinary("C:\Metroid Classic\c64\mc\chars\brinstar.dat",template)
.pc = $3000 "Chars"
T1: .fill chars.getT1Size(), chars.getT1(i)
T2: .fill chars.getT2Size(), chars.getT2(i)
T3: .fill chars.getT3Size(), chars.getT3(i)
T4: .fill chars.getT4Size(), chars.getT4(i)


Now, when I do:
ldx #1
lda T1,x
sta [screenlocation]


I get nothing?

I know the chars are ok because I can do a straight LoadBinary with no template and no tables and they work.

I know I am just doing something stupid here.

Any clues?

Thanks again!



METROID
http://www.metroidclassic.com
2007-09-27 06:27
Oswald

Registered: Apr 2002
Posts: 5017
I dont know kickassembler, but one thing:

you can use all chars in all four tables, dont restrict them to 0-63, 64-127, etc. those tables should be set by whatever editor you use, and you should be able to use any char nr at any position of a given tile ;)
2007-09-27 10:39
PopMilo

Registered: Mar 2004
Posts: 145
Code looks ok....

How does "sta [screenlocation]" actually look like?
Maybe there's the problem.
Use monitor to check $3000 if the data is loaded correctly.
2007-09-27 11:37
cbmeeks

Registered: Oct 2005
Posts: 72
Thanks guys. Turns out the problem is with my feeble mind.

When I imported my chars, I wasn't thinking. The chars take 2k of memory. I was forgetting the simple fact that there are 8 bytes to one char...lol

METROID
http://www.metroidclassic.com
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
Mason/Unicess
psych
tlr
Higgie/Kraze/Onslaught
niallquinn
Mr.Ice
Jetboy/Elysium
Guests online: 130
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 Onscreen 5k  (9.5)
8 Wafer Demo  (9.5)
9 Dawnfall V1.1  (9.5)
10 Quadrants  (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 Coders
1 Axis  (9.8)
2 Graham  (9.8)
3 Lft  (9.8)
4 Crossbow  (9.8)
5 HCL  (9.8)

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