Search found 1718 matches

by 93143
Sun Jun 25, 2023 1:49 pm
Forum: SNESdev
Topic: Question about switching background modes mid-screen
Replies: 61
Views: 9665

Re: Question about switching background modes mid-screen

Interlacing works fine in Mode 1. You have to manually switch to a different set of tiles for the other field, but it does work. That's actually why I think Mode 1 would be a better fit than Mode 5 for this extreme case, because it's easier to replace a whole tile than it is to replace the even or o...
by 93143
Sun Jun 25, 2023 12:56 pm
Forum: SNESdev
Topic: Question about switching background modes mid-screen
Replies: 61
Views: 9665

Re: Question about switching background modes mid-screen

I think it should be possible, assuming the text is done with a constant-width 2bpp 8x16 interlaced font. With an 8bpp layer at 256x288 interlaced, your VRAM load is 36 KB per field. You need 288 bytes of tilemap for each field if you're using 16x16 tiles, and 1.25 KB for both fields of the text map...
by 93143
Fri Jun 16, 2023 4:12 pm
Forum: SNESdev
Topic: Collision Detection between 128 Objects?
Replies: 30
Views: 27251

Re: Collision Detection between 128 Objects?

I haven't done anything. I've been too busy to devote much time to my hobbies, and I've recently been working on a different project (nearly done). However, I do have some ideas. Yours is interesting, but I was going to go in a different direction, adding in some other ideas that look visually impre...
by 93143
Wed Jun 07, 2023 3:15 pm
Forum: SNESdev
Topic: how to make a tilemap's background
Replies: 6
Views: 1803

Re: how to make a tilemap's background

In Mode 3, BG1 has unfettered access to all of CGRAM. The pixel data is 8-bit, and the palette selector bits are not used unless you're in direct-colour mode, which doesn't use CGRAM at all. BG2 (again, speaking of Mode 3) has access to the 8 4-bit palettes in the bottom half of CGRAM, and you selec...
by 93143
Wed Jun 07, 2023 2:31 pm
Forum: SNESdev
Topic: Writing to VRAM during HBlank
Replies: 28
Views: 11967

Re: Writing to VRAM during HBlank

The method works by forced blank during HBlank, so as to free up VRAM for writes. HBlank is where the PPU loads sprite graphics from VRAM into its line buffer. But the PPU doesn't load sprite graphics while the screen is blanked for writes (or perhaps just while the writes are happening? The 1CHIP s...
by 93143
Wed Jun 07, 2023 2:58 am
Forum: SNESdev
Topic: Writing to VRAM during HBlank
Replies: 28
Views: 11967

Re: Writing to VRAM during HBlank

It should be possible, but I think it would actually look way worse. With letterboxing, it's clear that the game window is what it is, and your brain disregards the black areas as not worth paying attention to. With your scheme, the sprites inexplicably don't get drawn over some of the visible area,...
by 93143
Sat Jun 03, 2023 11:28 am
Forum: SNESdev
Topic: Writing to VRAM during HBlank
Replies: 28
Views: 11967

Re: Writing to VRAM during HBlank

To clarify a point in my previous post: you can send each line's worth of HDMA data to a different location in VRAM by using a channel to set the VRAM address before sending the data. This obviously reduces the amount of data you can send by 4 bytes per line (one channel's worth), and complicates th...
by 93143
Sat Jun 03, 2023 3:05 am
Forum: SNESdev
Topic: Writing to VRAM during HBlank
Replies: 28
Views: 11967

Re: Writing to VRAM during HBlank

32 lines is enough for 768 bytes (24 4bpp tiles, or 12 rows of a tilemap), assuming the data can be dumped into VRAM in a single contiguous chunk and that nothing else needs HDMA*. BGs should work fine; it kills sprites because the line buffer renders during HBlank, but you need to force blank durin...
by 93143
Fri Jun 02, 2023 5:13 pm
Forum: SNESdev
Topic: Writing to VRAM during HBlank
Replies: 28
Views: 11967

Re: Writing to VRAM during HBlank

...so that's not ideal. What you want is for there to be no sprites where the boss isn't displayed, so you can use those lines to update without worrying about stomping on live tiles while the boss is being rasterized. It might still be possible, but it's hard to say in the abstract. Alternately, yo...
by 93143
Fri Jun 02, 2023 5:06 pm
Forum: SNESdev
Topic: Writing to VRAM during HBlank
Replies: 28
Views: 11967

Re: Writing to VRAM during HBlank

The glitching isn't inevitable in all scenarios. Basically, you have to write the data before you need it, but after you stop needing the old data that you're overwriting. Since you can determine more or less freely where data updates go, you can maneuver around the areas that display your updates a...
by 93143
Fri Jun 02, 2023 4:32 pm
Forum: SNESdev
Topic: Writing to VRAM during HBlank
Replies: 28
Views: 11967

Re: Writing to VRAM during HBlank

That's not tile switching you're seeing. It's a single tile with its pixel data being rewritten in between one scanline and the next. (Well, partially rewritten. There wasn't room to do a full 32 bytes, but 20 was sufficient for proof of concept.) You could change tilemap entries instead of tiles, i...
by 93143
Sun May 21, 2023 11:02 pm
Forum: SNESdev
Topic: I have a question about streaming in new object tiles.
Replies: 8
Views: 1125

Re: I have a question about streaming in new object tiles.

You can write either the even bitplanes or the odd bitplanes. This means you can use two 2bpp (3-colour plus holes) subsubpalettes per 4bpp sprite subpalette. You cannot, however, switch a location in VRAM from one subsubpalette to the other without writing all four bitplanes, since the ones you are...
by 93143
Sat May 20, 2023 10:12 am
Forum: SNESdev
Topic: (Resolved) How to make a sprite
Replies: 33
Views: 2862

Re: How to make a sprite

As this also raises the question of the low half, does it actually cache the value or does it just write the byte value and move on, i.e. if you don't write a pair does it write anything at all? The docs are pretty explicit about this. In the low table, you have to write the high byte before anythi...
by 93143
Sat May 20, 2023 12:02 am
Forum: SNESdev
Topic: (Resolved) How to make a sprite
Replies: 33
Views: 2862

Re: How to make a sprite

so if you set OAM Address to be $2 then you will write to bytes $4 and 5 and then you set the address to $3 to write to bytes 6 and 7. However if you set it to $100 you write to byte $200 and if you set it to $101 you write to byte $201 Are you sure about that? The docs seem pretty insistent that i...
by 93143
Fri May 19, 2023 10:44 pm
Forum: SNESdev
Topic: (Resolved) How to make a sprite
Replies: 33
Views: 2862

Re: How to make a sprite

...yeah, I think I goofed a bit. It's sprite 8 you're setting, not sprite 4. Word address and all that...
fritzzz wrote: Fri May 19, 2023 9:53 pm %00001010 ?
Yes, that's how you'd set the first two sprites to Large.