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

Main - Posts by RetroRain

Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50

RetroRain
Posted on 01-08-08 07:34 AM, in I don't believe in giving up... Link | Quote | ID: 73010


Fuzz Ball
Level: 66

Posts: 21/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
Could you tell me how do I use table files? I wanted to use NetSplit's palette code, to narrow it down, but whenever I go to compile, it tells me that the table is an invalid instruction, and it doesn't even display the whole table line.

------------------------------------------------------------------------------------------------
; NetSplit's Palette Loader Code

LDX #$20
L_PalInit:
LDA table-1,X
STA $2007
DEX
BNE L_PalInit

table dc.b $0D,$0C,$0B,$01,$0A,$09,$08,$01,$07,$06,$05,$01,$2B,$08,$0D,$01,$0D,$0C,$0B,$01,$0A,$09,$08,$01,$08,$07,$06,$05,$04,$03,$02,$01
------------------------------------------------------------------------------------------------

Does the table itself have to be in a certain spot in your code, like at the bottom? Or can it be used anywhere?

____________________
My YouTube Channel

RetroRain
Posted on 01-08-08 11:32 PM, in I don't believe in giving up... Link | Quote | ID: 73040


Fuzz Ball
Level: 66

Posts: 22/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
Okay, if I can't get it to work, I might try Sephiroth3's assembler. Um, another thing, out of the 8 palettes that are there, how do you specify a different palette?



I want the text that I have to be in the color White (#$20).

____________________
My YouTube Channel

RetroRain
Posted on 01-10-08 04:52 AM, in I don't believe in giving up... Link | Quote | ID: 73137


Fuzz Ball
Level: 66

Posts: 23/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
I'm still not quite getting the attribute tables at all. It's a bit confusing to me.



So, the attribute tables are responsible for all the palette assignments? Its very weird. In the second screenshot, this is being shown like this, bearing in mind that no attribute table has been set. I just want to make the text white. If you could explain the attribute table more, or perhaps give me sample code for the text, that would be great. I could study and learn from it. Thank you. By the way, when you press start at the title screen, it takes you to the second screen. So I'm kinda happy that I'm being able to get the NES to do what I want to do.

Also, I was looking for Sephiroth3's assembler, but I couldn't find it. Did he ever release it?

____________________
My YouTube Channel

RetroRain
Posted on 01-10-08 10:19 AM, in I don't believe in giving up... (rev. 2 of 01-10-08 10:22 AM) Link | Quote | ID: 73157


Fuzz Ball
Level: 66

Posts: 24/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
Thank you NetSplit. I still haven't fully figured out the attribute table, but I'm getting there. I been playing around with it, experimenting, practicing. I even saw how it was set up, with the 4x4 block sections, when I messing around with the name table. It's definitely a little bit confusing, but I came this far, so I should be able to pick it up. I just wanted to show you this pic:



It's not the colors it should be, but its better than all red. The color brings it to life. I'll probably practice more tomorrow. Thanks for the info.

____________________
My YouTube Channel

RetroRain
Posted on 01-12-08 06:24 AM, in I don't believe in giving up... Link | Quote | ID: 73337


Fuzz Ball
Level: 66

Posts: 25/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 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

RetroRain
Posted on 01-14-08 05:51 AM, in I don't believe in giving up... (rev. 5 of 01-14-08 06:03 AM) Link | Quote | ID: 73453


Fuzz Ball
Level: 66

Posts: 26/994
EXP: 2438210
Next: 23641

Since: 09-30-07

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

____________________
My YouTube Channel

RetroRain
Posted on 01-14-08 06:07 AM, in I don't believe in giving up... (rev. 2 of 01-14-08 06:07 AM) Link | Quote | ID: 73457


Fuzz Ball
Level: 66

Posts: 27/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 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

RetroRain
Posted on 01-16-08 07:44 AM, in I don't believe in giving up... Link | Quote | ID: 73764


Fuzz Ball
Level: 66

Posts: 28/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 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

RetroRain
Posted on 01-19-08 03:52 AM, in Batman Easy Link | Quote | ID: 74009


Fuzz Ball
Level: 66

Posts: 29/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
I like the idea you implemented with this hack. I never really got into the NES Batman games, but I'm sure they were hard considering the few minutes I played of them. Have you tried making Batman all black, but using a gray outline so that he stands out in the black background? I'm wondering how that would look.

____________________
My YouTube Channel

RetroRain
Posted on 01-21-08 09:11 AM, in MM3/ROM Expansion Question Link | Quote | ID: 74593


Fuzz Ball
Level: 66

Posts: 30/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
I'm playing around with Mega Man 3. I added a 16K PRG-ROM bank to the ROM. $4000 bytes of 00s at the end of the file, and I updated the header. But the game won't run. Is there anything else that I should be doing? The only thing I can really think of, is that perhaps that $4000 bytes of data is being added on to a bank that is already holding its maximum capacity. By the way, this 16K of space is for graphics. I just want to practice swapping in new graphics into this game.

____________________
My YouTube Channel

RetroRain
Posted on 01-23-08 06:11 AM, in MM3/ROM Expansion Question Link | Quote | ID: 74773


Fuzz Ball
Level: 66

Posts: 31/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
Thank you, I got it to work.

____________________
My YouTube Channel

RetroRain
Posted on 01-23-08 06:27 AM, in Question/Game Sprites... Link | Quote | ID: 74775


Fuzz Ball
Level: 66

Posts: 32/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
I was going to post this in my other thread, but I wanted to make sure this gets seen.

According to NESprgmn.txt, this is the routine for displaying a single 8x8 tile sprite:

ldx #$00 ;set $2004 to the start of SPR-RAM
stx $2003
stx $2003

lda #$7F ;y-1
sta $2004
lda #$00 ;sprite pattern number
sta $2004
lda #%00000001 ;color bit
sta $2004
lda #$08 ;x
sta $2004

My question is, using Megaman 1 as an example, Megaman, standing still, consists of 9 tiles, right? Now, in Megaman's code, they didn't have to type the above code 9 times to get Megaman to show up? That would be insufficient, and a waste of code. So I guess what I'm asking is, would they use a table and a loop for every sprite they wanted to show on screen? Or is there another way of doing this? I just want to make sure, so I don't waste my time making code that I don't have to.

____________________
My YouTube Channel

RetroRain
Posted on 01-30-08 04:04 AM, in Could be a stupid question... You be the judge. Link | Quote | ID: 75566


Fuzz Ball
Level: 66

Posts: 33/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
The Super Mario Bros. ROM file is 48K.

Looking at the header, it shows you that there is 2 16K PRG-ROM banks, and 1 8K CHR-ROM bank. Add this up, and you get 40K. Where is the other 8K coming from?

The rom is 0x0000 to 0xC00F.

0x0000 to 0x4000 = 1 PGR-ROM bank
0x4000 to 0x8000 = 1 PGR-ROM bank
0x8000 to 0xA000 = 1 CHR-ROM bank
0xA000 to 0xC000 = ????

This is probably very obvious to someone other than myself. I just want to know what the heck is occupying 8K of space? The PGR-ROM contains the game code, levels, sound, any other routines, and the CHR-ROM contains the graphics. Everything else outside of the ROM file is stored in RAM, when you have the console on. Call me stupid if you want, but I want to know.

____________________
My YouTube Channel

RetroRain
Posted on 01-30-08 04:21 AM, in Could be a stupid question... You be the judge. Link | Quote | ID: 75569


Fuzz Ball
Level: 66

Posts: 34/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
Thanks man.

____________________
My YouTube Channel

RetroRain
Posted on 02-02-08 06:13 AM, in Need help with a practice hack - SMB Rain (rev. 2 of 02-02-08 06:22 AM) Link | Quote | ID: 76004


Fuzz Ball
Level: 66

Posts: 35/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
I found a good SMB ROM, added 16K of CHR-ROM to it, and added Mapper 4 (MMC3). I changed the blank sky tile to this rain tile. Also, on the free CHR-ROM space I added, I copied that graphics bank and pasted it 3 more times, and changed the rain tile slightly in each one. Do you see where I'm going with this? I want to make 4-frame animation for the rain. I never did this before. I remember DahrkDaiz did this in a few of his hacks. I was wondering if I can get any advice or tips on how to finish this.

According to the mapper document, $8000 and $8001 are responsible for the bank switches and page numbers respectively.

LDA #$02 ; Select 1K VROM page at PPU $1000
STA $8000 ; Store it
LDA [Page Number Here] ; Select Page that will go into the 1K VROM page
STA $8001 ; Store it

I think what I'm stuck on, is where to put my code. I can write a loop that cycles through the pages, but there isn't a lot of free space as it is. But also, looking through SMB's code, I'm have a hard time just finding the code which stores the PPU $1000 VROM bank. Anyone have any suggestions on how I can make this work? This could be a fun learning experience, which is why I'm doing it.

I'm going to keep working on this in the meantime. I got to keep trying to see if I can get it to work.




____________________
My YouTube Channel

RetroRain
Posted on 02-07-08 02:24 AM, in Need help with a practice hack - SMB Rain (rev. 5 of 02-07-08 07:57 AM) Link | Quote | ID: 76558


Fuzz Ball
Level: 66

Posts: 36/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
What I'm really stuck on right now, is the whole concept of bank switching. I'm just not getting it. I know how to do bank switching when I was programming my game from scratch, but I'm having a hard time when it comes to hacking. If anyone could provide some useful information on bank switching in ROM hacking, that would be awesome.

____________________
My YouTube Channel

RetroRain
Posted on 02-07-08 07:47 PM, in Need help with a practice hack - SMB Rain (rev. 2 of 02-07-08 08:34 PM) Link | Quote | ID: 76637


Fuzz Ball
Level: 66

Posts: 37/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
I don't know. I'm not getting this because I'm probably retarded or something.

Alright, let me try to explain this, using a simpler game: SMB3.

Last night, I got out a fresh SMB3 ROM. I added $8000 bytes of CHR-ROM at the end of the file. After that, I copied 8 1K CHR banks into that new free space. The 1K CHR bank I copied 8 times, is the one with the ? blocks and note blocks, coins, and munchers. So, I want to try to get 8-frame tile animation out of this.

[][][][][][][][][][] = 1K VROM CHR Page

PPU Viewer:

[][][][][][][][][][] [][][][][][][][][][]

[][][][][][][][][][] [][][][][][][][][][]

[][][][][][][][][][] [][][][][][][][][][]

[][][][][][][][][][] [][][][][][][][][][]

So now that I got all of this out of the way, the next step is to add new code.

Question 1: Where do I add the new code within $8000-$9FFF? Where exactly do I add it? I found some free space near the end of the bank (a bunch of FFs), but when I added code, it didn't do anything. I found a bunch of EAs (NOPs) in the middle of the bank, but when I paused the game, it locked it up. So, does it matter where you put the code within the bank?

Question 2: If I put the swapping code too soon in the first bank, if I swap, and then swap back, how is it supposed to read the rest of the code without constantly swapping banks?

Question 3: Is the code supposed to look something like this?

(Using Mapper 4 - MMC3, SMB3 uses Mapper 4)

LDA #$01 ; Second 2K VROM Page
STA $8000
LDA [2K Graphics Page Here]
STA $8001

This is the Second 2K VROM Page
[][][][][][][][][][]

[][][][][][][][][][]

I'm typing from school right now, so if this is unclear, I will show pictures when I get home.

But all of this is just practice. So I can have an understanding of how to do bank switching. I figure SMB3 is easier to work with for practicing, since it already has a mapper and a decent amount of free space, from the get go.

Simpler Version:

So, given the situation, the CHR-ROM is expanded, and 8 1K graphics pages are added to it, how do you go about swapping those in for 8 frame animation?

Something else I forgot to ask. I want to try this with background tiles first, but if you use sprites, isn't there a limit to how many sprites you can have on the screen at one time?

EDIT - I just thought of this. Could I just simply find the original code that is doing the bank switching for that second 2K VROM page, and just edit it to swap the new graphics pages in?

____________________
My YouTube Channel

RetroRain
Posted on 02-10-08 04:59 AM, in Need help with a practice hack - SMB Rain (rev. 2 of 02-10-08 05:32 AM) Link | Quote | ID: 76895


Fuzz Ball
Level: 66

Posts: 38/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
Back to my SMB1 ROM, I copied all of the bytes from $9D70 to $AEDA to one of my free PRG banks. That is the enemy object data, and area object data. I'm putting code in place of that, but it is not working. I'm trying to swap in a different VROM page at PPU Address $1400. What could be the problem?

I'm using code like this:

LDA #$03
STA $8000
LDA [VROM Page Here]
STA $8001

I can't write a loop for the animation of tiles until I can get a page to show up. If I'm merely swapping CHR banks, this is all I need right?

EDIT - I'm almost there! I know the code I am using is right now!



See, instead of going with the rain, I decide to do 4-tile animation of ? block and coins, like in SMB3. I put my code at the beginning of $C000, and the game freezes, but I know that my code works! All I have to do is figure out the bank swapping, and I'm home free!

____________________
My YouTube Channel

RetroRain
Posted on 02-11-08 08:07 AM, in Need help with a practice hack - SMB Rain (rev. 5 of 02-11-08 07:29 PM) Link | Quote | ID: 77285


Fuzz Ball
Level: 66

Posts: 39/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
EDIT - I have the code for the 4-tile animation, and I figured out the bankswapping. Now all I have to do is put it all together. I'm having a hard time where to put my code and do the swapping, as working with level/enemy data isn't having any effect...

____________________
My YouTube Channel

RetroRain
Posted on 02-14-08 02:59 AM, in Need help with a practice hack - SMB Rain (rev. 2 of 02-14-08 03:32 AM) Link | Quote | ID: 77689


Fuzz Ball
Level: 66

Posts: 40/994
EXP: 2438210
Next: 23641

Since: 09-30-07

Last post: 1935 days
Last view: 957 days
Based on everything else I have done, whatever code I use, I have to use it in the first bank, $8000-$9FFF. It won't work in other banks. Yeah frantik, I agree that a piece of already existing code will have to be overwritten to make this work. I also found flaws in my animation code when I was placing it in different areas of the ROM to test it. There's nothing really more stopping me, except the proper code for the tile animation.

This is my tile animation code for the ? Blocks btw, incase you're curious:

LDA #$03 ; Selecting the VROM Page at PPU $1400
LDX #$05 ; VROM Page Number
LDY #$04 ; How many times it goes through the loop, one for each frame.

Loop:
STA $8000 ; Store the VROM Page at PPU $1400
STX $8001 ; Store the VROM Page Number
INX ; Increment X 4 Times, to get to the next VROM Page, the next frame.
INX
INX
INX
DEY ; Decrement the Loop by 1.
BNE Loop ; If not zero, loop again, until all frames have been loaded.

____________________
My YouTube Channel
Pages: 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50


Main - Posts by RetroRain

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

Page rendered in 0.245 seconds. (330KB of memory used)
MySQL - queries: 131, rows: 163/163, time: 0.235 seconds.