News: 11 March 2016 - Forum Rules

Author Topic: [Technical] [NES] Virus and Tiny Toon Adventures  (Read 8577 times)

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
[Technical] [NES] Virus and Tiny Toon Adventures
« on: October 28, 2020, 05:02:10 am »
   First, I'm hoping to improve a previously-released project:

http://www.romhacking.net/hacks/5452/

https://www.youtube.com/watch?v=AkqfMeMGDww

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.

http://www.romhacking.net/hacks/5498/

   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.
« Last Edit: November 02, 2020, 05:56:53 am by pangenttech »

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #1 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!!)
https://www.dropbox.com/s/3wj6g6w6czmprcl/TinyToonSwitcher.zip?dl=0

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.

Update:
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.
https://www.dropbox.com/s/40xf1e5txb04sxu/TinyToonAdventuresFirstBossHealth05.ips?dl=0

« Last Edit: November 02, 2020, 06:06:59 pm by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #2 on: November 02, 2020, 05:31:16 pm »
  Thank you! We've definitely been working with the hex code rather than recreating the ASM.
« Last Edit: November 02, 2020, 09:25:06 pm by pangenttech »

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #3 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?
« Last Edit: November 02, 2020, 05:58:15 pm by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #4 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.

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #5 on: November 03, 2020, 08:51:25 am »
I released the patch here: http://www.romhacking.net/hacks/5503/

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.
https://www.dropbox.com/s/3wj6g6w6czmprcl/TinyToonSwitcher.zip?dl=0

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?
« Last Edit: November 03, 2020, 05:08:00 pm by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #6 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?
« Last Edit: November 04, 2020, 07:51:05 am by pangenttech »

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #7 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.
« Last Edit: November 04, 2020, 02:40:49 pm by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #8 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)

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #9 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.
« Last Edit: November 05, 2020, 12:41:38 am by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #10 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:
00BA030000BB030800BC031008CA030008CB030808CC031010DA030010DB030810DC031018B7030018B8030818B90310

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:

009501000096010808A401F808A5010008A6010810B401F810B5010010B6010818FF01F818C5010018C6010820D5010020D6010828E5010028E6010830F5010030F60108

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
« Last Edit: November 05, 2020, 03:53:04 am by pangenttech »

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #11 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)

update:
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.

https://youtu.be/b5EFqnVoZUs

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)

« Last Edit: November 07, 2020, 01:14:32 am by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #12 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
« Last Edit: November 07, 2020, 12:50:04 am by pangenttech »

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #13 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.

https://www.dropbox.com/s/gnnbzqmp76h40s1/VirusHack%20DrGarfildPlus.zip?dl=0

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]
PauseScreen:
PauseScreen:
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

count:
dec $770 //free location in Ram

LoadOdieFrame:
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.
rts

OdieFrameTable:
db $1d,$1b,$1c,$1d
« Last Edit: November 07, 2020, 04:04:59 pm by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #14 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:

http://www.mediafire.com/file/sk2m74i2m6nk0mx/drgarfield.zip/

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.
« Last Edit: November 07, 2020, 11:00:40 am by pangenttech »

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #15 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.
https://www.dropbox.com/s/gnnbzqmp76h40s1/VirusHack%20DrGarfildPlus.zip?dl=0

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.

Update:
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.
« Last Edit: November 07, 2020, 08:05:01 pm by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #16 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.
http://www.mediafire.com/file/sk2m74i2m6nk0mx/drgarfield.zip/
« Last Edit: November 09, 2020, 09:43:41 am by pangenttech »

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #17 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 --------------------------------//

MenuScreen:

ldx #$ff //Set Start X offset 00
KeepLoading:
inx
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

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

clc
adc $280,x
sta $280,x

dey
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.
« Last Edit: November 08, 2020, 01:38:58 pm by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg

pangenttech

  • Jr. Member
  • **
  • Posts: 39
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #18 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).
« Last Edit: November 09, 2020, 10:14:53 am by pangenttech »

bogaabogaa

  • Full Member
  • ***
  • Posts: 228
    • View Profile
Re: [Technical] [NES] Virus and Tiny Toon Adventures
« Reply #19 on: November 09, 2020, 01:00:39 pm »
Just to be clear my minigame will be nothing like this.
https://youtu.be/q1TuHEORyME

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.


« Last Edit: November 10, 2020, 01:10:58 am by bogaabogaa »
CV ROM DiscordServer
https://discord.gg/PvFgxRg