Search found 8 matches
- Mon Oct 23, 2017 4:33 pm
- Forum: NESdev
- Topic: Best way to pass arguments
- Replies: 7
- Views: 2558
Re: Best way to pass arguments
I've a few virtual registers in zero page with a few contracts when functions are called and I need more than just A/X/Y. Argument registers (a0-a7) are preserved by the called function. Use to pass parameters to methods, or to store variables if you've run out of work registers ;) Temporary registe...
- Fri Oct 20, 2017 7:02 am
- Forum: NESdev
- Topic: Multilevel metatile example code
- Replies: 5
- Views: 2394
Re: Multilevel metatile example code
Shouldn't you just need two 8-byte attribute caches for top/bottom and two 7-byte attribute caches for left/right, or am I missing something? You can also store two attribute tables for when row % 4 = 0, and when row % 4 = 2. This way you can just store packed attributes to send straight to the attr...
- Wed Oct 11, 2017 7:51 pm
- Forum: NESdev
- Topic: Relatively fast multi, ...
- Replies: 0
- Views: 5503
Relatively fast multi, ...
Keldon's 119 cycle multiply with 16-bit output Requires: 1. 512 bytes ROM. 2. 4 zero page registers for input and return. The way it works is really simple (basically long multiplication). It's slower than Damien's 90 cycle fmul, executing 118-119 cycles, which makes it on average faster than euror...
- Sun Jul 02, 2017 5:55 am
- Forum: NESdev
- Topic: Puyo Puyo AI
- Replies: 1
- Views: 1515
Re: Puyo Puyo AI
This is brilliant!!!
- Sat Jul 01, 2017 5:12 am
- Forum: NESdev
- Topic: Function params & local vars using a stack in ASM6
- Replies: 35
- Views: 15669
Re: Function params & local vars using a stack in ASM6
I've been playing around with some high level macros as well and I've found a way for a macro to accept either a local parameter or an actual register with the following code: MovLocal @index, regA I'll also explain how you can achieve the following flexibility with the same macro: MovLocal @index, ...
- Fri Jun 30, 2017 10:54 am
- Forum: NESdev
- Topic: Function params & local vars using a stack in ASM6
- Replies: 35
- Views: 15669
Re: Function params & local vars using a stack in ASM6
Code: Select all
ifdef @restoreX
ldy localVarPtr
endif- Tue Jun 20, 2017 2:08 pm
- Forum: Newbie Help Center
- Topic: NESASM forces absolute addressing in zero page
- Replies: 27
- Views: 24921
Re: NESASM forces absolute addressing in zero page
My bad I meant:
To force opcode $B9.
Code: Select all
LDA zeroPageAddress+$800, y- Tue Jun 20, 2017 11:38 am
- Forum: Newbie Help Center
- Topic: NESASM forces absolute addressing in zero page
- Replies: 27
- Views: 24921
Re: NESASM forces absolute addressing in zero page
How about:
Code: Select all
LDA (zeroPageAddress + $800), y