News: 11 March 2016 - Forum Rules
Current Moderators - DarkSol, KingMike, MathOnNapkins, Azkadellia, Danke

Author Topic: slidelljohn (a.k.a.[J]) snes projects page  (Read 25041 times)

slidelljohn

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #100 on: October 09, 2019, 02:47:55 pm »
Thanks MMR! The patch is getting better thanks to the
optimizations that Aaendi has been doing. I should use my words more carefully so no one gets confused when I say almost equal to or slightly faster than the sa-1 patch. The sa-1 is about 3 times faster than the fastrom so the game definitely isn’t running the code nowhere near as fast as the sa-1. The code is being optimized to use less code that is more efficient than how the original programmers written the code therefore making it appear almost as fast or possibly in the near future slightly faster. Adding new features and more enemies on the screen the sa-1 chip would be the way to go due to the 3x speed over fastrom but there is still a limit to how many enemies/sprites that can be on the screen and per line. If you would like to do optimizations in the parodius game you should look into creating a disassembly file of all of the code in that game. The fastrom patch that I made was created using my disassembled code that I uploaded to romhacking.net. You should look at that file to give you a example of how you could create a file like that for your parodius game. I do plan on creating documents of the before and after of the optimizations that I have worked on so others can use the documents as a example to create optimizations for other games.

MMR

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #101 on: October 09, 2019, 04:09:32 pm »
Thanks MMR! The patch is getting better thanks to the
optimizations that Aaendi has been doing. I should use my words more carefully so no one gets confused when I say almost equal to or slightly faster than the sa-1 patch. The sa-1 is about 3 times faster than the fastrom so the game definitely isn’t running the code nowhere near as fast as the sa-1. The code is being optimized to use less code that is more efficient than how the original programmers written the code therefore making it appear almost as fast or possibly in the near future slightly faster. Adding new features and more enemies on the screen the sa-1 chip would be the way to go due to the 3x speed over fastrom but there is still a limit to how many enemies/sprites that can be on the screen and per line. If you would like to do optimizations in the parodius game you should look into creating a disassembly file of all of the code in that game. The fastrom patch that I made was created using my disassembled code that I uploaded to romhacking.net. You should look at that file to give you a example of how you could create a file like that for your parodius game. I do plan on creating documents of the before and after of the optimizations that I have worked on so others can use the documents as a example to create optimizations for other games.


Nice!,and I can find out a lot and I'm new to Assembly and I'm really enjoying,
i want to find ram address in rom how can i find? and I'm starting to use the snes9x geiger debugger to change the values.
how should i start? if you can help me
 and Is it possible to duplicate the sprites that are on the screen? it's kind of crazy that more like duplicating ryu sprite on street fighter 2 and popping 2 ryu on the screen
and which compiler do you use for your roms?












« Last Edit: October 10, 2019, 12:00:54 pm by MMR »

Revenant

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #102 on: October 10, 2019, 07:28:34 pm »
https://ci.appveyor.com/project/devinacker/bsnes-plus/branch/master/artifacts

Just popping in to mention that the latest development build of bsnes-plus now fully supports the 128kb/256kb VRAM expansion (currently only in "accuracy" builds, though this may change later...) Both the emulator itself and the built-in debugging tools can view and use all available expanded VRAM.



October 12, 2019, 05:40:27 pm - (Auto Merged - Double Posts are not allowed before 7 days.)
Also, since I've still got my head in the VRAM expansion stuff, could you clarify something?

In the GitHub issue a while ago, you mentioned that you were inverting both of the CPU I/O pins that the expansion uses - am I correct in understanding that writing all zeroes to $4201 will select the second 128kb VRAM bank?

If so, then I'm unfortunately finding a lot of games that break with this behavior, especially ones that include support for multitaps and possibly other peripherals, since they write 0x80 and 0x00 to the I/O port and sometimes do so after it's already started loading stuff into the other VRAM bank, causing some pretty serious visual glitches.

Another good example is Nintendo's burn-in test carts, since those also write the same values while the screen and VRAM contents are already in use:



e: made a more detailed (but probably not complete) list of games that have obvious issues with my 256k VRAM emulation: https://pastebin.com/Gd9QtvJw

Most of the offending games seem to involve multitap support, some of them behave worse with the 5 player multitap plugged into port 2.
« Last Edit: October 12, 2019, 10:36:36 pm by Revenant »

slidelljohn

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #103 on: October 14, 2019, 04:33:55 am »
@Revenant
“am I correct in understanding that writing all zeroes to $4201 will select the second 128kb VRAM bank?”

No, I do not think that is correct. I think if bit 0 and 1 are not set for $4201 it will activate the second set but give me a day or two and I’ll get you the exact details for how it works but I’ll try to get it to you tomorrow night when I have time to look at my docs. I also think I have a working 256kb mmx patch somewhere that kept the menu graphics on the second 128kb set. I do have a snes console with the mod installed that I can ship to you for free for researching how it works on real hardware. If you would like to have the console just pm me a address to send it to and I’ll ship it priority mail and you can get it this week.

You are probably having problems with the multitap because $4201 is for the joypads and you are zeroing out all of the bits. 2 bits are used for the controllers and the other 6 are not used for anything. There are 8 pins on the cpu for each bit for the joypad I/O ports $4201. The last 2 pins I think bit 7 and 8 are connected to the controls and the other 6 are not connected to anything on the motherboard. When you do your testing I think you need to have 128kb vram activated when you activate 256kb. So try only using those 2 bits/I/O ports.

I’m not sure if qwertymodo has done any reasearch on the modchip but he does have one of my consoles that I gave him with the modchip and he may have done some research that could possibly help.

Thanks for adding the support to bsnes plus I really appreciate it and I’m sure the snes rom hacking community will appreciate it too once we start to get things going with the extra vram.

Also I think I should mention some games will have problems with the modchip but they will only need a minor patch to get them to work correctly. I think rushing beat shura was one of them. In the beginning of that rushing beat game it sets and unsets the bits constantly at $4201 causing vram data to get stored on the different sets of vram but I patched it and it worked correctly afterwards. Yoshi’s island doesn’t work correctly using just the extra unused ppu pin for 128kb of vram but it shouldn’t cause any problems when using it with the unused cpu I/O pin. When I create the next mod chip it will have switches on it to turn the extra vram on or off so original games will still work if needed.

Is the vram viewer capable of displaying both 128kb sets of vram at the same time? If not, can you make it to where it does so I can run a few test?

Can you try patching the stuff for the multitap that writes to the unused bits at $4201 so it only writes to the used bits and see if that fixes most of the multitap stuff?

It might be a good idea to have two ways to enable 128kb of vram. One having only the unused ppu pin used and the other with having both the ppu and the cpu pin used. My next version of the mod chip will probably have a switch for this.


@MMR
I’ll try to help you get started. It will probably be a good idea to start a how to snes rom hack page on the new comers section so multiple people can help you get started. I use giegers snes debugger for most of my snes hacking and vsnes for displaying the Geiger’s save state data. I also use bsnes plus for snes hacking. I currently do not use a compiler so I do not know which one is best but I should use one.
« Last Edit: October 14, 2019, 06:55:38 am by slidelljohn »

Revenant

  • Full Member
  • ***
  • Posts: 205
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #104 on: October 14, 2019, 09:16:48 am »
No, I do not think that is correct. I think if bit 0 and 1 are not set for $4201 it will activate the second set

You are probably having problems with the multitap because $4201 is for the joypads and you are zeroing out all of the bits. 2 bits are used for the controllers and the other 6 are not used for anything. There are 8 pins on the cpu for each bit for the joypad I/O ports $4201. The last 2 pins I think bit 7 and 8 are connected to the controls and the other 6 are not connected to anything on the motherboard. When you do your testing I think you need to have 128kb vram activated when you activate 256kb. So try only using those 2 bits/I/O ports.

Right, I think we're both trying to say the same thing here, in other words:
  • If bit 0 is set, the mod is disabled (default on power on)
  • If bit 0 is cleared and bit 1 is set, the first/lower 128kb is used
  • If bits 0 and 1 are both cleared, the second/upper 128kb is used

This is what I'm currently emulating.

The problem is that if you're inverting bit 1 like this, games that write 0x80 or 0x00 to that I/O port (like Rushing Beat Shura and the dozens of other ones I listed, and probably more) will have problems if they were already loading stuff into the original 64kb of VRAM, since the entire 128kb will be swapped out when the game isn't expecting it to.

I think the best solution, rather than adding switches to the mod or anything, would be to just not invert pin 1 when connecting it to the highest address line on the RAM chips. As far as I can tell that would probably solve the issue, since writing zeroes to those bits like some games do would not actually change which block of VRAM is being used. (This would probably also not force people to have to patch games or anything - what if they want to play using their original cartridges?)

Quote
Is the vram viewer capable of displaying both 128kb sets of vram at the same time? If not, can you make it to where it does so I can run a few test?

Right now the VRAM viewer only displays whichever one is currently in use, but the generic memory viewer (hex editor) shows all of it at the same time. The VRAM viewer also shows the "full" VRAM addresses when using 256kb, i.e. if the second bank is selected it will show 0x20000-0x3FFFF as the addresses, etc.

slidelljohn

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #105 on: October 14, 2019, 03:24:06 pm »
Yes, I think you do have the bits correct.

“what if they want to play using their original cartridges”

You only need the unused ppu pin for 128kb of vram but I
had to use one of the unused cpu i/o pins with 128kb of vram ppu pin to get original unmodified games like yoshi’s island to work. It seems like it would be good to have 2 128kb settings and 2 256kb settings. For me and what I wanted out of the extra vram it doesn’t really matter to me if no original games work because I want to modify games to use the extra vram. I only made the modchip like that so other people can still play original game carts with it if they wanted to but I guess no matter what we will still probably run into issues with original games. I can put switches on the modchip to fix some games but that means you still need to open the console to flip the switch. I guess whenever you run your test try using yoshi’s island and see what you think the best option would be.

MMR

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #106 on: October 14, 2019, 04:45:36 pm »
@slidelljohn

thanks, that would help me a lot, I really want to change the game codes and I want to find the sprite count code, I know it's not simple but it seems to be fun.

Is it possible to put more code on the same line as the original code using asar? or have to expand the rom?







« Last Edit: October 14, 2019, 05:02:11 pm by MMR »

slidelljohn

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #107 on: October 14, 2019, 05:17:35 pm »
I don’t know what a sprite count code is but there is a limit of 128 sprites and the sprites data is stored in oam ram. I’m not sure what asar is but it sounds like it’s a compiler. I never used a snes compiler before but I should.

@slidelljohn

Is it possible to put more code on the same line as the original code using asar? or have to expand the rom?

It’s possible to write new code without expanding the rom but it just depends on what code you are writing and if there is free space in the rom that you are using.

It’s seems like you are wanting to learn but you have a lot to learn and it would be best to start a page in the newcomers section so you can get a variety of help from the whole community. If you start a page I can help you figure some things out. It’s really not hard to learn snes rom hacking as long as you put the time into learning it.

MMR

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #108 on: October 14, 2019, 06:27:08 pm »
@slidelljohn
yes i will dedicate myself a lot because i really want to learn i already started a section page

slidelljohn

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #109 on: October 14, 2019, 08:04:23 pm »
That’s great MMR! :thumbsup:

I’ll I see if I can help get you some good information to help you get you started later tonight or sometime after midnight.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6921
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #110 on: October 15, 2019, 12:46:11 pm »
So this is a Super SNES-ROM-ROM upgrade? ;D
"My watch says 30 chickens" Google, 2018

MMR

  • Jr. Member
  • **
  • Posts: 7
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #111 on: October 19, 2019, 03:35:29 am »
@slidelljohn
why is underground stage 3 so slow? And why do the stars still stay on BG using 30 sprites? is it possible to remove?

slidelljohn

  • Sr. Member
  • ****
  • Posts: 259
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #112 on: October 22, 2019, 07:21:48 am »
So this is a Super SNES-ROM-ROM upgrade? ;D
Um...yea ::)

@slidelljohn
why is underground stage 3 so slow? And why do the stars still stay on BG using 30 sprites? is it possible to remove?
I’m sure there are more than a few things causing the slowdown on stage 3. The stars are both on a background layer and on the sprite layer. The stars that are on the sprite
layer uses 25% of the games sprites which I do not like but
it is how the game was made. And yes, you can turn the stars off on the sprite layer by changing one byte in the object data but that 25% of sprites will still be reserved for stars in oam-ram. If I make a new gradius game I will probably completely remove the stars that are sprites so there can be more enemies and bullets on screen.

KingMike

  • Forum Moderator
  • Hero Member
  • *****
  • Posts: 6921
  • *sigh* A changed avatar. Big deal.
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #113 on: October 22, 2019, 01:01:47 pm »
Um...yea ::)
I was making a joke about it being like a Turbo Super CD upgrade. :)
"My watch says 30 chickens" Google, 2018