Search found 11853 matches

by tokumaru
Sun Sep 27, 2020 10:47 am
Forum: NESdev
Topic: 8-Way Scrolling Screen Compression Method?
Replies: 16
Views: 555

Re: 8-Way Scrolling Screen Compression Method?

I wouldn't say that a 4-screen layout makes the scrolling easier to code... it does make glitchless 8-way scrolling possible without the use of any "tricks", but the name table height of 30 tiles is a pain to deal with no matter the mirroring type. With the MMC3 and CHR-ROM, it's fairly easy to mask...
by tokumaru
Sun Sep 27, 2020 8:15 am
Forum: NESdev
Topic: 8-Way Scrolling Screen Compression Method?
Replies: 16
Views: 555

Re: 8-Way Scrolling Screen Compression Method?

when using 4-way mirroring you can reduce this overhead to only 16 bytes. Maybe if you only ever update attributes when scrolling, but in many games you also need to change attributes when blocks are collected, destroyed or modified for any reason, so you need to keep the attributes of the entire s...
by tokumaru
Fri Sep 25, 2020 11:01 am
Forum: Newbie Help Center
Topic: Sprites are jittery when moving, not moving smoothly
Replies: 13
Views: 342

Re: Sprites are jittery when moving, not moving smoothly

My laptop randomly changes its refresh rate to 40Hz (battery-saving measure? I don't know) and it's very noticeable when running emulators.
by tokumaru
Thu Sep 24, 2020 3:21 pm
Forum: NESdev
Topic: 8-Way Scrolling Screen Compression Method?
Replies: 16
Views: 555

Re: 8-Way Scrolling Screen Compression Method?

Something like the metatile IDs are loaded into a buffer, and in NMI I have a routine that takes the 4 tile bytes stuffed in the ID and shoves it through ppudata, and moves onto the next ID Since vblank time is really short, you may want to decode the metatiles beforehand, so that the NMI handler o...
by tokumaru
Wed Sep 23, 2020 8:12 am
Forum: NESdev
Topic: 8-Way Scrolling Screen Compression Method?
Replies: 16
Views: 555

Re: 8-Way Scrolling Screen Compression Method?

One advantage of using metatiles is that the compression ratio is constant, so you can easily access the data directly in the ROM instead of having to decompress it to large buffers in RAM beforehand. You only need buffers for one row and one column of metatiles, for scrolling purposes. For collisio...
by tokumaru
Tue Sep 22, 2020 7:10 pm
Forum: NESdev
Topic: 8-Way Scrolling Screen Compression Method?
Replies: 16
Views: 555

Re: 8-Way Scrolling Screen Compression Method?

240 bytes per screen is still quite a lot, depending on how much ROM you have and how large your maps are gonna be. Going with 32x32-pixel metatiles (like Capcom) will get you down to 64 bytes per screen. Another option is to use large metatiles (e.g. 128x128 pixels, like in Sonic 2 on the Genesis) ...
by tokumaru
Tue Sep 22, 2020 5:21 pm
Forum: Newbie Help Center
Topic: Trying to figure out collision code
Replies: 7
Views: 332

Re: Trying to figure out collision code

In NESASM, < is used to select zero page addressing. If you don't use it, NESASM will use absolute addressing even when accessing memory at $0000-$00ff, generating code that's larger and slower.
by tokumaru
Mon Sep 21, 2020 7:32 pm
Forum: NES Music
Topic: Sound Nes Megaman 4
Replies: 5
Views: 204

Re: Sound Nes Megaman 4

The problem with changing the music in a game is that there's no standard format for songs on the NES, each game has its own audio driver and song format, so you can't simply take the songs from an NSF (which uses sound driver "A") and put them into a game (which uses sound driver "B"). You have 2 o...
by tokumaru
Tue Sep 15, 2020 9:43 pm
Forum: Newbie Help Center
Topic: Basic Bank Switch question
Replies: 2
Views: 105

Re: Basic Bank Switch question

If the data is in the same position within each bank, all the labels will resolve to the same address, and the assembled binary will be the same regardless of which one you use. Assembly is not like high-level languages, where the names of variables and functions are strongly tied to the objects the...
by tokumaru
Mon Sep 14, 2020 9:55 pm
Forum: NESdev
Topic: Sprites will not show up
Replies: 12
Views: 468

Re: Sprites will not show up

It's hard to catch these kinds of bugs without the full code or a ROM, but let's consider a few things: then, to give an overview of my program, I load everything in by scenes. scenes are arrays that contain a place, and people. I get to the people part, and first load their palettes. everything wor...
by tokumaru
Mon Sep 14, 2020 7:54 pm
Forum: NESdev
Topic: index outside of label (intentionally) asm
Replies: 12
Views: 457

Re: index outside of label (intentionally) asm

I just increment the PPU pointer with meaningless data in the first slot when loading palettes in a loop and store global BG after at $3F20. You can also increment the pointer by reading $2007 using the BIT instruction, which doesn't affect any registers, so you don't have to do the BG color last i...
by tokumaru
Mon Sep 14, 2020 4:43 pm
Forum: General Stuff
Topic: Nintendo "Gigaleak"
Replies: 60
Views: 11686

Re: Nintendo "Gigaleak"

Nintendo is never happy about anything that's not under their full control.
by tokumaru
Mon Sep 14, 2020 4:42 pm
Forum: Newbie Help Center
Topic: Question on background tiles(and how to put them into the PPU)
Replies: 6
Views: 244

Re: Question on background tiles(and how to put them into the PPU)

Each name table is just a 32x30 grid of references to tiles, whose actual graphics are stored in the pattern table. Every frame, the PPU scans the name table, checking each one of the referenced tiles and drawing them. You literally just need to send to the PPU (via register $2007) the indices of th...
by tokumaru
Mon Sep 14, 2020 4:33 pm
Forum: NESdev
Topic: index outside of label (intentionally) asm
Replies: 12
Views: 457

Re: index outside of label (intentionally) asm

backgroundPalette: backgroundPalette1: .res 4 backgroundPalette2: .res 4 backgroundPalette3: .res 4 backgroundPalette4: .res 4 This is the solution I use when I need to access multiple tables from one "master" label. For palettes specifically I don't waste space with the unused colors though, so I ...
by tokumaru
Mon Sep 14, 2020 9:52 am
Forum: Newbie Help Center
Topic: Question on background tiles(and how to put them into the PPU)
Replies: 6
Views: 244

Re: Question on background tiles(and how to put them into the PPU)

The background is defined by the name and attribute tables. Think of each name table as a grid of 32x30 tile indices, where each index corresponds to a tile. The attribute tables are more complex, so you can worry about them later, but they define what palettes the tiles in the name tables will use....