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: 78
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: 5094
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: 146
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: 78
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
rexbeng
BYB/Hokuto Force
Da Snake
WVL/Xenon
camper
Chesser/Blazon
Rub_0201
Fred/Channel 4
Paul Bearer
Guests online: 154
Top Demos
1 Next Level  (9.7)
2 13:37  (9.7)
3 Mojo  (9.7)
4 Coma Light 13  (9.6)
5 Edge of Disgrace  (9.6)
6 What Is The Matrix 2  (9.6)
7 The Demo Coder  (9.6)
8 Uncensored  (9.6)
9 Comaland 100%  (9.6)
10 Wonderland XIV  (9.6)
Top onefile Demos
1 No Listen  (9.6)
2 Layers  (9.6)
3 Cubic Dream  (9.6)
4 Party Elk 2  (9.6)
5 Copper Booze  (9.6)
6 Dawnfall V1.1  (9.5)
7 Rainbow Connection  (9.5)
8 Onscreen 5k  (9.5)
9 Morph  (9.5)
10 Libertongo  (9.5)
Top Groups
1 Performers  (9.3)
2 Booze Design  (9.3)
3 Oxyron  (9.3)
4 Censor Design  (9.3)
5 Triad  (9.3)
Top Fullscreen Graphicians
1 Joe  (9.7)
2 Sulevi  (9.6)
3 The Sarge  (9.6)
4 Veto  (9.6)
5 Facet  (9.6)

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