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

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

niuus

  • Jr. Member
  • **
  • Posts: 74
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #40 on: May 09, 2019, 01:11:15 am »
Unfortunately I'm probably not going to be doing much more gradius 3 stuff.
I mainly starting playing around with gradius 3 so I could learn how to make
a snes game use the sa-1 chip. Vitor Vilela's sa-1 work is really amazing and
hats off to him for everything he has done. sa-1 is the future of snes rom
hacking. I think anyone that was interested in the gradius 3 fastrom hack should
be more interested in Vitor Vilela's gradius 3 sa-1 hack. The sa-1 hack may not
be perfect now due to no slowdowns but the gameplay could be modified to make it
right just like how Vitor Vilela modified the unlock arcade mode button presses.
I'm going to continue learning the sa-1 so I could one day add to the list of
sa-1 hacks. Hopefully Vitor saves mmx for me to do. :laugh:
Oh well, i respect your decision! You could maybe make an official release of your last patch here on romhacking, the work you have done is STILL amazing and perfectly playable.

So, are you pursuing Super V-Power! now? That could be a game changer for many future romhacks and games.  :beer:

slidelljohn

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #41 on: May 09, 2019, 02:11:54 am »
I guess I could upload what I have with the fastrom patch. Yea, I’m going to do some more stuff with the super v-power mod chip. I have a new design for the mod chip. The mod chip is going to be 3 pcb’s. 1 through hole pcb for the ppu/cpu connections and 2 bga pcb’s for the vram chips. I’m also going to do some more research on creating sa-1 hacks so I could get the mmx + sa-1 + 128kb of vram going. I guess I could also finish updating the bsnes plus vram expand debugger to show the extra vram. I was making good progress editing that new debugger.  Has anyone tested out that new bsnes plus vram expand debugger that I made some modifications to? I know it’s still buggy but I was able to make a few improvements to it.

Aaendi

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #42 on: May 09, 2019, 01:28:19 pm »
http://www.mediafire.com/file/3d00sa1ndp2n79q/Gradius_III_optimization.ips/file

Here is what I've done so far.  I think I'll take a break with this, because it's dominating all my time.

slidelljohn

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #43 on: May 09, 2019, 02:45:49 pm »
I may upload whats already done to the fastrom patch. Do you want me to include your
optimizations if I upload it?

Here is how far I got in my sa-1 that hack I was making:
http://www.mediafire.com/file/4y0yb44mcvhhyas/Gradius_III_%2528U%2529_%255B%2521%255D_sa-1_test.ips/file

I'm still going to finish it because I still need to earn how to get the sa-1
working in a snes game. It doesnt use the sa-1 for the asm yet but most ram
is already loading in bw-ram. The sa-1 is up and running its main loop and I did
test out graphics decompression routine and it seemed to be working fine. The main
thing is finishing the transfer of the rest of wram to bw-ram. It was a lot of work.

Aaendi

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #44 on: May 09, 2019, 05:40:27 pm »
Yeah, sure if you want to.

I'm wondering will an optimized SA-1 hack have any improvements over a non-optimized SA-1 hack?  I don't think the original game ever went slower than 30fps.

slidelljohn

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #45 on: May 09, 2019, 06:54:21 pm »
I guess it depends on if there are any slowdowns left but I don't think there
are any.

Did you have any other plans for gradius 3 or did you just want to optimize the
code? I do still have other things that I could possibly do. Fastrom and sa-1
wasn't the only things.
« Last Edit: May 09, 2019, 07:16:12 pm by slidelljohn »

Grego

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #46 on: May 09, 2019, 10:40:37 pm »
There is still slight slowdown in the sa1 hack, so optimization might fix some of that. It runs great tho, super hard.
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

Aaendi

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #47 on: May 10, 2019, 12:45:57 am »
How is that possible?  Does the game not run entirely on the SA-1 side?  Or is the S-CPU and SA-1 accessing memory at the same time?

slidelljohn

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #48 on: May 10, 2019, 01:31:42 am »
I played up to the bubble stage and I didn’t notice any slowdowns with 4 options and the charging lasers. I think but I’m not sure both of the cpu’s are always running at the same time after you activate the sa-1. I haven’t look at the code yet but I don’t think vitor would have them acces memory at the same time because it would slowdown the sa-1. He has written some really good docs on taking full advantage of the sa-1 chip.

@Grego
Which level(s) have you noticed slowdown in on vitors sa-1 hack?
« Last Edit: May 10, 2019, 07:09:32 pm by slidelljohn »

Grego

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #49 on: May 10, 2019, 02:20:23 am »
The boss at the end of level 3 with full upgrades slows down slightly. And the missile boss on the boss run.

Just a thought, a flicker algorithm would be nice, invisible bullets when too much stuff on the screen is unfair.
« Last Edit: May 10, 2019, 02:53:00 am 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

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #50 on: May 10, 2019, 07:09:03 pm »
Interesting, I didn’t think there would be any slowdowns left.
I guess maybe I should continue rewriting all of the asm to help remove slowdowns. I have something that could possibly remove some flickering in certain situations but for the most part I don’t think all of the flickering can be removed unless you use a emulator or super nt that supports the no sprite limit.

Grego

  • Jr. Member
  • **
  • Posts: 98
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #51 on: May 10, 2019, 09:17:49 pm »
If you continue optimizing the game make sure to take into consideration his ram remapping.

A prioritized flicker system would be best, player shots flickering first, then items, etc. Not sure how hard that would be to achieve.
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

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #52 on: May 10, 2019, 11:40:23 pm »
I’m going to continue but not with his hack. I had my own sa-1 hack that I was doing before he started his so I’m familiar with sa-1 bw-ram mapping. I only had about 0x2000 wram left to remap to bw-ram in my sa-1 hack.

Aaendi

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #53 on: May 11, 2019, 02:22:51 pm »
The hard part about optimizing Gradius 3 is a lot of it has to do with the way tables were arranged.  It stores metasprite coordinates as signed 8-bit values that have to be sign extended to 16-bit.

There's also a routine that I have no idea what it does, but it somehow effects bubble movement, and involves changing bytes in an array.  I have no clue why a routine changing bytes in an array would effect bubble movement.

slidelljohn

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #54 on: May 11, 2019, 03:39:23 pm »
Which routine? I can take look at it if you want me to. The array might be for a dma of bg2 data. The bubbles are sprites and bubbles are on bg layer 2.
« Last Edit: May 11, 2019, 04:37:03 pm by slidelljohn »

Aaendi

  • Jr. Member
  • **
  • Posts: 24
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #55 on: May 11, 2019, 06:13:24 pm »
The routine at $82980e.

slidelljohn

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #56 on: May 13, 2019, 07:22:07 am »
Is this the array that is located at $01:E2BD?

Code: [Select]
7E FF 07 00
80 FF 04 00
82 FF 01 00
FE FF 02 00
02 00 02 00
7E 00 01 00
80 00 04 00
82 00 07 00
FF FF

I can take at look at it later tonight when I get more time.

snesfanboi

  • Jr. Member
  • **
  • Posts: 5
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #57 on: May 14, 2019, 06:25:01 pm »
I may upload whats already done to the fastrom patch. Do you want me to include your
optimizations if I upload it?




Would love this, to me it's a far more natural solution to gradius 3's problems on the snes. I'm the dev balanced stuff out with slowdowns, some of the bosses on the sa-1 version are too hard now and the hardest difficulties aren't worth trying.

Keep up the great work. Unrelated but one game that has awful slowdown is final fight 3 co-op, its pretty much unplayable. That game is fastrom though

slidelljohn

  • Sr. Member
  • ****
  • Posts: 257
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #58 on: May 17, 2019, 09:04:01 pm »
@snesfanboi
Maybe it might be best to do 2 separate patches. A fastrom and a
fastrom plus optimizations. The goal is to remove all slowdowns
so the further we progress the more the game is going to play like
the sa-1 patch. When we get all of the slowdowns out I'll see about
balancing out the game play so its not too hard. I don't really have
any interest in the final fight series but if someone gets a disassembly
dump of it similar to the disassembly I did for gradius 3 then someone
might consider making some optimizations to the code. The disassembled
code is very important to making these kinds of modifications. It took
awhile to do gradius 3 disassembly but it was well worth it.

@Aaendi
I'm currently working on dissecting the whole function $02/96DF-$02/99E2.
Not sure if you made any progress on figuring out exactly how that array
works yet but I'm making progress on it and I should have it fully figured
out soon. While I was dissecting the function $02/96DF-$02/99E2 I couldn't
help but try out a few optimizations. Let me know if any of these
optimizations are useful.

This code looked like it could use a optimization.
Code: [Select]
$82/9819 E6 18       INC $18         [$00:0018] A:08E8 X:0C00 Y:08E8 D:0000 DB:7E S:1DE6 P:nvmbdIzc V:011 H:0504 F:12 C:07
$82/981B E6 18       INC $18         [$00:0018] A:08E8 X:0C00 Y:08E8 D:0000 DB:7E S:1DE6 P:NvmbdIzc V:011 H:0594 F:12 C:07
$82/981D E6 18       INC $18         [$00:0018] A:08E8 X:0C00 Y:08E8 D:0000 DB:7E S:1DE6 P:NvmbdIzc V:011 H:0644 F:12 C:07
$82/981F E6 18       INC $18         [$00:0018] A:08E8 X:0C00 Y:08E8 D:0000 DB:7E S:1DE6 P:NvmbdIzc V:011 H:0694 F:12 C:07

I wrote this in its place.
Code: [Select]
$82/9819 A9 04 00    LDA #$0004                 A:0AA4 X:0C00 Y:0AA4 D:0000 DB:7E S:1DE1 P:nvmbdIzC V:008 H:0068 F:25 C:03
$82/981C 18          CLC                        A:0004 X:0C00 Y:0AA4 D:0000 DB:7E S:1DE1 P:nvmbdIzC V:008 H:0086 F:25 C:02
$82/981D 65 18       ADC $18         [$00:0018] A:0004 X:0C00 Y:0AA4 D:0000 DB:7E S:1DE1 P:nvmbdIzc V:008 H:0098 F:25 C:04
$82/981F 85 18       STA $18         [$00:0018] A:E2C1 X:0C00 Y:0AA4 D:0000 DB:7E S:1DE1 P:NvmbdIzc V:008 H:0126 F:25 C:04
The original is 28 cycles and the new is 13 cycles.

You can also use the same optimization for this code as well and save 1 cycle. Just change the value of the lda to 0x0002.
Code: [Select]
$82/98AA E6 18       INC $18         [$00:0018] A:08D6 X:0C00 Y:08D6 D:0000 DB:7E S:1DE3 P:nvmbdIzC V:055 H:0108 F:30 C:07
$82/98AC E6 18       INC $18         [$00:0018] A:08D6 X:0C00 Y:08D6 D:0000 DB:7E S:1DE3 P:NvmbdIzC V:055 H:0158 F:30 C:07

Here is another one that can be optimized.
Code: [Select]
$02/9771 B5 12       LDA $12,x  [$00:7C00]   A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21150 VC:000 00 FL:00
$02/9773 DA          PHX                     A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21158 VC:000 00 FL:00
$02/9774 0A          ASL A                   A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21166 VC:000 00 FL:00
$02/9775 AA          TAX                     A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21174 VC:000 00 FL:00
$02/9776 BF 80 97 02 LDA $029780,x[$02:F92E] A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21182 VC:000 00 FL:00
$02/977A FA          PLX                     A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21190 VC:000 00 FL:00
$02/977B 85 00       STA $00    [$00:1A40]   A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21198 VC:000 00 FL:00
$02/977D 6C 00 00    JMP ($0000)[$00:0000]   A:0300 X:61AE Y:004E D:1A40 DB:01 S:1DF3 P:eNvmxdIzcHC:21206 VC:000 00 FL:00

/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////
This is data not ASM. This is data for the jump above

$02/9780-$02/9787 data location
88 97
F7 97
32 99
BC 99
/////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////////

I wrote this in its place.
Code: [Select]
$82/9771 B5 12       LDA $12,x  [$00:2C5A]   A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0016 VC:000 00 FL:41148
$82/9773 F0 13       BEQ $13    [$9788]      A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0022 VC:000 00 FL:41148
$82/9775 3A          DEC A                   A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0028 VC:000 00 FL:41148
$82/9776 F0 09       BEQ $09    [$9781]      A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0034 VC:000 00 FL:41148
$82/9778 3A          DEC A                   A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0040 VC:000 00 FL:41148
$82/9779 F0 03       BEQ $03    [$977E]      A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0046 VC:000 00 FL:41148
$82/977B 4C BC 99    JMP $99BC  [$81:99BC]   A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0052 VC:000 00 FL:41148
$82/977E 4C 32 99    JMP $9932  [$81:9932]   A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0058 VC:000 00 FL:41148
$82/9781 4C F7 97    JMP $97F7  [$81:97F7]   A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0064 VC:000 00 FL:41148
$82/9784 EA          NOP                     A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0070 VC:000 00 FL:41148
$82/9785 EA          NOP                     A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0076 VC:000 00 FL:41148
$82/9786 EA          NOP                     A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0082 VC:000 00 FL:41148
$82/9787 EA          NOP                     A:0003 X:2C48 Y:1F3F D:0000 DB:81 S:1DE3 P:envmxdIzCHC:0088 VC:000 00 FL:41148

Here is how many cycles for each jump.
Code: [Select]
$82/9771 B5 12       LDA $12, X      [$00:0CD2] A:9771 X:0CC0 Y:0070 D:0000 DB:81 S:1DE3 P:NvmbdIzc V:020 H:1006 F:44 C:05
$82/9773 F0 13       BEQ $13         [$9788]    A:0000 X:0CC0 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:020 H:1040 F:44 C:03 = 8  //$82:9788

$82/9771 B5 12       LDA $12, X      [$00:0C12] A:9771 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:NvmbdIzc V:009 H:0212 F:45 C:05
$82/9773 F0 13       BEQ $13         [$9788]    A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:009 H:0246 F:45 C:02
$82/9775 3A          DEC A                      A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:009 H:0258 F:45 C:02
$82/9776 F0 09       BEQ $09         [$9781]    A:0000 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:009 H:0270 F:45 C:03
$82/9781 4C F7 97    JMP $97F7       [$81:97F7] A:0000 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:009 H:0288 F:45 C:03 = 15 //$82:97f7

$82/9771 B5 12       LDA $12, X      [$00:0C12] A:9771 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:NvmbdIzc V:027 H:0278 F:13 C:05
$82/9773 F0 13       BEQ $13         [$9788]    A:0002 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:027 H:0312 F:13 C:02
$82/9775 3A          DEC A                      A:0002 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:027 H:0324 F:13 C:02
$82/9776 F0 09       BEQ $09         [$9781]    A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:027 H:0336 F:13 C:02
$82/9778 3A          DEC A                      A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:027 H:0348 F:13 C:02
$82/9779 F0 03       BEQ $03         [$977E]    A:0000 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:027 H:0360 F:13 C:03
$82/977E 4C 32 99    JMP $9932       [$81:9932] A:0000 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIZc V:027 H:0378 F:13 C:03 = 19 //$82:9932

$82/9771 B5 12       LDA $12, X      [$00:0C12] A:9771 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:NvmbdIzc V:011 H:0458 F:11 C:05
$82/9773 F0 13       BEQ $13         [$9788]    A:0003 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0492 F:11 C:02
$82/9775 3A          DEC A                      A:0003 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0504 F:11 C:02
$82/9776 F0 09       BEQ $09         [$9781]    A:0002 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0516 F:11 C:02
$82/9778 3A          DEC A                      A:0002 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0528 F:11 C:02
$82/9779 F0 03       BEQ $03         [$977E]    A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0580 F:11 C:02
$82/977B 4C BC 99    JMP $99BC       [$81:99BC] A:0001 X:0C00 Y:0070 D:0000 DB:81 S:1DE3 P:nvmbdIzc V:011 H:0592 F:11 C:03 = 18 //$82:99bc
This code can be further optimized by moving the most used jump to the spot where the least
cycles are used. These($02/977D 6C 00 00    JMP ($0000)[$00:0000]) jumps are used in a lot of places and if they have 8 or less jumps they can be optimized with this new code. So far I tested this new jump code at these locations.
Code: [Select]
$82/9728 //function for 128x128 bubbles
$82/9754 //function for 64x64   bubbles
$82/9771 //function for 32x32   bubbles
$82/978E //function for 16x16   bubbles

Here is another one that I optimized but I maxed out the character limit for this post
so I cant show the new codes. There was a lot of them to change.
Code: [Select]
$82/815D A5 03       LDA $03    [$00:0003]   A:00ED X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:envmxdIzcHC:1138 VC:008 00 FL:42835
$82/815F 8D 02 42    STA $4202  [$81:4202]   A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1166 VC:008 00 FL:42835
$82/8162 EA          NOP                     A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1196 VC:008 00 FL:42835
$82/8163 EA          NOP                     A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1208 VC:008 00 FL:42835
$82/8164 EA          NOP                     A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1220 VC:008 00 FL:42835
$82/8165 EA          NOP                     A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1232 VC:008 00 FL:42835
$82/8166 AD 16 42    LDA $4216  [$81:4216]   A:ED10 X:0C00 Y:0030 D:0000 DB:81 S:1DD9 P:eNvmxdIzcHC:1244 VC:008 00 FL:42835
There are at least 2 different STZ's that could be used instead of using these 4 nops
to wait the 8 cycles to get your results.

I laughed when I seen this code. There is no way someone wrote this by hand is there?
And no, the code isn't trying to use up cycles to get results like the multiplication code.
Code: [Select]
$02/97A8 4C AB 97    JMP $97AB  [$02:97AB]

May 22, 2019, 12:29:49 am - (Auto Merged - Double Posts are not allowed before 7 days.)
@Aaendi
I have most of that array figured out. This is for 32x32 size bubbles collision data.
This data appears to be for only bubbles colliding with bubbles.

Code: [Select]
3x3 8 pixel squares(24x24 pixel) minus a center square(square #5)
example:
ooo
oxo
ooo

7E FF 07 00 //1st 2 bytes = collision square #1 location, 2nd 2 bytes is for direction to bounce off of bubble
80 FF 04 00 //1st 2 bytes = collision square #2 location
82 FF 01 00 //1st 2 bytes = collision square #3 location
FE FF 02 00 //1st 2 bytes = collision square #4 location
02 00 02 00 //1st 2 bytes = collision square #6 location, 0x02 0x00 = left, right, opposite
7E 00 01 00 //1st 2 bytes = collision square #7 location, 0x01 0x00 = upper/right, lower/left, opposite   
80 00 04 00 //1st 2 bytes = collision square #8 location, 0x04 0x00 = up, down, opposite
82 00 07 00 //1st 2 bytes = collision square #9 location, 0x07 0x00 = upper/left, lower/right, opposite
FF FF       //end of collision size and direction
Also if you set the 2nd 2 bytes to bounce off of bubble to 0x00 0x00 then
the 32x32 bubbles wont collide with each other. It appears the 2nd 2 bytes
have a max of 0x7 and that's not looking at the data that is looking at the asm.

Here is the 16x16 bubble collision data
Code: [Select]
$81:E2df
00 00 06 00 //collision square #1 location, 0x06 00 = up/down, left/right, opposite
FF FF

Ram used for colliding bubbles is 7E:C000-7E:CFFF. 64x32 8x8 square collision array. 2 bytes per square

Here is the 64x64 bubble collision.
Code: [Select]
64x64 bubble collision

 00000
00xxx00
0xxxxx0
0xxxxx0
0xxxxx0
00xxx00
 00000

$01:E25B
7C FE 07 00 //collision square #1
7E FE 04 00 //collision square #2
80 FE 04 00 //collision square #3
82 FE 04 00 //collision square #4
84 FE 01 00 //collision square #5
FA FE 07 00 //collision square #6
FC FE 07 00 //collision square #7
04 FF 01 00 //collision square #11
06 FF 01 00 //collision square #12
7A FF 02 00 //collision square #13
86 FF 02 00 //collision square #19
FA FF 02 00 //collision square #20
06 00 02 00 //collision square #26
7A 00 02 00 //collision square #27
86 00 02 00 //collision square #33
FA 00 01 00 //collision square #34
FC 00 01 00 //collision square #35
04 01 07 00 //collision square #38
06 01 07 00 //collision square #39
7C 01 01 00 //collision square #40
7E 01 04 00 //collision square #41
80 01 04 00 //collision square #42
82 01 04 00 //collision square #43
84 01 07 00 //collision square #44
FF FF

I also have the 128x128 bubble collision data mapped but my posts text is maxed out so
I cant post it yet. :D
« Last Edit: May 22, 2019, 11:58:28 am by slidelljohn »

Zimgief

  • Jr. Member
  • **
  • Posts: 65
    • View Profile
Re: slidelljohn (a.k.a.[J]) snes projects page
« Reply #59 on: May 22, 2019, 12:02:35 pm »
Here an answer if you can't double post. :p