which assembler to use?
Moderator: Moderators
-
Celius
- Posts: 2159
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
If I can make a suggestion, I would actually stay away from that method of loading information onto the Name Table. It looks kind of like how the GBA Guy showed in his tutorials. And it doesn't look like you reset your scroll after your routine either. If you want a whole screen filled with different tile data, I'd suggest Tepple's name table editor. That way, you can have one file that's 1k, and you can load it directly on from $2000-$23FF (It comes with the attributes attached). But yeah, stick this on the end of the routine:
lda #$20
sta $2006
lda #$00
sta $2006
sta $2005
sta $2005
That's at least a step closer to solving the problem.
EDIT: Oh, and if you want to upload files, you should open a freewebs account. Just go to www.freewebs.com and make an account. Select HTML mode, not the easy freewebs builder. You don't have to make anything of your website, but you can upload files onto your site, and allow us to download them. So if your user name was "Chicken", and your uploaded file was "Sample.NES", you'd tell us to go to www.freewebs.com/chicken/sample.nes.
lda #$20
sta $2006
lda #$00
sta $2006
sta $2005
sta $2005
That's at least a step closer to solving the problem.
EDIT: Oh, and if you want to upload files, you should open a freewebs account. Just go to www.freewebs.com and make an account. Select HTML mode, not the easy freewebs builder. You don't have to make anything of your website, but you can upload files onto your site, and allow us to download them. So if your user name was "Chicken", and your uploaded file was "Sample.NES", you'd tell us to go to www.freewebs.com/chicken/sample.nes.
Still the same. Funny thing now FCE is acting funny. it keeps gliching. meaning a sprite would move- stop- move again.
well heres the demo.
http://www.freewebs.com/ninetendo/NESASM.rar
http://www.freewebs.com/ninetendo/asm6.rar
well heres the demo.
http://www.freewebs.com/ninetendo/NESASM.rar
http://www.freewebs.com/ninetendo/asm6.rar
" If I have seen further it is by standing on the shoulders of giants" - Issac Newton, in a letter to Robert Hooke.
-
Celius
- Posts: 2159
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
I haven't looked at the whole thing yet and found the problem but just for future reference, this is the common way to load a .nam file:
If I find your problem, I will edit this post, but it will show up as a new post.
Code: Select all
loadnam:
lda #<NameFile
sta $0
lda #>NameFile
sta $1
lda #$20
sta $2006
lda #$00
sta $2006
ldx #4
ldy #0
-
lda ($0),y
sta $2007
iny
bne -
inc $1
dex
bne -
-
Celius
- Posts: 2159
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
May I ask what the demo's supposed to look like?
EDIT: You shouldn't go up to #$80 in the last part. You should let to routine go until it reaches $2400, that way it'll also store the attributes. So just delete the CPX #$80 out of there.
The above code is proper. And I see you do this:
in the NMI routine. You only need to store those variables into $300/$301 one time, so just stick that outside of the NMI routine before the NMI init. Also, if you do an Add with Carry, you want to put a CLC before it. Unless you're doing 16-bit addition. But if you're only increasing it by one, I'd reccomend the INC instruction.
EDIT: You shouldn't go up to #$80 in the last part. You should let to routine go until it reaches $2400, that way it'll also store the attributes. So just delete the CPX #$80 out of there.
Code: Select all
loadNames4:
lda ourMap+$300, X
sta $2007
inx
bne loadNames4
Code: Select all
lda #$03
sta $0301
lda #$20
sta $0300
LDA $0303
ADC #$01
sta $0303
clearing out that last cpx #$80 did fill in the last row on NESASM. i tried it on asm6 but still nothing. what im thinking is maybe i need to clear all my registers on restart. i did it on NESASM. it worked but i actually had to slip in a
lda #$00
sta $0303
to get the the sprite moving right to reset on reset. for some reason it wont clear it out the sprite DMA with my code. i even used the ol Duck Hunt Rip with nothing. im probrably going to try another emulator on the asm6 rom
lda #$00
sta $0303
to get the the sprite moving right to reset on reset. for some reason it wont clear it out the sprite DMA with my code. i even used the ol Duck Hunt Rip with nothing. im probrably going to try another emulator on the asm6 rom
" If I have seen further it is by standing on the shoulders of giants" - Issac Newton, in a letter to Robert Hooke.
-
Celius
- Posts: 2159
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
You can clear all registers in RAM very easily at the beggining of the reset routine:
I do that on reset. That's a very easy way to clear RAM. So your demo is working when compiled with NESASM?
Code: Select all
ldx #0
txa
-
sta $0,x
sta $100,x
sta $200,x
sta $300,x
sta $400,x
sta $500,x
sta $600,x
sta $700,x
inx
bne -
oh yeah it works on NESASM.
http://www.freewebs.com/ninetendo/NT1.NES
same code. i get this on asm6
http://www.freewebs.com/ninetendo/tst.NES
http://www.freewebs.com/ninetendo/NT1.NES
same code. i get this on asm6
http://www.freewebs.com/ninetendo/tst.NES
" If I have seen further it is by standing on the shoulders of giants" - Issac Newton, in a letter to Robert Hooke.
-
Celius
- Posts: 2159
- Joined: Sun Jun 05, 2005 2:04 pm
- Location: Minneapolis, Minnesota, United States
- Contact:
Well, it looks like the code works, it's just your CHR file that's not successfully becoming a part of the ROM. Something's wrong with the way you're including the CHR file, I think. I don't know anything about asm6, so I can't be of much help solving the problem. But I'm pretty sure that's the problem.
i tried the .incbin loopy mentioned
and
the merging them together without .incbin.
asm6 tst.asm tst.bin
copy /B tst.bin +tst.chr tst.nes
pause
but yeah i figured it was something with .chr
and
the merging them together without .incbin.
asm6 tst.asm tst.bin
copy /B tst.bin +tst.chr tst.nes
pause
but yeah i figured it was something with .chr
" If I have seen further it is by standing on the shoulders of giants" - Issac Newton, in a letter to Robert Hooke.