Search found 64 matches

by NOOPr
Tue Nov 26, 2019 7:28 am
Forum: Newbie Help Center
Topic: Nested loops and working with X and Y
Replies: 5
Views: 242

Re: Nested loops and working with X and Y

bjones wrote:
Tue Nov 26, 2019 6:34 am
yeah I just implemented the top approach right after I posted. What makes the second one better?
You consume fewer ROM and CPU cycles by the cost of 1 byte in RAM.
by NOOPr
Tue Nov 26, 2019 6:31 am
Forum: Newbie Help Center
Topic: Nested loops and working with X and Y
Replies: 5
Views: 242

Re: Nested loops and working with X and Y

To store the X/Y registers into stack, you must transfer it to A and then push to stack: ; Push X txa ; transfer value in X to A (A = X) pha ; to stack ; Pull X pla ; pull the value from stack into A tax ; transfer value from A back to X A better approach is to store the value in a variable in RAM (...
by NOOPr
Tue Nov 05, 2019 8:01 am
Forum: NESdev
Topic: FCEUX + Midframe Palette Swap
Replies: 22
Views: 2862

Re: FCEUX + Midframe Palette Swap

I highly recommend Mesen
by NOOPr
Mon Nov 04, 2019 6:47 am
Forum: NESdev
Topic: Sin table and fixed point arithmetic in C
Replies: 8
Views: 3065

Re: Sin table and fixed point arithmetic in C

@wonder , just do a rule of three:

Code: Select all

+------------+-------------+
| real value | fixed point |
+------------+-------------+
| 1.0        | 256         |
| 0.5        | 128         |
| 0.1        | 26          |
+------------+-------------+
by NOOPr
Sat Oct 26, 2019 2:28 pm
Forum: NESdev
Topic: What is the most popular assembler used for NES?
Replies: 4
Views: 2941

Re: What is the most popular assembler used for NES?

Don't know for sure, but i guess it is ca65 ... second asm6
by NOOPr
Fri Oct 18, 2019 11:27 am
Forum: Newbie Help Center
Topic: clear nametable then copy into ppu
Replies: 3
Views: 1306

Re: clear nametable then copy into ppu

A short version for clear only the name table: lda #CLEAR_VALUE ldx #0 ldy #>($3C0) clear_page: sta PPUDATA inx bne clear_page dey bne clear_page ldy #<($3C0) clear_frag: sta PPUDATA dey bne clear_frag or to clear NT within Attribute Table: lda #CLEAR_VALUE ldx #0 ldy #4 ; 4x256 clear_all: sta PPUDA...
by NOOPr
Wed Sep 25, 2019 10:14 am
Forum: Other Retro Dev
Topic: about paprium
Replies: 13
Views: 5802

Re: about paprium

tepples wrote:The 10 MiB map also messes up if a 32X or Sega CD is present, so I would recommend against using it in new productions.
There's no way to bank the 10MiB to avoid conflicts with these peripheral addresses?
by NOOPr
Wed Sep 04, 2019 5:49 am
Forum: Newbie Help Center
Topic: improvement random item generation code (BGR / PPU ADDR)
Replies: 9
Views: 2364

Re: improvement random item generation code (BGR / PPU ADDR)

The only problem is that all addresses of 8x8 BGR tiles are randomly drawn, while 16x16 blocks should be Sorry, I missed that. Just replace jsr rng ; generate another random byte cmp #240 by jsr rng ; generate another random byte asl a ; an even low byte cmp #240
by NOOPr
Tue Sep 03, 2019 12:15 pm
Forum: Newbie Help Center
Topic: improvement random item generation code (BGR / PPU ADDR)
Replies: 9
Views: 2364

Re: improvement random item generation code (BGR / PPU ADDR)

I think you don't need those tables: jsr rng ; rng is a proc that generates a random number from 0 to 255 in A and #3 ; A have a value from 0 to 3 clc adc #$20 ; now A have $20 to $23 sta PPUADDR ; set HI byte PPU address jsr rng ; generate another random byte cmp #240 bcc set_hi sbc #240 ; A have 0...
by NOOPr
Tue Sep 03, 2019 7:53 am
Forum: Newbie Help Center
Topic: Tested on FCUEX 2.2.2 but no sprites on flashcard (solved!)
Replies: 3
Views: 1597

Re: Tested fine on FCUEX 2.2.2 but no sprites on flashcard

The DMA routine must be called during V-Blank. So, try to call updatesprites in vblank . Tip: try to change your code to work with NMI enabled rather than manual calling vblank and polling $2002, something like this: main_loop: lda #0 sta nmiok wait_nmi: lda nmiok beq wait_nmi ; game logic here ; .....
by NOOPr
Tue Aug 20, 2019 3:12 pm
Forum: NESdev
Topic: 8bitworkshop - online IDE now supports NES
Replies: 19
Views: 12002

Re: 8bitworkshop - online IDE now supports NES

rainwarrior wrote:Doesn't seem to have any documentation?
You have to pay for it: https://www.amazon.com/gp/product/10759 ... e2c322d80a
by NOOPr
Thu Aug 15, 2019 9:55 am
Forum: NESdev
Topic: Increment PPU address by a number
Replies: 15
Views: 8272

Re: Increment PPU address by a number

tokumaru wrote:Cool! Skipping the remaining positions is definitely an elegant approach in this case!
The first time I saw this bit $2007 to increment $2006 was in a reply from you on a topic about change palette mid frame
by NOOPr
Thu Aug 15, 2019 8:56 am
Forum: NESdev
Topic: Increment PPU address by a number
Replies: 15
Views: 8272

Re: Increment PPU address by a number

This should do the trick (untested code!!) PPUSTATUS = $2002 PPUADDR = $2006 PPUDATA = $2007 START_ADDR = 2103 MATRIX_ROWS = 10 ; arbritrary value MATRIX_COLS = $13 TILE = $c2 generate_random_walls: lda PPUSTATUS lda #>START_ADDR sta PPUADDR lda #<START_ADDR sta PPUADDR ldy #MATRIX_ROWS lda #TILE ge...
by NOOPr
Tue Jul 23, 2019 1:34 pm
Forum: NESemdev
Topic: I need more info about the 6502 CPU instruction set.
Replies: 36
Views: 15330

Re: I need more info about the 6502 CPU instruction set.

timl132 wrote:
lidnariq wrote:Both. The only difference is context.

The results of the arithmetic must be same regardless of whether you operate as (signed char + signed char) or (unsigned char + unsigned char).
So in binary, it does the exact same thing?
It uses 2's complement, so yes, it's the same thing...
by NOOPr
Tue Jul 23, 2019 11:10 am
Forum: NESemdev
Topic: I need more info about the 6502 CPU instruction set.
Replies: 36
Views: 15330

Re: I need more info about the 6502 CPU instruction set.

Try http://www.obelisk.me.uk/6502/reference.html and http://nesdev.com/6502.txt .
Warning about the 6502.txt: it has useful descriptions but has some bugs.