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

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

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #60 on: May 22, 2019, 12:49:48 pm »
Lol, thanks! :woot!:

Here is the 128x128 bubbles collision.
Code: [Select]
    00000     5
  000xxx000   14
 00xxxxxxx00  25
 0xxxxxxxxx0  36
00xxxxxxxxx00 49
0xxxxxxxxxxx0 62
0xxxxxxx0     71       //I triple checked to make sure this one was correct
0xxxxxxxxxxx0 88
00xxxxxxxxx00 101
 0xxxxxxxxx0  112
 00xxxxxxx00  123
  000xxx000   132
    00000     137



$01:E199
FC FC 07 00 //collision square #1
FE FC 04 00 //collision square #2
00 FD 04 00 //collision square #3
02 FD 04 00 //collision square #4
04 FD 01 00 //collision square #5
78 FD 07 00 //collision square #6
7A FD 04 00 //collision square #7
7C FD 04 00 //collision square #8
84 FD 04 00 //collision square #12
86 FD 04 00 //collision square #13
88 FD 01 00 //collision square #14
F6 FD 07 00 //collision square #15
F8 FD 07 00 //collision square #16
08 FE 01 00 //collision square #24
0A FE 01 00 //collision square #25
76 FE 02 00 //collision square #26
8A FE 02 00 //collision square #36
F4 FE 07 00 //collision square #37
F6 FE 02 00 //collision square #38
0A FF 02 00 //collision square #48
0C FF 01 00 //collision square #49
74 FF 02 00 //collision square #50
8C FF 02 00 //collision square #62
F4 FF 02 00 //collision square #63
04 00 02 00 //collision square #71 looks like it should be #75(0x0C 0x00, 0x02 0x00)
74 00 02 00 //collision square #76
8C 00 02 00 //collision square #88
F4 00 01 00 //collision square #89
F6 00 02 00 //collision square #90
0A 01 02 00 //collision square #100
0C 01 07 00 //collision square #101
76 01 02 00 //collision square #102
8A 01 02 00 //collision square #112
F6 01 01 00 //collision square #113
F8 01 01 00 //collision square #114
08 02 07 00 //collision square #122
0A 02 07 00 //collision square #123
78 02 01 00 //collision square #124
7A 02 04 00 //collision square #125
7C 02 04 00 //collision square #126
84 02 04 00 //collision square #130
86 02 04 00 //collision square #131
88 02 07 00 //collision square #132
FC 02 01 00 //collision square #133
FE 02 04 00 //collision square #134
00 03 04 00 //collision square #135
02 03 04 00 //collision square #136
04 03 07 00 //collision square #137
FF FF

Here is a image of the collision grid. The red square is to show the center of the 128x128 bubble(0x00 0x00).


@Aaendi
I now understand how most of that section of the bubbles asm works so let me know if you
need help with any of it. I'm getting ready to remove all graphics compression from the
rom so its going to speed up level loading and free up a bunch of wram that is used to store
the decompressed graphics. I'm also going to increase the rom size for the decompressed
graphics and for extra asm space. Hopefully within the next 2 weeks I should have it ready.
« Last Edit: May 22, 2019, 01:24:06 pm by slidelljohn »

snesfanboi

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #61 on: May 23, 2019, 09:50:20 am »
great to see you're still working on this  :woot!:

Aaendi

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #62 on: May 24, 2019, 09:24:39 pm »
I can't believe they used a grid for bubble collision.  I just assumed they used bounding box collision, followed by circlular collision like any sane programmer would do.

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #63 on: May 26, 2019, 02:58:02 am »
@snesfanboi
I should have a new patch within the next couple of weeks ready. It will
be a updated fastrom patch combined with my new decompressed gfx/data
patch that I'm currently working on.

@Aaendi
The grid collision for the bubbles is like a secondary collision. Its only
for bubbles having contact with other bubbles. The main collision is like the
bounding box collision that you described. If you look at the ram data for the
bubbles the ram 0x28-0x2b is the dimensions for the bubbles main collision.
This collision is for when your ship touches it, when your ships bullets hit it
and for the bounding box. 0x0b 0x00, 0x0b 0x00 is for 32x32 bubbles main
collision and 0x05 0x00, 0x05 0x00 is for 16x16 bubbles.

Here is a small tool that I'm working on to help with creating my next patch.
http://www.mediafire.com/file/23np4ja4dzd4pua/gradius_3_data_decomp.zip/file

This tool decompresses lots gradius 3 graphics to files and puts them in their
own directory. I currently only have it decompressing the graphics and data
in bank $06 but I do already have all of the data for all of the banks. This is
just a test program and it is not optimized yet. To use the tool load a headerless
Gradius III (U) [!] rom and then push the create files button and it should create
a folder "068000" in the same directory as the tool. Do not load any other file into
this program and do not edit the data.bin file and you shouldn't run into any
problems. The decompressed .bin files that this tool creates can be loaded into your
favorite tile editor to view the decompressed graphics. I think only 1 of the
decompressed .bin files(06f57a) is data and the rest are graphics.

Aaendi

  • Jr. Member
  • **
  • Posts: 18
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #64 on: May 27, 2019, 10:18:00 am »
I think the whole bubble to bubble collision routine can be replaced with a more normal collision routine and people wouldn't know the difference.

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #65 on: May 28, 2019, 03:51:51 am »
If that would speed things up that would be great.

I did some looking into vitor's sa-1 hack to see why there was still
slowdown when some bosses die and the code to make the screen fade away
was being ran on the snes cpu and the sa-1. At $00:82b2 you need to nop
the 4 bytes to stop the snes cpu from running the code so only the sa-1
will run it. So change these 22 65 92 00 to EA EA EA EA and it fixes it.
I don't know how vitor missed that. This fixes the gfx bugs and I think it
fixes the slowdown in that spot.

Here is a patch that has the bug fix plus a optimization that I did for when
the bosses die. Apply vitor's recent patch then this one.
http://www.mediafire.com/file/9snjopq80afdb22/Gradius-III-%255Bsa-1%255DUSAv1.04_bug_fix.bps/file

If anyone still notices slowdowns or gfx bugs with this fix let me know and
I'll take another look at it.


« Last Edit: May 28, 2019, 04:25:16 am by slidelljohn »

Grego

  • Jr. Member
  • **
  • Posts: 94
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #66 on: May 28, 2019, 01:10:02 pm »
Very nice find, I'll test that change later and report my findings.

Update, looks good to me, the only noticable lag is the missile boss during the boss rush.
« Last Edit: May 28, 2019, 01:46:46 pm by Grego »
UltraNet SNES Network Adapter: https://twitch.tv/ultranetsnes
F-Zero Final v0.2 Teaser: https://www.youtube.com/watch?v=UzmOP23_F6A
F-Zero Final Github: https://github.com/originalgrego/FZeroFinal

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #67 on: May 28, 2019, 08:08:58 pm »
I just now tested up to the missile boss and it looks like slight
game play slowdown but not when the boss dies. I have also noticed
some slight slowdown on the volcano stage at the top of the screen
when you are going through the sand that you shoot. I was using the
laser that charges and the 4 spinning options. Did you notice any
other slowdowns when the bosses die? I'm surprised no one has
mentioned the bug with glitchy graphics. All I see is people talking
about the boss slowdown when they die. I knew something was off when
I seen those graphics messing up. Has anyone noticed the glitchy graphics
in vitors sa-1 hack?

Here is the optimized asm code that I put in that patch:
http://www.mediafire.com/file/sho7adgcm4htrjj/New_asm_code_when_boss_dies.zip/file

These are the jumps to load the new code but the snes one was turned off with the 4 nop's.
Code: [Select]
$00/82B2 22 02 FE 00 JSL $00FE02[$00:FE02]   //snes
$00/FAA9 5C 02 FE 00 JMP $00FE02[$00:FE02]   //sa-1

Can anyone confirm the cycles are calculated correctly in the trace files? I'm using my new cpu
tracer to get the cycles. The cycles are calculated using the information on this page:
https://wiki.superfamicom.org/65816-reference

I found a way to record gameplay to sram and I'm going to try to add this feature when I add sram.
I'll probably have it store the gameplay every time the high score has been beaten so anyone can
replay the highest scores gameplay. Its going to take a little bit of work to pull it off but I'm
pretty sure I can do it. This is going to be a exciting new feature to play around with.

I have been slowly adding in the decompressed graphics into gradius. I was able to make a few optimizations on when certain graphics get loaded into vram. For instance the sand dragon slows the game down because it’s constantly loading new graphics into vram. These graphics are dma’d in 2 sets of 0x200 bytes. I have edited the code to load them in 1 dma at 0x400 bytes. Plus the graphics are constantly being updated into vram even if it’s the same graphics that were loaded the last time so I added a check to see if it’s the same graphics so if it is it doesn’t dma anything. I was also able to make the same modifications with your ship, power up and options gfx as well. The new asm that I’m writing for dmaing gfx to vram will be the only optimizations that I’ll add to the decompression patch. I didn’t plan on adding any optimizations to the decompression patch so these a are nice bonus. All of the new asm codes for dmaing the gfx will be uploaded after I get all of the decompressed graphics working correctly. It going to be a lot of new code.
« Last Edit: June 03, 2019, 12:11:29 pm by slidelljohn »

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #68 on: June 12, 2019, 11:58:17 pm »
With all of this stuff that I'm working on for gradius 3 I needed a easy way
to start at any level so I made a small hack that lets you start at any level.
This patch also includes text files for the changes that I made to create the hack.
http://www.mediafire.com/file/8u90hm9ay5fakxq/Start_at_any_level_gradius_3_snes.zip/file

I would like to upload this new patch to romhacking.net. Can anyone test it
to make sure that it is working without any bugs? If anyone can confirm that
it works without any bugs I'll upload it.

I'm making good progress for the decompression hack for gradius 3 but its
taking longer than expected because I have been documenting all of gradius 3's
level data as I have been inserting the decompressed graphics. I have most of
the data documented to create new levels. I have all of the data documented for
all objects placed in the levels. Its very easy to add or remove objects in all
levels. After I finish the decompression hack I will start building a gradius 3
hacking tool that includes a level editor. Hopefully soon I'll at least have a
level and object viewer working.

niuus

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #69 on: June 20, 2019, 01:59:29 am »
With all of this stuff that I'm working on for gradius 3 I needed a easy way
to start at any level so I made a small hack that lets you start at any level.
This patch also includes text files for the changes that I made to create the hack.
http://www.mediafire.com/file/8u90hm9ay5fakxq/Start_at_any_level_gradius_3_snes.zip/file

I would like to upload this new patch to romhacking.net. Can anyone test it
to make sure that it is working without any bugs? If anyone can confirm that
it works without any bugs I'll upload it.
So, i pressed start+b at the 1 player screen, but nothing else showed up afterwards, even held it up to the game start point. I tried again pressing and holding b+start in succession, but no dice.

Patched rom CRC32 is 3C3C11C1
« Last Edit: June 20, 2019, 02:04:50 am by niuus »

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #70 on: June 20, 2019, 05:55:55 pm »
When you start a new game try holding start + B + A and when the weapon select screen shows up you can release the buttons and it should start you on level 2 after selecting your weapons. Start + B activates the new asm for the stage select but you still need to hold the other buttons as well to choose the level. If you only hold start + B it will load the new asm but since no other buttons are pressed and held it will load level 1. No new screens pop up to choose a level. Holding the correct button combinations is what chooses the level. Hope that gets it working for you. Let me know how that works.

niuus

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #71 on: June 21, 2019, 06:11:43 am »
When you start a new game try holding start + B + A and when the weapon select screen shows up you can release the buttons and it should start you on level 2 after selecting your weapons. Start + B activates the new asm for the stage select but you still need to hold the other buttons as well to choose the level. If you only hold start + B it will load the new asm but since no other buttons are pressed and held it will load level 1. No new screens pop up to choose a level. Holding the correct button combinations is what chooses the level. Hope that gets it working for you. Let me know how that works.
Sorry, nothing  :-[

At the 1-2 player screen, i pressed the buttons at the same time (and held them until the weapon screen), also tried b+a+start (in succession, holding them all), nothing.

I tried in Snes9x RX (Wii), and also on Snes9x 1.58 (PC).

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #72 on: June 24, 2019, 06:16:18 am »
Only thing that I can think of for why it isn't working for
you is you might not be patching it correctly. I checked everything
including the link that I posted and it works every time for me.

Here are a few images that might help. I'm using geiger's snes debugger.


At the ram address 7e0020 you see 00 00. Those 2 bytes are the controller 1
inputs. 00 00 means nothing is pressed. At the ram address 7e0086 you see 00.
That is going to be the current level that you start at.




In this image I have just pressed and started holding start + A + B. If you
look at the ram address 7e0020 you will see 80 90. Those 2 bytes means I'm
holding only start + A + B buttons. If you look at 7e0086 it is still 00.




Now we are at the weapon select screen. 7e0020 is still being held (80 90)
and now 7e0086 has changed to 01. 01 = level 2 which is the bubble level.
If 7e0086 was still 00 it would load level 1. When you get to this screen
that is when its safe to let go of the buttons.




If you don't see this highlighted hex in your rom then you definitely did
not patch it correctly. If you do see that hex in your rom then you may
not be holding the correct buttons.

Is anyone else having issues getting this patch to work?










niuus

  • Jr. Member
  • **
  • Posts: 72
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #73 on: June 24, 2019, 01:48:56 pm »
Only thing that I can think of for why it isn't working for
you is you might not be patching it correctly. I checked everything
including the link that I posted and it works every time for me.

Here are a few images that might help. I'm using geiger's snes debugger.
I am using LunarIPS as usual. Can you give me the CRC32 and MD5 of the patched rom?

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #74 on: June 24, 2019, 03:58:51 pm »
Here is the patched rom hashes.


CRC32 looks the same as your patched one. When you are holding
the start + B + A buttons what are the 2 bytes in ram at 7e0020
and 7e0021?

Zimgief

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #75 on: June 24, 2019, 04:23:09 pm »
It works, no problem. Tried (start + b) +a, got to bubble stage.

niuus, maybe make sure you press a + b, THEN (without releasing  a + b) press start?
Note: got the game file on "wow****".

snesfanboi

  • Newbie
  • *
  • Posts: 4
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #76 on: June 27, 2019, 03:54:48 pm »
Does the patch above include the optimizations? I'm not being lazy, my PC is has been dead for 2 weeks but should have it back over the weekend.

Keep up the great work  :beer:

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #77 on: June 29, 2019, 11:15:09 am »
@niuus
Did you get it to work yet?

@Zimgeif
Thanks! I found those difficulty settings data that I said I had.
http://www.mediafire.com/file/wv2votm41jgqo3i/Gradius_3_difficulty.txt/file

@snesfanboi
No it does not include anything but the level selection. The next optimization patch
that I will have ready is going to be awhile longer before its ready. I have a lot of
new optimizations to do to add to the optimizations that have already been created. I
think with these new optimizations the game will run faster than the current sa-1 that
vitor created. The assembly looks like it was ether written to cause a lot of slowdowns
(which is the most likely thing) or the programmers were not that smart (I don't think
that's why the game slows down so much).

Here is another example of how the assembly throughout the rom was programmed that could
cause slowdown.

This asm is traced from gameplay when a enemy is killed.
Code: [Select]
$02/8502 F0 01       BEQ $01    [$8505]      A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1072 VC:017 00 FL:454
$02/8505 74 02       STZ $02,x  [$00:0902]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1094 VC:017 00 FL:454
$02/8507 B5 14       LDA $14,x  [$00:0914]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1132 VC:017 00 FL:454
$02/8509 30 06       BMI $06    [$8511]      A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1170 VC:017 00 FL:454
$02/850B A6 FC       LDX $FC    [$00:00FC]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIZCHC:1186 VC:017 00 FL:454
$02/850D 5C B4 8D 00 JMP $008DB4[$00:8DB4]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1218 VC:017 00 FL:454
$00/8DB4 74 04       STZ $04,x  [$00:0904]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1250 VC:017 00 FL:454
$00/8DB6 74 08       STZ $08,x  [$00:0908]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1288 VC:017 00 FL:454
$00/8DB8 74 0A       STZ $0A,x  [$00:090A]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1326 VC:017 00 FL:454
$00/8DBA 74 0C       STZ $0C,x  [$00:090C]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1364 VC:017 00 FL:454
$00/8DBC 74 0E       STZ $0E,x  [$00:090E]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0034 VC:018 00 FL:454
$00/8DBE 74 00       STZ $00,x  [$00:0900]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0072 VC:018 00 FL:454
$00/8DC0 74 02       STZ $02,x  [$00:0902]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0110 VC:018 00 FL:454
$00/8DC2 74 14       STZ $14,x  [$00:0914]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0148 VC:018 00 FL:454
$00/8DC4 74 06       STZ $06,x  [$00:0906]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0186 VC:018 00 FL:454
$00/8DC6 74 10       STZ $10,x  [$00:0910]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0224 VC:018 00 FL:454
$00/8DC8 74 12       STZ $12,x  [$00:0912]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0262 VC:018 00 FL:454
$00/8DCA 74 16       STZ $16,x  [$00:0916]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0300 VC:018 00 FL:454
$00/8DCC 74 18       STZ $18,x  [$00:0918]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0338 VC:018 00 FL:454
$00/8DCE 74 1A       STZ $1A,x  [$00:091A]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0376 VC:018 00 FL:454
$00/8DD0 74 1C       STZ $1C,x  [$00:091C]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0414 VC:018 00 FL:454
$00/8DD2 74 1E       STZ $1E,x  [$00:091E]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0452 VC:018 00 FL:454
$00/8DD4 74 20       STZ $20,x  [$00:0920]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0490 VC:018 00 FL:454
$00/8DD6 74 22       STZ $22,x  [$00:0922]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0528 VC:018 00 FL:454
$00/8DD8 74 24       STZ $24,x  [$00:0924]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0566 VC:018 00 FL:454
$00/8DDA 74 26       STZ $26,x  [$00:0926]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0604 VC:018 00 FL:454
$00/8DDC 74 28       STZ $28,x  [$00:0928]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0642 VC:018 00 FL:454
$00/8DDE 74 2A       STZ $2A,x  [$00:092A]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0680 VC:018 00 FL:454
$00/8DE0 74 2C       STZ $2C,x  [$00:092C]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0718 VC:018 00 FL:454
$00/8DE2 74 2E       STZ $2E,x  [$00:092E]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0756 VC:018 00 FL:454
$00/8DE4 74 30       STZ $30,x  [$00:0930]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0794 VC:018 00 FL:454
$00/8DE6 74 32       STZ $32,x  [$00:0932]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0832 VC:018 00 FL:454
$00/8DE8 74 34       STZ $34,x  [$00:0934]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0870 VC:018 00 FL:454
$00/8DEA 74 36       STZ $36,x  [$00:0936]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0908 VC:018 00 FL:454
$00/8DEC 74 38       STZ $38,x  [$00:0938]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0946 VC:018 00 FL:454
$00/8DEE 74 3A       STZ $3A,x  [$00:093A]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:0984 VC:018 00 FL:454
$00/8DF0 74 3C       STZ $3C,x  [$00:093C]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1022 VC:018 00 FL:454
$00/8DF2 74 3E       STZ $3E,x  [$00:093E]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1060 VC:018 00 FL:454
$00/8DF4 6B          RTL                     A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE3 P:envmxdIzCHC:1098 VC:018 00 FL:454

$00/F425 B5 2E       LDA $2E,x  [$00:092E]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIzCHC:1142 VC:018 00 FL:453
$00/F427 89 00 04    BIT #$0400              A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1180 VC:018 00 FL:453
$00/F42A F0 06       BEQ $06    [$F432]      A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1204 VC:018 00 FL:453
$00/F432 89 02 00    BIT #$0002              A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1226 VC:018 00 FL:453
$00/F435 D0 18       BNE $18    [$F44F]      A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1250 VC:018 00 FL:453
$00/F437 B4 0A       LDY $0A,x  [$00:090A]   A:0000 X:0900 Y:DD2A D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1266 VC:018 00 FL:453
$00/F439 C0 C0 FF    CPY #$FFC0              A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZCHC:1304 VC:018 00 FL:453
$00/F43C 30 05       BMI $05    [$F443]      A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIzcHC:1328 VC:018 00 FL:453
$00/F43E C0 40 01    CPY #$0140              A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIzcHC:1344 VC:018 00 FL:453
$00/F441 30 0C       BMI $0C    [$F44F]      A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0000 VC:019 00 FL:453
$00/F44F B5 2E       LDA $2E,x  [$00:092E]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0022 VC:019 00 FL:453
$00/F451 89 08 00    BIT #$0008              A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0060 VC:019 00 FL:453
$00/F454 D0 57       BNE $57    [$F4AD]      A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0084 VC:019 00 FL:453
$00/F456 AD B4 12    LDA $12B4  [$01:12B4]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0100 VC:019 00 FL:453
$00/F459 0D B8 12    ORA $12B8  [$01:12B8]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0140 VC:019 00 FL:453
$00/F45C F0 07       BEQ $07    [$F465]      A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0180 VC:019 00 FL:453
$00/F465 B5 0E       LDA $0E,x  [$00:090E]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0202 VC:019 00 FL:453
$00/F467 C5 D8       CMP $D8    [$00:00D8]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0240 VC:019 00 FL:453
$00/F469 10 04       BPL $04    [$F46F]      A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0272 VC:019 00 FL:453
$00/F46B C5 D6       CMP $D6    [$00:00D6]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0288 VC:019 00 FL:453
$00/F46D 10 3E       BPL $3E    [$F4AD]      A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0320 VC:019 00 FL:453
$00/F46F B5 14       LDA $14,x  [$00:0914]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:eNvmxdIzcHC:0336 VC:019 00 FL:453
$00/F471 89 FF 7F    BIT #$7FFF              A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0374 VC:019 00 FL:453
$00/F474 F0 33       BEQ $33    [$F4A9]      A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0398 VC:019 00 FL:453
$00/F4A9 22 B4 8D 00 JSL $008DB4[$00:8DB4]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE6 P:envmxdIZcHC:0420 VC:019 00 FL:453

$00/8DB4 74 04       STZ $04,x  [$00:0904]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0476 VC:019 00 FL:454
$00/8DB6 74 08       STZ $08,x  [$00:0908]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0514 VC:019 00 FL:454
$00/8DB8 74 0A       STZ $0A,x  [$00:090A]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0552 VC:019 00 FL:454
$00/8DBA 74 0C       STZ $0C,x  [$00:090C]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0590 VC:019 00 FL:454
$00/8DBC 74 0E       STZ $0E,x  [$00:090E]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0628 VC:019 00 FL:454
$00/8DBE 74 00       STZ $00,x  [$00:0900]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0666 VC:019 00 FL:454
$00/8DC0 74 02       STZ $02,x  [$00:0902]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0704 VC:019 00 FL:454
$00/8DC2 74 14       STZ $14,x  [$00:0914]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0742 VC:019 00 FL:454
$00/8DC4 74 06       STZ $06,x  [$00:0906]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0780 VC:019 00 FL:454
$00/8DC6 74 10       STZ $10,x  [$00:0910]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0818 VC:019 00 FL:454
$00/8DC8 74 12       STZ $12,x  [$00:0912]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0856 VC:019 00 FL:454
$00/8DCA 74 16       STZ $16,x  [$00:0916]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0894 VC:019 00 FL:454
$00/8DCC 74 18       STZ $18,x  [$00:0918]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0932 VC:019 00 FL:454
$00/8DCE 74 1A       STZ $1A,x  [$00:091A]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0970 VC:019 00 FL:454
$00/8DD0 74 1C       STZ $1C,x  [$00:091C]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1008 VC:019 00 FL:454
$00/8DD2 74 1E       STZ $1E,x  [$00:091E]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1046 VC:019 00 FL:454
$00/8DD4 74 20       STZ $20,x  [$00:0920]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1084 VC:019 00 FL:454
$00/8DD6 74 22       STZ $22,x  [$00:0922]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1122 VC:019 00 FL:454
$00/8DD8 74 24       STZ $24,x  [$00:0924]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1160 VC:019 00 FL:454
$00/8DDA 74 26       STZ $26,x  [$00:0926]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1198 VC:019 00 FL:454
$00/8DDC 74 28       STZ $28,x  [$00:0928]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1236 VC:019 00 FL:454
$00/8DDE 74 2A       STZ $2A,x  [$00:092A]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1274 VC:019 00 FL:454
$00/8DE0 74 2C       STZ $2C,x  [$00:092C]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1312 VC:019 00 FL:454
$00/8DE2 74 2E       STZ $2E,x  [$00:092E]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:1350 VC:019 00 FL:454
$00/8DE4 74 30       STZ $30,x  [$00:0930]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0020 VC:020 00 FL:454
$00/8DE6 74 32       STZ $32,x  [$00:0932]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0058 VC:020 00 FL:454
$00/8DE8 74 34       STZ $34,x  [$00:0934]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0096 VC:020 00 FL:454
$00/8DEA 74 36       STZ $36,x  [$00:0936]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0134 VC:020 00 FL:454
$00/8DEC 74 38       STZ $38,x  [$00:0938]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0172 VC:020 00 FL:454
$00/8DEE 74 3A       STZ $3A,x  [$00:093A]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0210 VC:020 00 FL:454
$00/8DF0 74 3C       STZ $3C,x  [$00:093C]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0248 VC:020 00 FL:454
$00/8DF2 74 3E       STZ $3E,x  [$00:093E]   A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0286 VC:020 00 FL:454
$00/8DF4 6B          RTL                     A:0000 X:0900 Y:0000 D:0000 DB:01 S:1DE3 P:envmxdIZcHC:0324 VC:020 00 FL:454

Does anyone see whats wrong with this asm? I found 4 different occasions that
this happens and there could be more. This also happens with each of your bullets
when they disappear.

The game also uses MVN's to clear large sections of ram when it could be using dma.
It going to be very interesting to see how the next optimization patch compares to
the sa-1 hack in slowdowns.

I haven't been able to do as much as I would like on my projects lately and the gradius 3
decompression is taking more time than expected to complete so its going to be a little
while longer before the decompression is complete. I do have 7f:0000-7f:f800 of ram
completely free from compression. That ram was used for compressed gfx and compressed bg
data. That ram is no longer used in the game and is completey free to use for other things.
The next ram to free up from compression is 7e:a000-7e:bfff and 7e:e000-7e:ffff. When that
compression is removed that ram will be completely free. After that I will move the ram
data at 7f:f800-7f:ffff to 7e:3000-7e:37ff so all of ram bank $7F will be completely
unused in the entire rom. This decompression hack could be used in vitors sa-1 hack
to decrease ram size needed by half but I'm not really sure if that is something that he
would add to it but he is more than welcome to add this decompression hack to it if he
would like to. It could also possibly add a slight speedup in some locations in the sa-1
hack. The decompression hack does increase rom size but I don't really think that should be
a issue.

Some of the ram that the decompression hack is freeing up I'm going to use to remove some
slowdowns in this function $80/829E 22 8E 87 80 JSL $80878E[$80:878E] and this function
$80/82A2 22 F1 8E 80 JSL $808EF1[$80:8EF1]. Those are the 2 most used functions that cause
most of the slowdowns during gameplay so the ram trick should add a nice speedup when those
2 functions are used.
« Last Edit: June 29, 2019, 11:52:07 am by slidelljohn »

Zimgief

  • Jr. Member
  • **
  • Posts: 61
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #78 on: July 01, 2019, 11:25:13 am »
Thanks a lot for the documentation!
I changed all the level difficulty values to 0, and played extensively the base game, and the hacked game, and it's a world of difference. Normal difficulty is much more enjoyable for me now, while still being harder than the old Easy.
I uploaded the hack as I feel it can be interesting for other players. Obviously I credited you. :p

I tried to change the values of the Game Level (for exemple, put 08 on easy), it didn't seem to make a difference? Unsure about how the usefulness of the values.

I was wondering:
- do you think you could release a optional "no flickering" hack, without slowdowns being removed? As I feel slowdowns can arguably be considered as a feature rather than a bug (a kind of "bullet time"), while flickering are unarguably flaws
- if it was easy for you, do you think you could find where to apply the same changes in Parodius(the SNES game also released in Europe)?

Anyway, thanks a lot!

EDIT
The read-me reads like this:
Spoiler:
NO STAGE DIFFICULTY SCALING

            By Zimgief


* PRESENTATION *

Difficulty in Gradius III depends on multiple factors.
The first and most obvious one is the Game Level in the Option Mode. Easy, Normal, Hard (and the unlockable Arcade).
It affects speed of ennemies and bullets, as well as the frequency ennemies shoot at you. Also, the number of minor ennemies generated during boss fights, and the number of "option-eating" ennemies that chase you during stages.

But the speed of ennemies and bullets as well as the frequency ennemies shoot at you are also affected by the stage you are in. The farther you go, the harder it gets.
Which is bad game design, especially in a Gradius game:
- different humans, at different ages, do not have the same reactivity. Everyone should be able to choose just the right amount of speed he or she is confortable with. This is not possible in the base game, as the speed increases multiple times during a single playthrough.
- when you are decently upgraded, this increase in speed is barely noticable because ennemies die as soon as they appear. But if YOU die, recovery is next to impossible even in Normal. At this rate, why have any lives and credits at all?

Knowing all this, the purpose of this hack is to remove stage difficulty scaling. So you can choose a Game Level (easy, normal, hard, arcade) that does not subreticiously overwhelmes you, and does give you better chances of recovering when you die.


* HOW TO PLAY *
Apply the patch to a US rom (maybe works with EU and J? Didn't try, sorry!).


* ACKNOWLEDGMENT *
slidelljohn (a.k.a. [J]), who provided the hex editing documentation


* VERSION HISTORY *
1.0 - First public release (01/07/2019)
« Last Edit: July 01, 2019, 11:44:49 am by Zimgief »

slidelljohn

  • Full Member
  • ***
  • Posts: 249
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #79 on: July 02, 2019, 04:02:48 am »
Your welcome! 8)

Awesome! :thumbsup:

Not sure why changing easy to 0x08 is not working for you. I just double checked and it work the 1st time for me so the data is accurate. Maybe you changed the wrong byte or you never changed the difficulty to easy. The game does start on normal mode.

Unfortunately I don’t think a no flickering hack is possible. Now I do think it’s possible for less flickering. %25 of your sprites in gradius 3 are for backgrounds. Most of the stars in the background are sprites and that’s going to cause more chances to hit the sprites per line limit. On the plant level when fighting the boss the upper background tiles and the lower background tiles are all sprites and you can see those flashing a lot. I could probably make those stop flashing by doubling the vram and have those sprites on one of the background layers. I also found the algorithm that causes the flashing of sprites when the game is paused. The game rotates some of the last sprites in oam to the 1st sprites in oam and it might be possible to change that up a little bit. It’s going to be some time before I get to make any modifications for the flashing of sprites but I have definitely been looking at the causes. There are emulators that have mods for the sprite limit to help with flashing and the super nt also has that feature but both of those mods I don’t think can work on original hardware.

I may or may not look into the parodius. I never played it and I don’t really have any interest in it plus it’s been hard to work on my own projects lately. But who knows I might look into it one day. You could probably find that data yourself if you look at your ram while changing the difficulty settings. Somewhere in the ram a value is changing. That’s how I find stuff like that. After I find the ram address for the difficulty I just run a trace and find how that value gets there.

Your welcome! Sorry it took so long to get that doc for you. I should probably better organize the information I find on the games that I like to hack. And thanks for the credit! :)