Language…
8 users online: Batata Douce, DanMario24YT, ForthRightMC, Isikoro, kurtistrydiz, LightAligns, mathew,  Saphros - Guests: 290 - Bots: 396
Users: 64,795 (2,378 active)
Latest user: mathew

SA-1 Pack - v1.40 released

Originally posted by Vitor Vilela
So far this week I have dedicated entirely at figuring out this bug and apparently there is no way to fix it.

That was really informative; thank you so much Vitor! Not only for this post, but for all the work you've been putting (and are continuing to put) into this. Still updating the thing after six years and dedicating days of research to my minor bug is just... wow. This thread may not get a lot of attention, but your work is greatly appreciated.

Originally posted by Vitor Vilela
So sadly, I think I have done the maximum possible and the only way to avoid that is simply removing all SA-1 IRQs from the patch and reallocate some of the routines back to the SNES CPU just for better ZSNES compatibility. I might do that as well for the next version.

If you do, that'd be extra icing on the cake, but fortunately this is nothing game-breaking. #tb{:)} I was planning to add the ZSNES warning intro to my hack anyway.


 
My layout has recently been updated, but you still have the old stylesheet cached and things might therefore not look as intended, as such, it’s recommended to reload the page.
Originally posted by Vitor Vilela

As you might know, SA-1 and SNES communicates though IRQs and when the SA-1 CPU needs to do a certain operation such as storing to WRAM ($7E-$7F), communicating to PPU or any other SNES-side thing, the chip needs to send an IRQ request to SNES and then the S-CPU does what the SA-1 asked for. It's the best method for fast communicating with the both CPUs and warrants full code compatibility between them because if there is something that the S-CPU or SA-1 CPU can't do, it gently asks one of them to do the task though IRQs.

IRQs are also used to communicate between the S-CPU and S-PPU. S-PPU, for example, sends an NMI (which is a non-interruptable IRQ) to the SNES at end of each frame. There's also the V-IRQ, H-IRQ and HV-IRQ whcih are IRQs generated when a certain position of the H-/V- counters reach a certain value. The most classic example is the Status Bar IRQ, that the S-CPU receives at around V-Count = 36 and then the S-CPU does mid-scanline writes (yes, exactly) to change the layer 3 x/y positions, current mode, some cgadsub addresses and a little more, depending if it's a mode 7 fight or not.

ZSNES thought it was a good idea to implement all IRQs in the same way. As well H-DMA and H-Blanks. Looking at the ZSNES source code, on the SA-1 part (sa1proc.asm, sa1regs.asm), when the CPU generates an IRQ simply a flag is set and nothing else. What makes the IRQ actually occur is on the file execute.asm and there you can see a huge fuzz x86 mess code which checks for every single possible IRQ and starts generating them depending on the occasion. However, when a certain interrupt request is received, ZSNES just sets it and leaves the routine. So it literally forgets everything else. Because of that, when SA-1 sends an IRQ to the SNES CPU, if it's triggered nearby H-blank, all HDMAs are automatically cancelled because ZSNES just "forgets" to execute them. And on the next scanline the HDMA is executed normally, except that everything will be shifted down by one scanline now.

For the next version of SA-1 Pack I'm currently working, I'm completely rewriting the IRQ and NMI routines. And I have attempted to make my IRQs give absolute priority to the PPU IRQs and only later check for SA-1 IRQs. So the risks of eventual scanline glitching would be avoided, which includes real hardware. Especially when there's HDMA involved.

However, ZSNES simply didn't work with the new IRQ controller. Once an IRQ is called, ZSNES does not clear the IRQ flags correctly and there is no way to know when an IRQ was generated by the PPU. Only by the SA-1. Because of that I had to write a custom IRQ controller just for ZSNES and still with all ZSNES-related-hacks that certainly would break other real hardware, it still keeps with that particular glitching. So sadly, I think I have done the maximum possible and the only way to avoid that is simply removing all SA-1 IRQs from the patch and reallocate some of the routines back to the SNES CPU just for better ZSNES compatibility. I might do that as well for the next version.

But don't get surprised: many games like to flicker on the ZSNES. Yoshi's Island Mode 2 levels are a nice example. VLDC9 overworld also has a lot of flickering on ZSNES, for the same reason (poor IRQ implementation).

I’d personally just drop supporting ZSNES at this point[1].


Footnote 1
I did the same with Internet Explorer on my website.
I think while it's reasonable to just drop ZSNES support, but I still worry that while the hacking community already dropped ZSNES entirely, there is still the playing community that likely a good chunk still use ZSNES and I do find important for keeping SA-1 Pack basic ZSNES support even if that involve some or other sacrifice on my part (like spending days on figuring some simple ZSNES issues and/or holding some specific features).

This is important even considering that now SA-1 Pack kinda of become a mainstream thing, that is, a good part of the user base is now using it for their hacks and removing ZSNES support would cause some stress in the community that I don't want to. I prefer waiting a bit more unless if I find a solid reason to just drop it (e.g. new feature completely breaks ZSNES and it's a game-changing thing).

Some people may not understand this post, may find it illogical but it's understandable. There is not much reason for people using ZSNES and at this point most of the computers should run at least Snes9x reasonable. Still, I prefer holding it a bit more. At least to respect the chunk that still needs and prefers ZSNES for whatever reason.
GitHub - Twitter - YouTube - SnesLab Discord
Hello, I think the people making the SA-1 Patch should give this thread a read.

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

Hello!

To make the patch work with SA-1 Pack, do the following modifications:

1) Change line 73 (dw $0000) to dw $3000. That will make the Direct Page use I-RAM.

2) Change line 75 (LDA #$01FF) to LDA #$1FFF. That will set the Stack Pointer to the proper place in SA-1 ROMs.

3) And add sa1rom after @asar, on line 1.

That should be all. It's more simple than can you imagine.
GitHub - Twitter - YouTube - SnesLab Discord
And only ZSNES cases the patch to activate? In that thread, someone said that his changes caused SNES9X to trigger the patch as well.

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

O.K., when I was trying to confirm if the ZSNES Incompatibility Notice patch was working, when I went to run it in ZSNES 1.51, the emulator said, "**INVALID ROM**" when it was set to display the SNES header name. Double clicking the ROM would cause the emulator to not load the ROM. The ROM was 8 MB and had your fixed ZSNES Incompatibility Notice patch installed. The ZSNES field in your patch is also set to 0.

So I took a new ROM, expanded it to 2MB, applied the SA-1 patch, and tried running it in ZSNES. The ROM was valid, but I just got a black screen.

It seems like there's no need for the ZSNES Incompatibility Notice patch because Super Mario World SA-1 ROMs by default seem to be completely incompatible with ZSNES if the ZSNES field in the SA-1 patch is 0.

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

This is correct. Setting ZSNES to 0 will likely make the emulator to not boot at all because of the SA-1 version of LZ2 and LZ3 decompression algorithm which tries to run code though the I-RAM which ZSNES does not support.

ZSNES 1.51 also does not work with 8 MB ROMs. They will simply not load. For that case you must use FuSoYa's ZSNES modification for 8 MB compatibility.

Regardless, I have submitted the SA-1 hybrid version of the ZSNES incompatibility notice here, if you are interested. Probably an incompatibility notice is better than a black screen or invalid ROM notification (though 8 MB ROMs won't load on ZSNES anyways; I recommend using 6 MB ROMs if you plan to use ZSNES).
GitHub - Twitter - YouTube - SnesLab Discord
O.K., I found a major bug with this patch, and I'm using Version 1.27. This bug will probably cause the patch in the Waiting to be Moderated Section to be rejected.

If I install Version 1.27, the Lives Exchanger Box glitches up!



All I did was expand a clean ROM to 2 MB like the quick guide says and inserted sa1.asm. I immediately tested the game in BSNES Plus, and BAM, Lives Exchanger Box glitched!

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

I think I might have found another bug. I can't confirm it because, depending on what I have inserted into my ROM, I think sometimes this bug triggers and other times it doesn't. You should try experimenting with Lunar Magic and various tools and patches and see what happens.

The SA-1 Patch Read Me says that, if you change the compression options, you must reapply sa1.asm so the proper decompression routine can be used.

But if I do what it says, which is change the compression to LZ3 then reapply sa1.asm, sometimes the game will crash before the title screen. But, like I said, I can't confirm that this will always happen. More testing is needed.

Also here's more information about the Lives Exchanger bug. Now, the Lives Exchanger function still works. Lives are still added and subtracted between Mario and Luigi, but the graphic representing number of lives next to the walking player won't update. The actual number of lives still changes, though, and the number displayed updates when you enter a level.

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

Originally posted by DPBOX
stuff about lives exchanger box

This is a glitch I've reported long ago, which also happens in previous versions. It can be fixed by applying this patch, courtesy of lx5

Quote
You should try experimenting with Lunar Magic and various tools and patches and see what happens.

Bug reports in this format aren't useful. Try to isolate the exact tool/patch that causes the problem.

In your case, this is likely caused by GPS which ships (shipped?) with an Asar version that has broken SA-1 addressing.

Quote
But if I do what it says, which is change the compression to LZ3 then reapply sa1.asm, sometimes the game will crash before the title screen. But, like I said, I can't confirm that this will always happen. More testing is needed.

I can't reproduce this glitch. Ensure you apply SA-1 before you start messing with the compression, and then re-insert after.
Thank you so much, Ragey. That patch is working, but, oddly enough, I'm not supposed to remap the RAM addresses.

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

Somewhat long change log but..

SA-1 Pack v1.31 (and v1.30) Released!

Version 1.31 changes:
  • Added support to Dynamic levels patch, built-in in Lunar Magic.
  • **Change Super No More Sprite Tile Limits setting header from 0x10 to 0x08**. This important change fixes various graphical glitches present in Bowser battle, such as Princess Toadstool appearing "in the front" of the clown car, Bowser's bowling ball having parts of its OAM tiles disappearing and additionally it fixes the softlock after beating Bowser, where the fireworks animation simply doesn't show out. However, this implies into having to you edit all levels that you used to have Sprite Header Index as 0x10 and change it to 0x08, otherwise you won't have more than 10 sprites on screen. The sprite header index 0x08 will not cause any problem on the original game because along index 0x03 and 0x05, it's unused in the original game while 0x10 was used for Bowser's battle scenes. This also now means you can play SMW normally using this patch, without having to use something else to fix Bowser.
  • Sprite resetting/cleaning routine now runs on SA-1 CPU. This should make level loading a few milliseconds faster.
  • Minor cleanup and rearrangements on the sprite loading routines.
  • Fixed live exchange not being properly updated on hardware. Patch by LX5.
  • Fixed graphical glitches when a mushroom (and likely other powerups) falls during Morton, Ludwig and Roy battles. SMW made it use a fixed OAM slot just for their battles, but Arujus while building the More Sprites patch thought the fixed slot would be used during normal levels as well and removed it thinking it would cause problems. I have undo that change and both works now.
  • Fixed sprite loading routine not running on SA-1 CPU during initialization. Now the routine is 100% SA-1 CPU.
  • Fixed minor grammar error on notable changes and on this document.
Version 1.30 changes:
  • Side note: does not work correctly with current version of RPG Hacker's VWF dialogues.
  • Rewrote SMW's IRQ handling system. Now it runs on RAM, gives PPU IRQ priority over SA-1 IRQ, added support for custom IRQ codes.
  • Added support for bypassing SMW's NMI routine to run on specific
    scanline as an IRQ, also known as "IRQ-as-NMI". In practice this trick,
    used in many games including Yoshi's Island, Super Mario RPG, Star Fox
    and more will allow for much more DMA uploads per time, which implies
    into more ExAnimations, Dynamic Sprites, etc., in sacrifice of vertical
    screen resolution.
  • IRQ and NMI now preserves $2224 and Direct Page. Direct Page usage and BW-RAM mapping is now allowed on SNES CPU side as well.
  • Rewrote most of the documents, including the README, to include more
    information and use markdown styling, which includes the BW-RAM, I-RAM,
    Memory Map Summary and Sprite Remap documents.
  • README and all other documents are now in .html format on the release .zip file.
  • Split some of the routines in sa1.asm to separate files.
  • Added W-RAM document.
  • Added known issues document.
  • Added notable changes document.
  • Added programming document, which was part of the README originally.
  • Updated quick guide to include updated information.
  • Added remap.asm with hybrid SA-1 Pack/normal definitions.
  • Made the SA-1 dynamic vectors loads value from vector info on initialization instead of static default vectors from SMW.


I didn't post v1.30 before because as soon as I was gonna write the new post I noticed I missed fixing the lives exchanger bug and I thought to postpone until I made something more stable to release. So the v1.30 was left within my GitHub repo.

--------------------------

This version does not work with VWF Dialogues and requires to you change your sprite header index to 0x08 instead of 0x10 for the 22 sprites mode. However it has native support for the new Lunar Magic version. I will be working on a fix for VWF dialogues patch itself on the next days, but you can use the new SA-1 Pack without VWF dialogues for now (the ROM will only cause problems when you open something with VWF).

Recommended upgrade procedure:
1) Edit your ROM with new Lunar Magic version
2) Apply this SA-1 Pack version.
3) **Update** and run your preferred Sprite Tool.

The current version of Romi's Sprite Tool will work fine except with the Goal Tape sprite. However you must update all of your sprites to take the sub off screen routines and map16 changes if you want to use them on the custom level size.

I already updated Romi's Sprite Tool and you can download it here. Will make a thread dedicated for Romi's Sprite Tool soon.

Download SA-1 Pack v1.31
GitHub - Twitter - YouTube - SnesLab Discord
Thanks for updating this #tb{:]}
Unfortunally I'll have to wait for a vwf dialogue compatible version to really switch my version of LM, if the new sa-1 pack breaks with this patch, but all of the changes sound pretty great and I can't believe that you optimized it even more.
Great Job #tb{:]}
My Youtube channel

Currently working on:
Project C

Finished project:
You can use the new SA-1 Pack and LM together, you just won't be able to open VWF dialogues for now. I plan on doing a quick fix soon.
GitHub - Twitter - YouTube - SnesLab Discord
Thank you very much, take as long as you want!

Edit:
Unfortunally this seems to break.
The game crashes after it displays the Nintendo presents logo.
Used a clean rom, LM 3.0, the sa-1 patch and followed your instructions.
It might be that I messed something up, but since I used this smw base before I'm pretty sure it's clean.
Edit2:
I don't know if I'm using the current version of asar though and I can't change it right now cause avira is really annoying...
As soon as I get it to stop deleting asar I update this post


Edit3: Yep, asar was an old version, I guess that was the fault, it works now.
My Youtube channel

Currently working on:
Project C

Finished project:
Hey, now that Lunar Magic 3.00 and SA-1 Pack 1.31 are out, is that Lives Exchanger Fix patch that was posted a few posts ago still necessary? It was meant to fix a bug in Version 1.26. Has that Lives Exchanger bug been fixed in Version 1.3.1? If I apply that Lives Exchanger Fix patch to my ROM with Version 1.31 installed, when I start the ROM up, all I get is a black screen. The Nintendo Presents logo doesn't appear.

Click the character on the right side of my layout to visit my Discord server and discuss and play and look at and get updates and sneak peeks of the games and other things I'm making.

The authors of these 2 My Little Pony fan games have removed their games from the Internet.
Rise of the Clockwork Stallions has been updated! Download My Little Pony: Rise of the Clockwork Stallions DX: Director's Cut and My Little Pony: Magic Shards now! Spread this link!

Originally posted by DPBOX
Hey, now that Lunar Magic 3.00 and SA-1 Pack 1.31 are out, is that Lives Exchanger Fix patch that was posted a few posts ago still necessary? It was meant to fix a bug in Version 1.26. Has that Lives Exchanger bug been fixed in Version 1.3.1? If I apply that Lives Exchanger Fix patch to my ROM with Version 1.31 installed, when I start the ROM up, all I get is a black screen. The Nintendo Presents logo doesn't appear.

Originally posted by Bitor Bilela
Fixed live exchange not being properly updated on hardware. Patch by LX5