Points of Required Attention™
Please chime in on a proposed restructuring of the ROM hacking sections.
Views: 88,442,992
Main | FAQ | Uploader | IRC chat | Radio | Memberlist | Active users | Latest posts | Calendar | Stats | Online users | Search 04-20-24 05:23 PM
Guest: Register | Login

0 users currently in ROM Hacking | 3 guests

Main - ROM Hacking - I don't believe in giving up... New thread | New reply

Pages: 1 2 3

never-obsolete
Posted on 01-10-08 04:50 PM (rev. 2 of 01-10-08 04:51 PM) Link | Quote | ID: 73168


Rat
Level: 24

Posts: 13/96
EXP: 74461
Next: 3664

Since: 02-22-07
From: Phoenix, AZ

Last post: 2590 days
Last view: 2590 days
here's a visual that might help. the image is kinda big so i linked to it. the red grid lines on the left picturebox are the same as the black ones on the right picturebox and are not part of the scene.

edit: make sure to view the image fullsize or it'll look distorted.

RetroRain
Posted on 01-12-08 06:24 AM Link | Quote | ID: 73337


Fuzz Ball
Level: 66

Posts: 25/994
EXP: 2437034
Next: 24817

Since: 09-30-07

Last post: 1929 days
Last view: 951 days
I added another 8K of CHR ROM. Do you have to add a mapper to be able to swap it in? I want to use two different pattern tables obviously. I been searching through some documents, not sure what to look for.

____________________
My YouTube Channel

jargon
Posted on 01-12-08 06:33 AM Link | Quote | ID: 73338


Ninji
Banned until 2010-10-15 for an utterly psychedelic posting style
Level: 36

Posts: 20/247
EXP: 300097
Next: 8013

Since: 12-10-07
From: 480/85260

Last post: 4943 days
Last view: 4601 days
the channel has come to a consensus that your chr ram/rom is overwriting into nametable space.

____________________
NIHYFDTTMWTMR

Kawa
Posted on 01-12-08 10:55 AM Link | Quote | ID: 73342


CHIKKN NI A BAAZZKIT!!!
80's Cheerilee is best pony
Level: 138

Posts: 645/5344
EXP: 30930736
Next: 732245

Since: 02-20-07
From: The Netherlands

Last post: 4492 days
Last view: 2627 days
The channel has come to the consensus that you're a jerk.

____________________
Wife make lunch - Shampoo
Opera - give it a spin
Spare some of your free time?
<GreyMaria> I walked around the Lake so many goddamn times that my sex drive was brutally murdered
Kawa rocks — byuu

RetroRain
Posted on 01-14-08 05:51 AM (rev. 5 of 01-14-08 06:03 AM) Link | Quote | ID: 73453


Fuzz Ball
Level: 66

Posts: 26/994
EXP: 2437034
Next: 24817

Since: 09-30-07

Last post: 1929 days
Last view: 951 days
hey jargon, since you know how to do it, why don't you show me?

____________________
My YouTube Channel

jargon
Posted on 01-14-08 06:02 AM Link | Quote | ID: 73455


Ninji
Banned until 2010-10-15 for an utterly psychedelic posting style
Level: 36

Posts: 23/247
EXP: 300097
Next: 8013

Since: 12-10-07
From: 480/85260

Last post: 4943 days
Last view: 4601 days
rockman:

Kawa was spamming by refering to me, pay no attention to Kawa, Kawa apparently doesn't know jack to nothing about the NES nor anything 80s for that matter.

i know little, but i do understand the physical limitations in 80s circuitry layouts.

for example:
you can't simply map the entire screen as one big CHR block.

it will overwrite nametable space,

however you can store it in multiple CHR blocks and bankswitch mid-retrace using scanline IRQ in order to switch banks partially down the screen when the NES draws it.

in this manner you can store 1/4th of unique tiles covering the entire screen in its own CHR bank, that is swapped out via IRQ that triggers the swap when the NES arrives at the correct scanline.

mid-scanline IRQ is out of the question tho as far as i am concerned.

i haven't heard of a damned NES cart that splits it into left and right CHR sets.

only multiple top down CHR sets.

so keep that in mind.

the irc channel came to the consensus that your CHR is overwriting NAMETABLE space, and this would produce the odd debug artifacts your emu is giving you that you show in your screen shots.

yes it would cause such effects as some tiles being scrambled, "squished" on an axis, or missing in entirety in theory.

i suggest you use a different mapper that bankswitches using scanline triggered IRQ for when rendering full screen prerendered details.

i suggest keeping sprites in one 1k bank, and your prerendered backdrops in multiple scanline-IRQ-swapped 1k pattern tables.

you can also swap your sprite pattern table (CHR) using the scanline-irq so that the hud gfx and npcs etc have more pattern table space, just make sure the hud and npc's always stay on their own side of a specific scanline.

remember, you can change the pattern table mid sprite or tile using the scanline IRQ for bankswap, just make sure the pattern tables match up.

ciao

____________________
NIHYFDTTMWTMR

RetroRain
Posted on 01-14-08 06:07 AM (rev. 2 of 01-14-08 06:07 AM) Link | Quote | ID: 73457


Fuzz Ball
Level: 66

Posts: 27/994
EXP: 2437034
Next: 24817

Since: 09-30-07

Last post: 1929 days
Last view: 951 days
no wait, did you think I was trying to map the whole screen using 1 CHR bank? No, if I was vague, I'm sorry. What I meant to say is, if you have 4 pattern tables for example, how do you replace the two that are already loaded, with the next two? It can only hold 2 pattern tables at a time. I want to load 2 new ones in. Now I'm guessing that they had to be swapped in.

____________________
My YouTube Channel

jargon
Posted on 01-14-08 06:16 AM (rev. 3 of 01-14-08 07:57 AM) Link | Quote | ID: 73458


Ninji
Banned until 2010-10-15 for an utterly psychedelic posting style
Level: 36

Posts: 24/247
EXP: 300097
Next: 8013

Since: 12-10-07
From: 480/85260

Last post: 4943 days
Last view: 4601 days
Posted by Rockman
hey jargon, since you know how to do it, why don't you show me?

Posted by Rockman
no wait, did you think I was trying to map the whole screen using 1 CHR bank? No, if I was vague, I'm sorry. What I meant to say is, if you have 4 pattern tables for example, how do you replace the two that are already loaded, with the next two? It can only hold 2 pattern tables at a time. I want to load 2 new ones in. Now I'm guessing that they had to be swapped in.


i suggest looking for tutorials on how to bankswitch based on scanline IRQ.

if you took part in #acmlm on irc.kafuka.org (EmuNet) or #nesdev on irc.choopa.ca (EFnet) you could prolly find many people that would be more experienced to lend a hand.

i am planning on compiling using nesasm using nbasic as a precompiler for my homebrew NES carts, and don't plan on diddling with any assembler what-so-ever until i have done enough research on how things work in order to make a bread board prototype that mimics the behavior of how the NES operates as a win32 binary of my games first.

assembler is basically only do-able once you already have a full idea of what you intend to actually code. unless you are a damned asm guru which i seem to doubt.

____________________
NIHYFDTTMWTMR

RetroRain
Posted on 01-16-08 07:44 AM Link | Quote | ID: 73764


Fuzz Ball
Level: 66

Posts: 28/994
EXP: 2437034
Next: 24817

Since: 09-30-07

Last post: 1929 days
Last view: 951 days
I figured out how to do it. After doing a lot of searching around, I came upon Disch's document:

http://www.romhacking.net/docs/353/

It is there that I found out that you DO indeed need to add a mapper, if you want to swap banks in and out, because the mappers are special chips that expand the capabalities of the limited NES. By adding a mapper, which can be different for any ROM, you can really do a lot more! I never really quite got the concept of the mapper in the past, but now I have a much better understanding of it. Otherwise, by default, you're limited to what is already there, which is the 2 pattern tables. I know you can also add graphics another way, by putting them in the PRG bank, but that's a whole different thing.

So after I read that, I got a much better understanding of how mappers work, and how to swap stuff in and out. However, even after reading his doc, I still didn't know exactly how to do it, until I found this document:

http://emu-docs.org/NES/Mappers/mappers.txt

Then it all became clear. I added a MMC3 (Mapper 4) to my ROM, and used the swapping capabilities to change what can be shown in the 1K CHR slots. Its pretty neat. In a way, building this little project from scratch, will really help me now when it comes to ROM hacking.



Now, press Start...



Press A...



Swapped those babies in!

I still didn't get around to figuring out the Attribute Tables, but I'm going to deal with that next. When I am done with this project, I might make a document which shows everything I learned in programming the NES, that way others can learn from it as well.

____________________
My YouTube Channel
Pages: 1 2 3


Main - ROM Hacking - I don't believe in giving up... New thread | New reply

Acmlmboard 2.1+4δ (2023-01-15)
© 2005-2023 Acmlm, blackhole89, Xkeeper et al.

Page rendered in 0.023 seconds. (340KB of memory used)
MySQL - queries: 72, rows: 100/101, time: 0.017 seconds.