Romhacking => Help Wanted Ads => Topic started by: pangenttech on October 28, 2020, 05:02:10 am

Title: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on October 28, 2020, 05:02:10 am
   First, I'm hoping to improve a previously-released project:

This is a version of Virus (1990 NES prototype for Dr. Mario).

There's lots of empty space in it, which may make hacking easier.

The video here is a "best case scenario," as it shows functionality which is not present in the ROMhack currently. I'd like to get it closer than I have.

Added in the video (but not in the ROM) are a four-frame running Odie sprite, loss animations for Odie and Garfield, and a win animation for the bulldog. I've included the sprites for these in the ROM but can't implement them. (Garfield's whiskers when throwing the pills are also implemented as background rather than sprites here.)

Music is also added for the video. I think the proto has Tetris music but it's disabled.

"The original music tracks are still present, and can be played by writing a track number to RAM address $6F5."

   Also: I have released an ambitious Tiny Toon Adventures NES hack, but am still interested in improving it.

   This changes the game's graphics to feature a different lead character, enemies, and cutscenes.

   Proveaux has been helping me with some technical issues.

   Can the Tiny Toon Adventures bosses be made more difficult, by requiring more hits to defeat? Thinking in particular of the too-easy pirate boss, and Dr. Gene Splicer.

  For some reason, Not Elmyra's head sprites are misaligned when she changes direction suddenly on an incline, which messes up her face by apparently pasting it over itself.

  I'd like to add an extra sprite or two to the right of Not Hamton the Pig, during his scenes.

Music can be disabled by changing 0182C5 C4 to C5. CC was crashing the game but I think C5 is fine.

   I wanted to disable music for my Youtube videos, so it can be replaced. I may reenable music for the public release. Ideally we could actually replace the Tiny Toon Adventures theme music, but I know that's very difficult!

   I recall I also wanted to slightly reposition some sprites when not Montana Max is defeated at the end of the game. (Sprites which change his color, and could be placed a little higher)

   As a cheat in an emulator, you can write 10 to 4C to skip to the ending.

   Minor things: The robot character who replaced Gogo Dodo has one sprite in the wrong position. And there's some errant chest hair on the ape/Wolverine boss.

  Tiny Toon Adventures uses sprites for some elements of the intro and ending, and I was tempted to rework this to improve the colors in my hack but only did this in a couple places. The title screen uses sprite text, though.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 02, 2020, 04:04:25 pm
Cool I may help you to some degree. I am not looking for new big projects but I could do small ASM stuff for you or expand a ROM if you need it.
I am interested to help when you are interested to learn how things can be done.
I improved the Tiny Toon switcher patch and submitted it now. Right now it will rotate the character and show the current one in preview window.

(deleted wrong link!!)

I have not done music but it seems a very time consuming thing to get into. Did you use xkas to do patching so far?


To disable music you changed the base pointer of a table. To do this more clean you could disable the routine with placing a RTS (Return Subroutine) at the beginning of it.
At ROM offset $182be put the value 60. When you use Mesen as a debugger this would be at PRG $182ae. You find it also mapped at the CPU bus at $82ae..
I type this out since I think it is importent to get a understanding of memory and how a ROM is mapped on the NES.

I do have some info about it in the ASM file too. I recommend to check it out and ask questions if you don't find it helpful. Or what purpose it might have and when it is good to pick it up.

I don't say you should learn to code. Just haveing a basic understanding where things are. This should give you a idea of the memory mapping.
Code: [Select]
//Example Mapping:
//CPU Bus                                    PRG ROM
//$0000-$0800        2KB internal RAM
//$0800-$1fff        Mirrors of RAM
//$2000-$2007        Mirrors PPU Register
//$     -$3fff        Repeat every 8 bytes   
//$4000-$4017        NES APU Register and Controller ($4016-$4017)
//$4018-$401F        APU Function (disabled)
//$     -$5fff        deverse PRG RAM/ROM MapperRegister
//$6000-$7fff        SRAM
//$8000-$bfff        Most mappers start there PRG banks here.
//                Only one Bank at a Time!
//   ||||||||
//   |00---------------------------------- $0000
//   |||||||
//   |01---------------------------------- $4000
//   ||||||
//   |02---------------------------------- $8000   
//   |||||
//   |03---------------------------------- $c000
//   ||||
//   |04--------------------------------- $10000
//   |||
//   |05--------------------------------- $14000
//   ||
//   |06--------------------------------- $18000
//   |
// $c000-ffff                               $1c000 (Always at the end of the CPU bus!)
//   |
//   |The CPU expects interrupt vectors in a fixed place at the end of the cartridge space.
//   |
//   |$FFFA-$FFFB = NMI vector
//   |$FFFC-$FFFD = Reset vector
//   |$FFFE-$FFFF = IRQ/BRK vector
//   |
//   |----------------------------------- $1ffff

About changing Boss health. You can use a Cheat engine to locate the value. I just guessed it will have the value 3 somewhere and branch at 0 to factory..
When putting a breakpoint on it you find that the value $03 is written twice on it.
Sad part is if you put a higher value the boss will freak out. So we know the value probably also fit the purpose to keep track of something else. This will require more research. But you can make it easier without any problem.

I disabled the read on $BE twice and it seems you can put any health you like for the first boss. I leave it up to you to test it and give feedback.

Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 02, 2020, 05:31:16 pm
  Thank you! We've definitely been working with the hex code rather than recreating the ASM.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 02, 2020, 05:43:40 pm
I did just make a edit on the post. I made a patch where I disable the reads. You can change the health at PRG $1640f
(If you edit the ROM file then you need to add $10 to the offset since the PC ROM file has a header that is 16 byte long.)

Do you want me to make patches or do you like to learn how to do the change and find the health. I think if you read through careful and don't shy away from using a debugger you could do it. Seems like a good beginner task in this game.

TYI: Working with a hex-editor will not give you any insights what is going on. Sure it is easier to type some values but when it comes to understand something or changing code ASM is the way to go. At last patching from a ASM file and looking into it. Sometimes things are documented and can be changed very easy.

If you like I could make you a Boss ASM. Then you can change the value in the ASM file till you like them. Would you like that?
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 02, 2020, 09:26:28 pm
  Thank you! I haven't really learned how to use the Debugger yet, or translate that into Hex anyway. You're not the first person to tell me I need to get into that stuff.

  There is some room in the Virus ROM for extra code.

  The pirate boss in level 10 could maybe be faster? And take more hits for sure. It's too easy to just jump on his head at the top of the screen, which makes his barrel attacks and jumping pointless.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 03, 2020, 08:51:25 am
I released the patch here:

Also I will work on a ASM file for the bosses and see what I can come up with to make them more intressting. Just a thing to keep in mind the bosses may seem easy to you since you overplay the game. A good challenge for you might be unfair for others. This is the reason most people play hacks with a lot of savestate.

I will look into checkpoints and give the player more lifes, too counter increased the difficulty that might occur.

November 03, 2020, 04:25:47 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Here you will find a Boss ASM. Not done to much as mostly adding health and speed. I made it so you will restart at the boss to learn the pattern better.

You should be able to tweak it a bit yourself in the ASM file.

Also are you aware of the Cad editor. You could do some level editing too. Are you looking forward to that?
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 03, 2020, 08:54:50 pm
  The ASM files are very good, thanks for those. It looks like you made a bunch of changes - the Pirate and Skateboard bosses now put up a real fight, which is good!

   I guess I have to get into debugging to really do this sort of thing!

   While the new character select works well, it does change the palette of the UI, and of elements like the star balloons, hearts and puffs of smoke which used Buster Bunny's palette, which looks odd. (Dizzy Devil's tongue as well, I think.)

  The previous character select loaded Buster Bunny inbetween each character, and his palette. I'll stick with that for now.

  The solution is probably to always use Buster's palette on the character portraits. It'll look a little weird.

  Ideally I'd like to replace some of the music with tracks from Bio Miracle Bokkute Upa or other Konami games.

  I tried Cad Editor earlier on this hack, and used it to reposition some items/enemies.

  I used it only minimally, because I felt that I was making the levels worse. (It uses sets of 4 blocks which can lead to blockier levels. There is an existing Tiny Toons hack which used CadEditor heavily.) I was also breaking the levels by putting items/enemies in the wrong order, though I learned not to do that!

  Maybe I was being too cautious.

  Do you think it's possible to add win/loss animations to Virus, and a four-frame Odie animation?
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 04, 2020, 01:50:41 pm
Leaning the console will not happen over night. It is good learn the basic. CPU has a clock and it will go along the byte till some byte tells to jump or branch. Or something crazy like a routine. In a routine the current offset will get pushed into stuck memory and when a ReturnSubroutine byte is read it will pull this from stack and return.
It is good to understand the flow and have a idea for what data types you can find. Just chopping away something every time you work on something.

I did not look into if I could fix the palette rotation in a easy way. I did find it funny and did not mind that at all. It feels much better if you can just rotate between the characters.

What do you know about music on the NES? Did you do some famitracker stuff. Do you think you like to figure out the music format/engine for this game and start changing music? I did read of people that say it is not that hard but so far I have no idea what workflow goes into changing music. I think people build tools to make music for there game since without it seems very tidies.

Making levels is not a thing for everyone. It needs creativity and time. Sure the first thing you do will not be a picaso.

Making sprites and animation are straight forward in Virus. The OAM table is mapped on RAM. No rotation is used so you can just write bytes to it to draw sprites. Nesdev is the best reference I know of. Sure it is also hard to understand. A lot of things can be learned from the debugger and experimenting.


Last thing when you work on hacks have a folder with a backup history. When you make changes things will break and it is always frustration to redo stuff.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 04, 2020, 08:22:46 pm
I don't know much about changing music on the NES. I have heard it can be tricky, and I know it's not as common in hacks, but it would help these hacks certainly.

I would like to add these sprite animations to Virus. The sprites are already in the ROM and I can change them to the correct ones.

Dog win (12 sprites, 2 alternating positions to "jump")

Nurse win (16 sprites, same sprites as in regular gameplay repositioned for win)

Garfield throwing pill (needs 1 extra sprite for whiskers at 47)

Garfield loss (2 alternating frames of 15 sprites)

Odie loss (1 frame, probably 16 sprites, haven't accurately counted yet)

Odie run (4 alternating frames during regular gameplay, haven't accurately counted but about 20 sprites each. Pauses during win)
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 05, 2020, 12:32:22 am
Putting new sprites in the ROM is also the easy part. Since you are familiar with OAM now. Here is how the dog is drawn.

In the picture you can see that it will load the table from Ram $47 + the value in the y register. So the base value is at $47 and $48 and the offset (size of the sprite in y)

With mesen or FCEUX you can rightclick the value in the CPU bus and it will show you the PRG or ROM offset.

I did not see any animation beside the standard one. So you need to hijack where it does save the base pointer to $47,$48. Then look in RAM where it keeps track for conditions you like to put a different pointer there. Then you need to write the new sprite assembly for your pointer. You also need some code to control the speed of the animation.

Question is if you like to learn how to do this changes yourself of if you just like to borrow someones time to do it for you. I feel like you will not be experienced enough to do this changes for a while. There are easier tasks to get more familiar. But sure with the given information you can figure out the sprite format and draw me the two winning frames for OAM. Right?

Paste them below.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 05, 2020, 02:36:01 am
Well, changing sprites and background tiles is something I'm familiar with at this point. More advanced coding is not.

A neutral dog sprite appears at 1C1C.

A happy dog sprite would look like:

He could also jump out of his chair for the second frame, using the same tiles:
F6 BA 03 00 F6 BB 03 08 F6 BC 03 10 FE CA 03 00 FE CB 03 08 FE CC 03 10 06 DA 03 00 06 DB 03 08 06 DC 03 10 0E B7 03 00 0E B8 03 08 0E B9 03 10

Nurse sprite appears at 1C9F. With a palette change (and needing one tile redrawn) she'd be:


Moved up and to the right a bit during a win animation, she'd be:
F5 95 01 07 F5 96 01 0F FD A4 01 FF FD A5 01 07 FD A6 01 0F 05 B4 01 FF 05 B5 01 07 05 B6 01 0F 0D FF 01 FF 0D C5 01 07 0D C6 01 0F 15 D5 01 07 15 D6 01 0F 1D E5 01 07 1D E6 01 0F 25 F5 01 07 25 F6 01 0F

(I might want to change her leftmost sprites slightly for this also.)

Garfield's neutral sprite turns up at 1B9C, but needs an extra first tile as follows:
00 47 00 00 00 48 00 08 00 45 00 10 08 49 00 00 08 54 00 08 08 55 00 10 10 59 00 00 10 64 00 08 10 65 00 10 18 69 00 00 18 74 00 08 18 75 00 10 20 83 00 00 20 84 00 08 20 85 00 10

A two frame Garfield loss animation would look like:
00 3A 00 00 00 3B 00 08 00 45 00 10 08 4A 00 00 08 4B 00 08 08 4C 00 10 10 5A 00 00 10 5B 00 08 10 5C 00 10 18 6A 00 00 18 6B 00 08 18 6C 00 10 20 83 00 00 20 84 00 08 20 85 00 10

00 3A 00 00 00 30 00 08 00 45 00 10 08 31 00 00 08 32 00 08 08 4C 00 10 10 33 00 00 10 34 00 08 10 35 00 10 18 36 00 00 18 6B 00 08 18 37 00 10 20 83 00 00 20 84 00 08 20 85 00 10

Plus an Odie loss image.

00 BD 03 00 00 BE 03 08 00 BF 03 10 08 CD 03 00 08 CE 03 08 08 CF 03 10 10 DD 03 00 10 DE 03 08 18 DF 03 10 18 ED 03 00 18 EE 03 08 20 EF 03 10 20 EA 03 00 20 EB 03 08 28 FB 03 08 1A FA 03 18

I also wanted to add two sprites to this menu screen, for minor fixes.


Here's Odie's three running frames, which would cycle 1232 during gameplay, and pause on a win.
00 93 03 00 00 94 03 08 00 A3 03 10 08 3D 03 00 08 3E 03 08 08 3F 03 10 10 4F 03 10 10 4E 03 08 18 5F 03 10 18 5D 03 00 18 5E 03 08 20 6F 03 10 20 6D 03 00 20 6E 03 08 28 7F 03 10 28 7D 03 00 28 7E 03 08 20 EC 03 18 28 D8 03 18 08 D4 03 18 10 E4 03 18 18 D9 03 18

10 D7 03 00 08 C7 03 00 08 C8 03 08 08 C9 03 10 10 4F 03 10 10 4E 03 08 18 E9 03 10 18 E7 03 00 18 E8 03 08 20 F9 03 10 20 F7 03 00 20 F8 03 08 28 7C 03 10 28 7A 03 00 28 7B 03 08 08 D4 03 18 10 E4 03 18

00 93 03 00 00 94 03 08 00 A3 03 10 08 3D 03 00 08 3E 03 08 08 3F 03 10 10 4F 03 10 10 4E 03 08 18 5F 03 10 18 5D 03 00 18 5E 03 08 20 E3 03 10 20 B3 03 00 20 6E 03 08 28 F3 03 10 28 C3 03 00 28 C4 03 08 28 F4 03 18 08 D4 03 18 10 E4 03 18 18 D9 03 18
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 05, 2020, 11:23:24 pm
Ohh nice job on the assembly.

I started writing a ASM file for you. Will try to expand the tables and write the needed code.
Meanwhile a fun thing to do. Use the memory viewer in mesen and freez Ram $53 while the game is in pause (paws) mod.

Then type the number $00 till $13 at the frozen offset. Like this you can take a closer look at the sprites you are interested to change. (Tell me what you see at $47 and $48)

I expanded the table so far. Now I need to find hijack points and make the animation and sprites on the right spot. Still some work.
Here the result of the assembly you send me. Still needs error checking it seems.

If you like to have a look how to expand tables you might hold on to your rubber ducky as they tend to fly away when you are new to coding. But once you named things right you don't need to worry about calculating offsets. Just drag it around. Like drag it to some empty space and add as many sprites you like.
--Deleted-- (There is a finished version)

Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 06, 2020, 08:53:56 pm
 Thank you! Let me look into this a bit.

 Odie and losing Garfield look right! Not sure why the nurse and dog code is scattered like that, as it definitely works as posted, within the ROM.

 I'd also suggested an extra first tile for Garfield's neutral sprite:
00 47 00 00 00 48 00 08 00 45 00 10 08 49 00 00 08 54 00 08 08 55 00 10 10 59 00 00 10 64 00 08 10 65 00 10 18 69 00 00 18 74 00 08 18 75 00 10 20 83 00 00 20 84 00 08 20 85 00 10
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 07, 2020, 01:17:36 am
I added a animation when Garfield looses. Also a happy dog frame when the Viruses are defeated.

There is a patch for the VirusBeta game to try it out. The Make.bat is to patch the current DrGarfild hack! The code should explain very well how to go about it. I think from here on it could be a good training field for you. Wish you much luck to add more things to the game. May be a little menu to enable the Tetris music in the options could be a good task.

Or just go about the Odie animation in the pause screen. I am not sure if you can fit them on the playscreen. There is some space in OAM but you use also 8x8 config not the more usual 8x16 sprite assembly so it is hared to fit that many sprites at once.

If you think you can't add a sprite yourself to the menu screen. There are sprites on that screen and it is also a good task to learn how to do a hijack to put some code yourself. This is a good training field to sharpen your skills.

I did add some animation to the pause screen if you need a idea how to go about that. In the pause screen you could use the black BG as a color and make eyes white. When you rework the sprite/assembly a bit I think it would just fit into the main game.
Code: [Select]
JSR $8603 //FixHijack

lda $43 //Load Framecounter branch every $10th frame
and #$0f
bne LoadOdieFrame

lda $770 //CheckFrame
bne count
lda #$03 //Reset Counter
sta $770

dec $770 //free location in Ram

ldy $770
lda OdieFrameTable,y

sta $53
JSR $8603 //Jump to draw routine.. well here it could be cool to do something yourelf so the dog is animated and moves around the screen.

db $1d,$1b,$1c,$1d
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 07, 2020, 10:08:15 am
I can't thank you enough for this work, and I am very grateful.

I have made some minor corrections and uploaded the patch here for now:

I respect that you are trying to teach me how to do this rather than do everything, and the ASM files are understandable to an extent, but I really have no idea how to "add more things to the game," which you clearly do. I really don't know how to do this at this point, and if possible I need more assistance.

Odie running looks really good! Thank you!

I wonder if the pause screen can be made blue, so that Odie's animation would show up better. I don't really have an extra palette to rework his colors (unless the pause screen loads one).

Made changes to Odie's sprite positions. ("So the dog is animated and moves around the screen" would be great if I knew what I was doing.)

I think the nurse is in the sprite list three times now, one duplicate, then with a different position, for the Win Animation. (unused)

The Happy Dog I think is in there twice, for the win animation (second part unused, would like to use).

Garfield's loss animation moves slowly, and could be faster. Could also add Odie loss?

I noticed that in the ROM around 1BE0 are sprites for the menu. I'd like to add two tiles to Jon.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 07, 2020, 06:06:12 pm
I added a bunch of things. This does bring the problem that the main.asm does get harder to understand. I mean this is still hacking and you need to smash yourself into the code sometimes. I am also not the best coder and documenting properly is hard for me.. Sure you might not be able to make the product you like yet but when you keep on it you could do a lot of things. Coding is not magic but usually a huge time waster. Just keep curving at it.

I let you discover what is new.

I did see you like to make a HD back. Good thing I added the music select so you can hack you OGGs in somehow.
I feel I am done with the project.
The sprite to the title screen is added. I feel this should be a example enough to learn from.
If you like you can really go ham and make a other mini game in the pause screen. Just check it out what I did so far.

Since you mention the menu sprite assembly and the location it becomes obvious you did not understand my examples. Like you did never tell me what you can read at $47 and $48 when you freez $13.. Yes you can read all the pointers (locations) even the expanded ones of the sprite assembly.
The locations are named and keep track of in a DataWord table (dw) in my file. I know I might throw a lot of stuff at you but don't feel in a hurry to answer fast. It is up to you to learn things you don't understand. In the future I like to get specific questions that help you to solve the problem. Since saying I can't is a horrible attitude that will get you away of many chances to try things. Believe me it is not easy for me either.

The assembly of the nurse is not the same as the position is changed. The original does fit best I replaced it with the new one that comes close I did it since I like the skin color better but did not bother to fix it.

Here a other view to OAM table. I think this should tell you enough. I really hope you started to make use of the debugger rather then some hex editor. You can save your changes as IPS right from the debug menu if you did not know. I recommend to learn the memory mapping if you are still not sure how things pop up in the CPU bus. May be learn about some registers too. In my file is a hardcoded section where I write the odie losing frame to it. I think you will manage to put other things there too.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 08, 2020, 11:57:21 am
This is really wonderful work, thank you.

Pretty much done.

I don't see that heart graphic on the Jon menu screen, but I think I see some offscreen (80) pill graphics? I can't find it in the ROM though to hex edit.

Is that from "sta $280,x?" I could experiment with the ASM?

I want to add sprites 68 and 78 to Jon. Not sure where to do it.
2A 68 03 AE 3B 78 01 BA

I would speed up the Happy Dog animation, and switch the Nurse to the higher position when the Dog is happy.

The music plays at double speed, I think the ROM is just like that!

I originally made this as an HDpack test. I didn't know you could change music in an HDpack; that's interesting!

I can sort of follow what you're doing in the ASM file but not enough to write more.

I did make some changes to the ASM file with graphics and palettes, since I've already been doing that in hex.

I uploaded the IPS and ASM here.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 08, 2020, 01:30:38 pm
I am sorry when I sound a bit harsh but I just have other projects I like to go after. Probably should say this to myself that I don't need to hurry here. I really like what you did with the prototype so far. Very nice work!
Also I try to keep you engaged with the project. Yes Mesen can play back .ogg files when you disable the music and write the music ID to the Sound register. This is documented on the mesen web page. In the hiris file you need to define the IDs and link it. I do have some interest to keep going with the project for some personal reason.. do some variation of it for a frind..

Anyway you pointed on the right spot:
Code: [Select]
//-------------------------------- Menu Screen --------------------------------//


ldx #$ff //Set Start X offset 00
lda OdieLose,x //Adding the old nurs to the menu
sta $280,x //Hardcoded sprite load
cmp #$ff
bne KeepLoading

ldx #$fc //Start offsetSprite 00
ldy #$10

lda #$08 //Amount to move it down Sprite xPos

adc $280,x
sta $280,x

bne UpdateOffset

This will load odies assembly and write it to OAM. In the picture I did freeze some memory in OAM and wrote the values to it. I was hoping you could pick up this example and redo it on your end. It will give you a idea how it works.

Once you know what needs to happen you can start to think how code could be written to do things. For a smaller project you can toy and gove around. If you go for bigger things you better whiteboard the things that needs to happen and try to organize the stuff that needs to happen.

Writing some values to OAM could be done with LDA #$XX STA XX if this is all you know.

I was thinking to add some more logic to the paws screen. May be a other sprite that does run from the sprite you control. May be add some code to flip odies sprite when you turn. May be have some Easter-Egg if you catch some sprites and leave the screen. On this point this are good exercises for me too. Thinking about how to code some small game logic. I just started other projects I am very eager to continue so may be for the best to give you some time with it.

#about the code..
You see I had the nurse first.. never fixed the documentation. You can delete the offset stuff and then you see that the sprite is not on screen anymore. In theory you could also edit the assembly to fix that. The pause screen is very good to edit sprites. Just freez $13 and put the ID of the sprite you like to edit.
If you have not done it just freez OAM and write stuff in it. When you try to understand code put a breakpoint on the beginning of a routine and step it through. Hover over opcode to see what they do.. also look up resources online there are many good once that tell you stuff better then I could.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 08, 2020, 06:19:50 pm
  Extra sprites on Jon menu would be

2A 68 03 AE 3B 78 01 BA

   in CPU memory. Not sure what that is in ASM, or where in the ROM you'd put it.

  Don't really want Losing Odie on the screen but he should be in the ROM somewhere.

   If you want to expand the Odie pause screen into a minigame with a loss state, there's about 10 blank tiles that I could turn into an enemy sprite, maybe 9 tiles with a two-frame walk cycle (or you could switch to a different bank). The virus and pill sprites are also still present. Maybe a background with color tiles he can and can't walk on (or that affect him).
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 09, 2020, 01:00:39 pm
Just to be clear my minigame will be nothing like this.

I had in mind to let some pills fall you can catch. When you have enough it would load a different palette or something. I don't wanna go crazy on it. I would like to do a HD pack with music for it.

My idea was that you change odies sprite to just cover the things on screen you like. I am not sure how you made sprit assembly before. I do this while the game is running. Then I see the changes I do in the ROM on screen and it becomes easy to draw. It is not hard to just add more sprite assembly code. Will see if I find a place for the odie loosing frame. Guess will keep working on it a bit. I did will check if I could find a fix for the Tetris music

Update: your assembly makes no sense. What do you try to fix?
I fixed the eye so far.

Also named the menu properly so it make more sense. And yes if you put garfield in a row then there are to many sprites in that row.
I slow the music down with just running the routine every other frame and make it customizable.

Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 10, 2020, 12:35:38 am
   Lumpy's Dr. Garfield is violent! A bad cat. I do not understand.

   The one thing in this ROM that he drew is the Happy Viruses.

   I used the (not animated) Dr Mario viruses on the title screen, but was tempted to use something like his.

   He drew (?) a different Odie sprite when Garfield is killing Lyman.

   His video has the little problem where Garfield's whiskers aren't there when he throws the pills. Guess he didn't notice.

   "This may sting a little" also made it into this ad:

   This was the original video:

   I used Shiru's NES Screen Tool to assemble the metasprites.

   There is room to make an enemy sprite for Odie.

   I added a little animation to 2 player mode also.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 10, 2020, 01:55:52 am
I think you could animate a lot since CHR swapping is used in the screens. But it is nice to have the screen not to busy.
In theory you could expand CHR and make the animation smother. At the same time it is a lot of work to draw all that. The coding part should not be to hard for this.

I think I will skip the minigame idea. It is a lot of work to code all that. I made the music customizable.
I also added a resource file for Tilemolester. It has some bookmarks for palettes what might help to insert things quick.


Next thing will be music for a potential HD pack for mesen.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 10, 2020, 02:48:26 am
   Nice, but, you undid all my changes. Should I redo those? I had made many changes to the ASM. (Fixed spelling and graphics and palettes.)

   We are using a different ROM (CHR graphics) also, I'll DM you.

   HDPack could also add a new background image to the title screen.

   I would still like a faster dog win animation, with the different-positioned nurse.

   Also this on Jon menu:   2A 68 03 AE 3B 78 01 BA
(I don't know how I'd write this in ASM)

   What other CHR animation would you want? Could use the Dr. Mario virus animations on title screen.

   I couldn't animate much in 2 player mode because I'd mostly run out of background tiles in 1 player mode. But I animated a Garfield.

   Slower music is great. Don't need to be selectable, should just be at speed 1 all the time. But that's fine. (Could still say "Lasagna level / mondays")

   Don't need to spell out "Garfield" for difficulty, GARF. fits?  (Although GARFIELD is 8 sprites and could fit on one line)

Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 10, 2020, 06:03:00 pm
I did not see any changes in your ASM you shared probably best you change them since I just waste time looking for it.. The file you shared had no palettes or graphics added anyway. It is true that it is hard to work together without any source control. I did add the graphics of the ROM then I could also see that you liked to change hair on the Titlescreen. Beside I keep using the ROM hack posted on RHDN.

Garfield + arrow is 9 tiles

I don't want to add more animation. At the end of the ASM you find routines you can feed the CHR bank number at any time and it will change Tiles and Sprite bank in the Title screen. Feel free to knock yourself out with that.

Since you showed me Tile assembly I did assume you are able to find them and edit. What are you confused with? Since this ROM has no PRG switching the CPU offset is the same as you find it in the file. I think you figured that org will give the offset from where to assemble into the ROM. Why I have to ask you what you don't understand. I can't do it in ASM is not a question..
I am not familiar with the NES screen tool. I am sorry when you had tools on your hand to do changes that I am not aware off. It is always good to share resources and tell about workflow to get a idea what the other one is doing. For me you know I use a debugger and a assembly patcher. Also TM for graphic patching.

I fixed the things I could find. I changed the palette of the nurse back. By now I think some more contrast fits well there.

Sure you could go ond finding things to fix. Like this here:

Update: I did see the changes in the file you shared in my inbox. I am not sure if I am a fan of the jumpy animation. Sure the green is not perfect but blue is also a cold color again. Green reminds more of a grass field. But this are personal preferences. Take what you like. I think it should not take you much time to copy the changes you made over.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 11, 2020, 05:49:18 am
 I've messaged you privately. The ASM no longer works right for me, I think. But I've made my changes in it.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 11, 2020, 06:55:01 pm
I think you are aware that offset may change over time. Finding better hijacks or do shifts so make sure to roll back the ROM you are keep patching. Or do you mean just the sprite assembly? First you need to be careful to use the same amount of space as long you are not patching into open space. Then you need to be aware that after drawing a tile the routine will check if the value is $FF. When yes it will leave the sprite drawing to OAM.
You can clearly see that you did not draw the last tile fully. Ypos,ID,SpOrAtribut,Xpos it needs to be a multiple of 4.

Current to do:
- Port your palette.
- Make the Nurse white again.
- What did you mean with spelling??
- I think we skip the jumpy animation??

- HD pack music replacement.
- clean up unused CHR banks?
- Fixing two player screen win counter player1
- Fixing two player Music and play win music.
- Extending pause screen to mini game.
- Losing Frame for Dog/Nurse
- Title Screen Bank animation. (Just very little code is needed to rotate some banks. May be I set them up Extend CHR)
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 11, 2020, 11:36:12 pm
  Thank you.

 Please don't undo my changes, please just work from my ASM this time, it took a long time to make that, twice.

- What did you mean with spelling?
I corrected the spelling of many words in the ASM. (Garfield for 'Garild' etc)

- I think we skip the jumpy animation?
That's how I wanted it.

  Title screen wouldn't need bankswitching animation for dancing viruses, I think there's room in the CHR already. Unless you mean bankswitching the background.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 12, 2020, 08:03:05 pm
I don't undo your changes. Incorporating your work when you share a file I am supposed to fix means a lot of additional work. Sure I can grab things from it when you tell me what you did!

Replacing a word like garfild (I did never spell garild) with garfield is a matter of seconds with a text replacement tool. I did find out how to spell it as I looked it up when I made the hard difficulty available. I apricate if you like to improve my spelling skills. Just as a waring I could never spell properly in any language. Also it seems to be a waste of time since I my forget about things after a short time not using some words.. But I gladly fix spelling issues if they seem to distract you to mess with the code.

I also do not know what you been doing may be you experimented (what I hope you did) Finding bugs of someone else can be a pain! I did tell you that we don't haver version control.

When posting a version I keep working on my files. I think I invested a hell lot of work to research and do the proper hijacks. On your side I see little interest following my examples and having a conversation where I feel I teach you something. Sure I do love the artwork you put in but your workflow gives question. Like why is the tile set a f*** mess. When I see something like that I would start over. May be it is because of this screen tools. Sure it seems to be a problem when you like to do bank animations. This is why I said you can knock yourself out. Sure I also like to move on with other stuff..

I think you can get away with a jumpy animation when it is something you will not focus on. Like decoration. But for something you can control it feels weird and broken. If you like him to jump then you should add a jump. We don't wanna play glitchdog, as I was moving him over the place and I basted out lathing since I did think it is bad in this setting.. I do think this should stay like this.


In the main game on the corner it looks cute as a little companion. But there are not enough tiles to draw a large sprite like this.


May be you like broken things and we combine pause screen and main game. Will be a hell lot of a confusing mess. This will just replace the other Dog by removing one rts before pause screen.


I did set up CHR switching in the last asm I shared. Sure there been bugs and needed some code but nothing complicated. Sure there could be questions how the register work and I did include a document that could tell this in a clean way.. since I do also mostly experiment with it till I get it working.

I will set up banks for animation. I guess you just need the Sprites (viruses) Could also do both (Garfield tiles too).
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 13, 2020, 09:02:37 am

You do really great work, but if I spend a lot of time making changes and you keep reverting them, I don't know what to do, other than wait and let you do whatever it is you're doing.

Because you're not letting me make changes.

I guess I'll make changes when you're done. I am paying attention to what you're doing. I understand some of it.

I like the new Odie. Let me know what you need from me (more art or whatever). There is probably room for one more character.

If you need two or three or four more tiles to draw Odie on the gameplay screen, maybe you can remove some tiles from the Nurse where she's behind the Dog.

If you mean that the title screen CHR banks are confusing, I was using every possible tile. I think they're in order. It would be hard to do animation of that but not impossible.

Some banks (with the dancing viruses) I hadn't used yet.

I would like to add HDPacks music to Dr Garfield and Heathcliff. I am curious to see the method.

I would like to add two tiles to "Hamton" scene in Heathcliff as follows.

Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 13, 2020, 07:44:33 pm
I will not explain again that I don't reverse changes. I did incorporate your work like tile mapping, palettes or code if I had found any. I have not seen any changes. I would recommend to use a notepad++. You find the word replacement tool when pressing CTRL + H. I hope this will save you time in the future. May be you find some assembly syntax highlighting to make it look nicer too.  I even accidently started and kept patching one of you versions what did case bugs while testing for my final release here. Anyway the IPS files work fine as they go from the prototype. (Bug is Fixed)

This uses every tile too and it is intuitive. Does not take much time to arrange it. Like this you can optimize the tileset better. If you did not use a tool to make spaghetti tile arrangement I will have very little understanding for it. Make groups of tiles and fill obvious tiles into single places so they are easy to spot that easy. Or optimize it to use less space in the first place.

I did rework your palette a bit to set a contrast to the normal game in pause mode. The darker blue will make the scene calm.
There been other touchups for assembly, code arrangement, bugfixing, adding features making it more readable testing, researching more things.. (adding notes that should help to understadn the code. Fixing wrong assumptions..)  I don't think it makes sense to point it out as you like to grab my file instead of taking what you like and put it in your file. Sure I look at yours.. even pointed out what I did or did not like about it and why.

I did make the HDpack but just for music replacement. Works as the normal MesenHD pack stuff. There is also a readme.

The normal patch has two empty banks rotating like (1232...) for the title screen. If you like to add animation for bg tiles you need to expand CHR what should be easy too.

For the Tinny Toon stuff.
When you like to make changes to bg tiles you like to change what goes into the Nametable of the PPU. Put a breakpoint for write on it. If you are confused how to write to the PPU look at how I moved the palettes. This is a clean routine how it can be done and it will be very similar. NesDev wiki is your fiend too.

Wish you much luck with the project to do all this changes yourself. I will not bother you anymore no worry. I am sorry if I got annoyed towards the end of this thread. I like your intensions and your work but does not go along with how I like to work very well. Sometimes it is about finding the right buddy where things click together nicely.

Also nice improvement changing Garfield to Garf. Sure when everyone calls music menu to Mondays and Music speed lasagne it will make perfect sense. I did think lasagne for the menu makes some sense and is even funny to some extend since there is nothing else on Garfields menu.. also I did not know Nerm as I only read some Garfield comix.. I did confuse it for normal. Do not expect that things that make sense to you make sense for everyone.

It was really easy to find the tile mapping data right? What I did not tell you is that here you will encounter compression. You don't need coding experience to solve it. In this case it is about understanding the controll byte that tell the routine what to do. Have fun figuring it all out. May be you can optimize it to squish it in or you find space to move the table.. or use the a other routine to draw it in.. many options.

Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 17, 2020, 11:48:01 am
Your work is excellent of course, and has introduced many new ideas to me. Some of which I've understood.

It's just been very difficult to communicate. We're not understanding each other, or listening at all.

Thank you though.

I have sent you a final (I think) Dr Garfield ROM, via PM. I've made all my changes again for the tenth time or so.

The HDPack ZIP is corrupted I think, it caused a lot of problems on my hard drive.

I've sent a different one with my intended music.

I've gone ahead and created a visual HDpack also, check it out!

I've also added Game Boy and Game Boy color ports. (Basic, at this point, as I don't know how to work with palettes on GBC.)

You included a patch which makes the HDPack music work. This undoes my changes so I have one final request- I need a patch which JUST makes the HDPack music work, from an already-hacked ROM.

Can this be done via hires.txt instead somehow, or is the patch absolutely needed?

Is there any more information about how this is done that I might be able to understand?

Can we also add new HDpack background PNGs on title and menu, replacing them as they are now?
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 17, 2020, 08:48:02 pm
I put a lot of hashtags where the changes for the HD music are. Also link to the HDpack documentation is there. Yes this part needs a little code. I leave this change up to you from her are on. Just delete the code that is overwriting your changes. Or put your changes in the code.. The best option for you would be to write this part yourself. Start fresh. Make some code that does write to HDpack music ports.

I tested my files and they seem to work well. No idea how your corruption could look like. Trouble reading the files? I did see track 07 file is broken. May be you did mean that.

Code: [Select]
lda $f5 //denoice selection. Make it just work when a button is pressed
and #$c0
beq Lasagne2NoIncrementSpeed
lda $705
bne $03
inc $4101       //This here will mute on track $00
sta $4105
// cmp #$0c        //**found this as I posted here..
// bne $03 
// inc $4101 //Mute.. This is done above just forgot to delete it. This also never run since the value we check for is to high
//Music does not loop for some reason. Donno why jet..

lda #$ff //Volume Full Blast
sta $4102
JSR $E583 //FixMusik Lunch?
// lda $706 //Used for Musik speed. A now increment mode could be nice so it still could be added.
// sta $723

Here some more info if you look for a tool to create HD pack.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 18, 2020, 12:17:00 pm
  I just want a patch that enables the HDPack music. It's done otherwise.

  Current ASM file for HDPacks music reverts the title screen and many other things.

  I was making small changes in a hex editor, and with tools designed to help with that (like NES Screen Tool. YY-CHR and I-CHR). I've never used a Debugger or written assembly code.

  You wrote a 23 page document in a language I don't understand, and made small mistakes like giving the dog six legs.

  I did make changes to this, graphical stuff which I would normally have done in hex. You undid my changes every time. It took me hours every time.

  Now I can't change anything because if I break anything in those 23 pages it breaks the ROM.

  I created new code and graphics for the title screen when you added bankswitching. I created HDPack graphics, and ports for the Game Boy and Game Boy color.

  Ideally I'd just want a patch for:

-HDPack music support / Looping Music (set byte flag on 4100)

-Custom palettes on the title screen

-HDPack background support on title and menu? It looks like people set conditions for these.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: Cyneprepou4uk on November 18, 2020, 04:01:40 pm
Nice job ruining that kid's life with your asm, bogaa  >:D
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 18, 2020, 06:03:12 pm
I did not have the intention to make some life hell. I am not that good at 6502 assembly and I see how the document can be confusing. Still the document has many good spots to learn some ASM and I did document it so it should be clear what stuff does. I am not lathing but I am not a free coder that like spoon-feeding every bit of information.

If you wonder why I dropped help.. I had like to pick up discussion where you would write a bit of code and I had like to teach where to find info to get better at it. May be make it your own or start your own and take things you like to play with and learn.. I know how time consuming this processes can be. But instead we go for the following..
You referring to your changes what are they? The sprite assembly for Odie in the pause screen? I did explain how to read the pointers in pause screen. I arrange them in the hex editor of the debugger. Copy paste them over and replace the whitespaces with ,$ in the process.
I do not understand what you do or what exactly gives you so much work. Copy/Paste a lot of work for you? Sure it becomes apparent when I see you are patching ROMS you been working on or do not know how to keep track where you need to make changes. I think you want me to copy your changes over into the ASM. I told you that I am not a fan of the jumpy animation or the Mondays menu. Still I added them but also made the assembly small so it would fit into main game.. dropped it documented it out with "//" I did leave it in for you.. what does not help you.. probably even makes you angry.

If you don't see this as a opportunity to jump into debugging and learning to code I just wasted my time. If I would continue I see the speed of the Titlescreen animation as a problem. Looks goofy. Sure there are different opinions. But a good task to get into messing with code.

Probably will stop responding to this thread soon. If you are not able to learn form examples may be you find someone else to spoon-feed more or work for you. I leave a question to answer about Mesen HDpack music.
What does this do?
lda #$01
sta $4105

And what will the hiris.txt need to make it play music.
You are right about conditions. I would still need to learn that part too properly. I think a condition can be based on a tile that is on screen. If you think this are easy things to do you show me a example. Once I learn how and you still did not figure it out I probably make it for you.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 18, 2020, 06:15:12 pm
  I just want the HDPacks music turned on at this point, without undoing all my changes and involving the entire ASM file. I've spent days trying to fix it.

  Current ASM file for HDPacks music reverts the title screen and many other things.

  I would have to understand your 23 pages of ASM, and be able to edit it without breaking the ROM, when I've never done Assembly.

  I fixed the bulldog, the nurse, Odie, the whiskers, the viruses, the title screen, the menus, the spelling. You unfixed it.

  I have been asking you to stop reverting my changes, or make changes in a way that I can port to the release ROM.

  If I wanted to experiment with ASM I still could, but the game is one step from being finished and releasable.

   The ASM file stopped working for me, as it seems to be patching the Nurse to the wrong position in the ROM and so on (this is still true in your revisions). So I have to make hundreds of corrections to the hex code directly.

  You've made this complicated. I'm just trying to incorporate both your work and mine so I have a finished releasable ROM.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 19, 2020, 05:27:17 am
I am sorry I tried to help you. I did start porting things you mentioned over. Like the Wining frame for the Nurse. I did bring the animation for the Titlescreen in the right order (did you mean that with Viruses?..). I copy pasted the Odie sprite assembly. I donno what whiskers are.. I did what I could find. Now I have enough from your harassment and accusation. I can't work with you. I did not bother sharing the ASM yet. May be the V1.8 patches have enough changes so you are happy? Sure I learned my lesion not to help anymore.

Good bye

Yes I did not see a reason to use your ASM since you said it stopped working... I copied things over..
The Nurse winning frame is loaded here:
Code: [Select]
lda $a4
beq WinNurseFrame
lda #$16
bpl NormalNurseFrame
lda #$17 //WinFrame <- <-
sta $53
JSR $8603    //FixHijack

The assembly pointers are in the only word table in the document. I already feel sorry again to try explain things you did not ask for.. This are no riddles.. I am really sorry I tried to help.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 19, 2020, 06:17:15 am
  UPDATE: I've fixed it now, based on the 1.8 IPS patch, which was closer to what's needed. Will do a little more work before release.

  Again, I just asked for a patch that turns the HDPacks music on, and nothing else.

  I have a version of the ROM I'm happy with otherwise. I thought you were finished and I made all my changes, again.

  Your new IPS is close enough but still has some of the same old errors like the six-legged dog.


  Your new HDPack IPS is close enough though! I'll admit that. I can make a few small graphics and HDPack-related changes and be done.

  UPDATE: I've fixed it now, based on your current patch. Will do a little more work before release.

  The previous HDPack IPS messed with the title screen's bankswitching and I couldn't fix that, I kept breaking the ROM graphically.

  I'm not ready to learn the rest of this yet.

  (Your HDpack ZIP still crashes my PC, I think Track 7 is corrupt in particular. I'm using different music anyway, it's fine.)

  The music does need to loop; I'm trying to add
   lda $01
        sta $4100
or A5018D0041
  which gets it going in one of your older ASMs (which is all I have). Not sure where to add that without breaking the ROM though. So I just overwrote some of the other music logic with this (I think it was a mute command at $4105). Seems to work all right though.

   I also figured out conditions to add backgrounds. Basic format is something like:

  Where tileAtPosition or spriteAtPosition is followed by x and y position (checkable in Photoshop), tile number and palette (as output from right-clicking in Mesen's PPU).

  Uploading final (?) version here.
http://www.mediafire. com/file/sk2m74i2m6nk0mx/

Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 19, 2020, 05:26:58 pm
I updated the ASM. Also updated the dogs happy frame. A new HDMusic ASM file is added. Just started new and it is based on the hack. It does depend on some stuff. Also muting the normal music does not allow for modifications in that region freely after.

Wish you much luck with your projects. Also you really do stress me out with your attitude. Writing me this takes me 2 minutes. I had to think how to go about it too. I did make a new hijack.. I will not be able to mod my other ASM free like this. I did think of possible solutions.. but could not find any. I am not a fast coder or good at it. The files are a results of many hours on the debugger. I hope you find free time to experiment too sometimes.

Also if you like to load  a value you do immediate
lda #$xx    //(a9 xx)
Otherwise you load the value on address xx.

Here this is a gift from Cyneprepou4uk

If you are still interested to hear how bad this experience for me was. First you sidetracked me here to help you. I made examples on how to look up things and do changes. But you been not able to pick it up.

Then you been making changes to (I guess) sprite assembly and probably edited them into my ASM by typing, along fixing my spelling what seemed to be a pain to do over and over for sure.. Then forcing me to use this file while I was adding other stuff already. You been not able to communicate. What you need for your hack nor been you be able to use my files to help you do what you like. Since you been harassing me with accusation I do not listen I should use your file I only need this and that. Would a version control like git made it easier for you? Do you use git for anything?

It was just the point where I know I can not work with you since you been just a pain for me. I am not willing to break down how to do every task to explain it till you understand it. I am very well aware that my workflow did get in the way how you are used to do things and I am stopping you from being able to hack in that sense.

It seems you have very little respect from work you can't do and you think it is magic that a coder can just perform to make things happen. Just enable your ASM skills you can do it yourself that easy. Think about it. You are probably much better then me anyway once you get going.

I did try to show examples how to do things with buttons in my code and other great things that can be learned when doing a tutorial like NerdyNight. My example might not been as great but close to your field of interest. Not sure if nerdynight is up again here would be my backup of it.

About 20 pages of ASM.. Mad? Some was copied from a debugger to understand a existing routine better. It is ment to be used along the debugger. It will help to keep track of things you been doing. Once you have a org $xxxx //freespace you need to work on a hijack and link there so you are able to write things freely. Otherwise other code always gets in your way and you can't do anything. Yes writing new code can be painful till you get it to work.

I also like to point out that I respect your work and hacking and you devotion for garfield. It happens a lot that threads become more about humans differences then hacking itself. I hope I did not burn any desire to get deeper into hacking but showed a glimpse what it can be about.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 20, 2020, 10:33:13 am
I'm aware that this work is difficult. That's why I was having trouble editing your code in full without causing issues, especially without any experience at all in ASM.

"You been not able to communicate"

I've already said what I have to say about this. I've moved on.

I'd like to have 1-player mode and 2-player mode use different graphic banks. This frees up a few extra tiles for a background Odie (and Nermal?). That might be a pretty small change in the code, so I could look into that.

There was a test where Odie was onscreen as sprites during actual gameplay, but was missing tiles. Some of Odie could be moved to the background to make this work.

Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 20, 2020, 01:55:51 pm
True assembly is bare metal coding it can be/is confusing specially if you don't understand the hardware it is build on. At the same time the MOS CPUs have a very simple instruction set. On the NES they did really cut down costs where the chip has no functional decimal mode at all beside some more extra flags it does nothing. What makes it even harder to code some stuff. The PPU with his name table arrangement can be a pain to learn too. Also how to access it and when. But once you know what a NMI does and you wrote some lines of code you know why people call it simple.

CHR Bank switching is indeed not code heavy.

Odie in the main game is that junk of code that is documented out. I did cut the assembly to the size so it could be done without extra amounts of work.

I been not able to communicate. Yes. As I said it is not a project I am interested in and I move to other things. Fare wall my friend. Was a good journey where I did learn some stuff myself and how to communicate things better in the future.

A other idea instead going after cosmetics in a game would be to give a puzzle game new elements. Like a super virus that can move so you need block him to give it his medicine. Sure there are simpler and probably better things to go after. For me it feels it is to hard to make good combos in the game. Since they feel good. I am much more of a tertris guy.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 20, 2020, 04:21:44 pm
  Aside from uncommenting it I don't really know how to enable Odie Animation Main Game either. I assume it needs to be a subroutine called from somewhere as JSR, with an RTS at the end.

 "Removing one RTS before pause screen" perhaps. Bogaa said that earlier and that was my best guess for how to handle this as well.

  UPDATE: Yes, removing one RTS before the pause screen (from the displaying Nurse) seems to work.

  Odie is functional during 1P gameplay now. I'm still working on aesthetics since he now has color issues. This has required some new/tweaked graphics and metasprite assembly. I'm using up the remaining blank sprite tiles for some variations on Odie, and will change his assembly during Pause also.

  I'm still low on background tiles. I need about five tiles for this and there are no blanks left. I've stolen some tiles from the nurse scene and tweaked the nametable. It won't look that different.

  To free up some tiles I would like to change the CHR banks used in 2P mode.

UPDATE:  Didn't do the bankswitching, but did get Odie working, with minor visual compromises that don't spoil the effect.

Odie loss frame is not yet implemented, or left-facing Odie, and music stops after every round in 2P mode.

The HDPacks Music ASM is now not working again, as it's overwriting the wrong code. I'll have to look into that again.

UPDATE: Yeah, once again I don't know how to fix this music code. It breaks everything.

UPDATE: I think I finally got the HDPack music working again. Will redo the HDPack graphics and this should be releasable. Hope I didn't break the code.

Hm, spoke too soon, something odd with the Music code. It's reacting to every button press on the menu, whether it's music related or not. It's not impossible to choose your music, if it's the last thing you do, or if you choose one behind, but it's more fiddly than it should be.

Will try again.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 20, 2020, 08:59:50 pm
Yes the Odie in Main game can be run with "NewAnimationsDog:" Subroutine it works well for me like this.

I been here since I discovered a bug in the new HDpack ASM that does only overwrite stuff to mute music. I pulled the stuck in the wrong order what messed up the main game. I fixed that and it should work fine now.

For bank switching you don't need to mess with the PPU. PPU register info:
would not recommend to start with that when new to coding.

I commented where some of the Bankswap routines are in the hijack section. At the end I made a example how this routine looks like. There are more info about it in the mapper document in the resource folder. (The mapper handle PRG and CHR banks. If the CHR bank is RAM you can write to it too..)

JSR $9F63           //Jump Register Routine.    //9f3b,9f4f=BG tiles?,9f63,9f77 Routines ??
Here I only documented CPU offsets of different routines that do things with the mapper register. Like CHR swapping.

Repost of DropboxLink:
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 22, 2020, 11:01:30 pm
Submitted version 18 to RHDN, which contains Odie during gameplay and some expansions to the HDPacks.


As noted, I kind of got the HDPacks version working but there is some missing code compared to version 17 (that there doesn't seem to be room for). That version is now very wonky when selecting music on the menu screen. It basically has to be done last, since the code responds to each button press, even the not music related ones. So the music is always jumping forward by one on non-music line items, or taking two button presses to register on the music line. It's odd.

UPDATE: I went back to an older, more complete version of Dr Garfield's code by Bogaa, made some changes and compiled it. I think it worked this time, for what I want with the HDPack music.

It'll need fixes but I think I got the music stuff working again.

I'm still not sure about adding (theoretical) bankswitching to different CHR background banks in 2P mode, though at least that's not necessary for the thing to function. The HDPack does simulate this already by including more characters in the backgrounds.

A Dr. Mario AI which would almost certainly have to be rewritten to work with this ROM.

Dr. Mario virus placement discussion here:

UPDATE: Made some further minor fixes. Music menu works correctly again, some fixes to Odie, etc. Submitted as version 19.

Did not figure out how to implement different BG bankswitching in 2P mode, though I see the code that does it.

Hardware tests.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 24, 2020, 11:05:31 pm
Would be interesting to hear where you got suck when implementing CHR switching in 2P mode.
RAM Offset $727 will keep track what mode is selected. You can change it while playing to see and guess what code is running. When you have a breakpoint on read on it. Then you could be able to figure out where to hijack. Not sure on your progress on coding but could be a good field to experiment.

If you look for some coding practice and you like to learn about branches. IIRC The menu only checks if a button is pressed and runs everything music related (only hihjack to add music lunching in the first place). A extra check if a music options is selected would make it feel properly coded. This would require you to find the value that keeps track of the options and will need you to add the code that will skip to the end when the desired option is not selected.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 27, 2020, 03:03:51 pm
 If anyone is reading this:

 The backgrounds in 1P and 2P mode bankswitch between the 0 and 1 CHR registers.

 For 2P mode, I would like to switch between the 8 and 9 registers, so I can do more with the background.

 I can about halfway understand what the code is doing, but not enough to make this happen easily.

 (Searching for 9F63 leads to the associated code, I believe.)
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 29, 2020, 08:37:50 pm
9f63 is the CPU offset of the CHR switch routine. When you like to search for it you would search for $20 $63 $9f since pointers are read as little endian.

When you experimented you should be aware that the two modes share a lot of routines. The bank switching is the very first routine I documented in my ASM file.

You can use it to put your hijack there and write your code in the free space section. The RAM value you need to branch on is mentioned above. I did see you know how to expand CHR banks so the task should be clear (Since your ROM was expanded a bit). You should also know the resources to consult to learn the needed thing to do this task. Good luck.

To visualize binary numbers in hex this might help to understand what I mean with "takes nipple 4"
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: pangenttech on November 29, 2020, 08:53:11 pm
  I've been reading your code for awhile so I'm aware of that section, yes. I've also looked at the associated sections of the ROM at length in Mesen's Debugger. But I don't really know what I'm looking at.

  I don't know what you're talking about, or what exactly to do to get my desired result, sorry.

  I don't understand "Take nipple 4 Drop the others," although I now see you've edited your post to about halfway explain it. (Fourth 1 or 0 in the Binary?) That may be where I was stuck, some sort of math that was eluding me, rather than listing the bank numbers directly. That would seem to tally with the three LSR commands.

  (A sprite bankswitch you coded for the title screen handles things differently, listing the desired sprite banks directly.)

  Your partial explanations don't really tell me anything. I think you think you're being a lot clearer than you are.

  Expanding the actual ROM shouldn't be a problem. It requires updating the header in some way, and there are applications for it.
Title: Re: [Technical] [NES] Virus and Tiny Toon Adventures
Post by: bogaabogaa on November 30, 2020, 04:06:37 am
Yes there are thing coming to my mind when I am done guessing where your problem is and then I type it after.. or post a gif that might help..

You been looking for this routine in your question. If I had answered with Nes Rom offset $6e6 then you would probably edit that with some hex editor. What seems way harder. Her you see the things you need to learn directly. Also I give hints to the task so you can learn. Next step is to tell you to change JSR $9f63 to a JSR 2PlayerSwitching. Then make a "2PlayerSwitching:" where you have free space. If you desire to do that in a hex editor you can calculate (read) where it should go and type the new offset directly after the value $20. Then write the routine and translate that into hex values what seems way more vulnerable to have mistakes.

Taking 4 nipple.. yes you see it will alternate every 8 frame. If you don't know what the opcode is. You can hover over it in Mesen debugger and have a brief description. Or  look it up be here maybe..

There are many pages and also tutorials about it. I am sure you know how to look for them.

If you don't know what a AND does look up a true table for logic gates.

You can design your routine different when you write a value to Ram and count it down or something. This is just one way of doing it.