Search found 152 matches
- Tue Dec 13, 2011 7:40 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
Okay, so like this?: ; Inits everything. .proc reset ; Clears the flags. clc sei cld clv ; Sets the stack pointer. ldx #$FF txs ; Waits for the PPU to warm up. : lda $2002 bpl :- ; Inits the PPU. ldx #%10000000 stx PPU_CONTROL ldx #%00011000 stx PPU_MASK ; Sets the stack pointer again. ldx #$FF jmp ...
- Tue Dec 13, 2011 7:09 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
Okay, so I've meed those changes, and have this now: ; Inits everything. .proc reset ; Clears the flags. clc sei cld clv ; Sets the stack pointer. ldx #$FF txs ; Waits for the PPU to warm up. : lda $2002 bpl :- ; Inits the PPU. inx stx PPU_CONTROL stx PPU_MASK dex jmp main .endproc However, my code ...
- Mon Dec 12, 2011 7:47 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
I think you're confusing things, but it's normal. NMIs are very simmilar to IRQs, but on the NES it is specifically wired to the PPU and, when activated, fires when VBLank begins, basically. Code at the NMI vector is then executed, and then you can update the tiles, sprites and other stuff (or just...
- Sun Dec 11, 2011 6:33 am
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
- Fri Dec 09, 2011 1:17 am
- Forum: NES Music
- Topic: What ties a musical style to a region?
- Replies: 18
- Views: 9313
- Thu Dec 08, 2011 11:17 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
What have you written to PPUCTRL ($2000)? You could try putting a breakpoint on the NMI handler to make sure it gets called. I'm not writing anything there. =/ Your NMI couting code is useless if you are not initializing $2000. Initializing the PPU by writing to $2000 and $2001 at least once is a m...
- Tue Dec 06, 2011 8:19 am
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
There are several. My build environment uses a lot of Python programs, so I wrote my own. It's in the Concentration Room source code archive. Okay, thanks. What have you written to PPUCTRL ($2000)? You could try putting a breakpoint on the NMI handler to make sure it gets called. I'm not writing an...
- Sun Dec 04, 2011 9:25 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
I'm pretty sure that passing parameters through the stack is not very common on the 6502, because having to work around the return address is not very efficient. But if you feel comfortable using the stack that way, there's no reason for you not to. I'm not using *the* stack (the one at $100 to $1F...
- Sun Dec 04, 2011 8:53 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
This .proc might confuse you. But it's just a way to hide the labels defined inside the .proc from view outside the .proc, so that multiple subroutines can share the same names for internal labels. For example, the symbol inside wait4vbl ends up called wait4vbl::loop, and other subroutines won't be...
- Sun Dec 04, 2011 8:12 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
After the reset code finishes and the background is copied into the nametables, you start the game loop. Okay. Also, a question: So, if I permanently disable interrupts by setting the flag, I won't be able to update the screen, right? How would you predict how many bytes to scroll up? 6502 bytecode...
- Sun Dec 04, 2011 1:10 am
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
- Sat Dec 03, 2011 8:49 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
The loop basically waits for the variable to change. This works well in most cases, it's only bad if you have raster effects near the top of the screen (like status bars) and you can't guarantee that frame calculations will never spill into the next frame. But where should this loop be located? in ...
- Sat Dec 03, 2011 7:55 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
- Sat Dec 03, 2011 12:36 pm
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
Where do $FFFA-$FFFB and $FFFE-$FFFF point? Are you pushing or pulling anything in your NMI and IRQ handlers? What values end up in $FFFA through $FFFF? There should be three addresses (in the typical reverse byte order of the 6502); do they point anywhere familiar? The vectors point to an RTI, ini...
- Sat Dec 03, 2011 1:17 am
- Forum: Newbie Help Center
- Topic: Hello World
- Replies: 267
- Views: 61216
I see your LOWER_PROG_ROM and UPPER_PROG_ROM sum to 32 KiB. Are you making sure to specify two 16k pages in the iNES header? Yes. And are you making sure to replicate the vectors and the beginning of the init code in all 16k banks (the Barbie stub) so that no matter how the MMC1's registers are set...