Language…
9 users online: Astrakitu,  Ayami, DarthHylian, marioandsonicfan524, Phyll,  RussianMan,  Sayuri, sholmes, steelsburg - Guests: 109 - Bots: 228
Users: 64,667 (2,407 active)
Latest user: DarthHylian

SA-1 Pack v1.40

SMW Patches → SA-1 Pack v1.40

Submission Details

Name: SA-1 Pack v1.40
Authors: Arujus, Vitor Vilela
Added:
Version History: View
Tool: Asar
Requires Free Space: Yes
Bug Fix: No
Featured: Yes
Description: This pack of patches enables the SA-1 enhancement chip on your ROM and modifies most of the SMW engine to use the fast CPU, including regular/non-regular sprites and blocks, removing all slowdown on levels + overworld plus it reduces the loading times. As a bonus, it increases the maximum number of sprites on screen to 20, sprites per level to 255 and the maximum amount of tiles on screen to 128. Additionally, it optimizes some heavily math-based routines, such as the windowing HDMA effects.

With this, almost all slowdown possible in-game disappears.

Features:
  1. Increases the maximum amount of sprites *on screen* to 22.
  2. Increases the maximum amount of sprites *per level* to 255.
  3. Adds MaxTile, a system that allows to place much more sprite tiles on screen.
  4. Moves the sprite processing code to SA-1, making all sprites run about 4x faster compared to S-CPU.
  5. Optimizes some routines to make the level/overworld loading faster.
  6. Moves almost all non standard sprites, such as shooters, generators, cluster, extended, minor extended, bounce, score and smoke to the SA-1 CPU.
  7. Moves the block/map16 handling to the SA-1 CPU.
  8. Moves almost all overworld code to SA-1 side, leaving minimal CPU usage on overworld.
  9. All other SA-1 features such as 6/8MB support, 10.74 MHz CPU clock, Character Conversion DMA, fast RAM, arithmetic functions, etc., can be used.

SA-1 Pack v1.40 changes:
  • Adds MaxTile, a system responsible for managing OAM slots across the entire game. Via dynamic allocation, the system allows to you use ALL OAM slots for anything, including standard sprites with pretty high compatibility with previous resources. See MaxTile documentation for more information.
  • The addition of MaxTile also fixes a few priority issues caused by NoMoreSpriteTileLimits.
  • Now it's possible to detect SA-1 Pack and its version. See Programming guide for more information.
SA-1 Pack v1.36 changes:
  • Fixed a visual glitch in the bonus game, where one of the boxes (and its item) is floating on screen, a bit higher than the ground and scrolling vertically. Thanks goes to RaspberryAlpine for finding out this.
  • Made the DMA transfer on the LZ2/LZ3 decompression retry if it gets interrupted. Although NMI/IRQ does not interrupt DMA, HDMAs can actually will DMA get interrupted. Thanks goes to p4plus2 for revealing that detail for me.
  • Updated programming guide to include details about common routines on SMW and on which processor SA-1 Pack uses (either SNES or SA-1). Also organized the documentation a bit.
SA-1 Pack v1.35 changes:
  • Added the "finish OAM" hook, an extremely useful feature for programmers. See $40:0110-$40:0112 for more details on BW-RAM docs.
  • Added DMA remap which moves all game DMA logic to channel 2 and Windowing HDMA to channel 1, freeing up channel 7 for custom HDMA. In addition, DMA channel 0 is now reserved for transfers during game play (outside interrupts), fixing a rare bug on the LZ2/LZ3 decompressor when you decompress a GFX file while the game is running and *just* when the DMA executes, a NMI occurs and the DMA settings end up reseted. For the effectiveness of this solution, please change all patches to use DMA channel 2 instead of 0 or 1. This fixes issue #14 on GitHub.
  • Made all levels by default use Sprite Memory Header 0x08, allowing to all original levels have up to 22 sprites on screen. Note that I have included some logic to not take in account boss fight levels and levels that has wigglers (Forest of Illusion and Outrageous), since they are not compatible with.
  • Fixed bank switching getting incorrectly reset to original values after reapplying SA-1 Pack, which makes ROMs larger than 4 MB completely unplayable. This fixes issue #15 on GitHub
  • Fixed an issue where the Layer 3 tilemap would glitch if a custom game over screen was used. Caused by a remap error. Thanks MFG for figuring out and providing the fix. Merges pull request #18 on GitHub.
  • Fixed some inconsistencies on the programming guide.
  • Minor changes on readme file.

Tags: chip maxtile sa-1 speedup sprites
Comments: 61 (jump to comments)
Download 188.30 KiB | 4,114 downloads

Screenshots

View all

Comments (61)

darkreader2636 Link
There is a typo on README "Apply the sa1.asm patxh using Asar. "
Anas Link
This version of SA-1 Pack has bugs related to wigglers and M7 boss rooms. If you wanna fix it, use this fork by Vitor and LX5. It should fix all of these problems (unless I missed something as usual...)
RedROM Link
I am working on a new hack; basically no levels done yet. When I use a clean ROM, it works fine, but if I use the Lunar Magic hijack, before or after the patch, the game freezes on title.
Vitor Vilela Author Link
Originally posted by SJandCharlieTheCat
For anyone who might get tripped on this: the info in "quick quide.txt" and README.html are somewhat contradictory. The former tells you to open your rom in Lunar Magic and manually expand the size (to 2 MB), while the latter says it's unnecessary.

While the latter is accurate, if you're going to apply GFX compression to your rom, note that you should open LM and apply the compression first — which will also prompt you to expand the rom to 1 MB at least — so that you don't have to reapply SA-1.

(If you open it in Lunar Magic to do, though, make sure NOT to make modifications to a level.)


Expanding the ROM before applying SA-1 Pack is fine, I will adjust the quick guide. However, changing GFX compression options before applying SA-1 Pack is NOT fine and that can cause trouble to your ROM because LM will not apply the SA-1 mappings required for it.

If you want to use LZ3, change the decompression options after applying SA-1 Pack and then apply SA-1 Pack again for activating the faster decompression algorithm for LZ3.
SJandCharlieTheCat Link
For anyone who might get tripped on this: the info in "quick quide.txt" and README.html are somewhat contradictory. The former tells you to open your rom in Lunar Magic and manually expand the size (to 2 MB), while the latter says it's unnecessary.

While the latter is accurate, if you're going to apply GFX compression to your rom, note that you should open LM and apply the compression first — which will also prompt you to expand the rom to 1 MB at least — so that you don't have to reapply SA-1.

(If you open it in Lunar Magic to do so, though, make sure NOT to make modifications to a level.)
kaitri Link
damn these screenshots look like mario maker lul
 MarkAlarm Link
Moderated with:
Lunar Magic 3.30, 3.21
Asar 1.81, 1.71
GPS 1.4.21
PIXI 1.31
UberASMTool 1.4
AddmusicK 1.0.8
SA-1 Pack 1.40 (how shocking)
Snes9x v1.60, bsnes-plus v05, Console + SD2SNES

Sorry for this taking so long to moderate, there's a lot to unpack here! Everything that I and some of the other moderators tested worked as intended. From MaxTile to sprite spamming to vanilla game improvements, everything worked beautifully.

Note to end users that if you update to this version, you may have to update some other patches as well due to a change in DMA channels. This is mostly applicable for stuff like player graphics patches, status bar/overworld huds, and retry.
Vitor Vilela Author Link
Originally posted by BlueToad
I don't quite understand how Maxtile works. Is it like when a sprite is onscreen its tiles are stored in the two graphics pages and are removed when it desapawns, thus potentially allowing sprites from different headers to coexist?


MaxTile allows for more sprites tiles on the screen at the same time (such as multiple banzai bills), but it doesn't come with any management system for uploading graphics to SP1-SP4 dynamically.

However, LX5's https://github.com/TheLX5/DynamicSpritesetSystem does what you're looking for
BlueToad Link
I don't quite understand how Maxtile works. Is it like when a sprite is onscreen its tiles are stored in the two graphics pages and are removed when it desapawns, thus potentially allowing sprites from different headers to coexist?
 K.T.B. From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Originally posted by Xboy1282
Bruh what's the point if you can't apply it to a modified ROM 90% of people aren't even gonna find this before they started making the ROM

It's pretty common practice for hackers to periodically port over all of their resources to a new base ROM for various reasons, so that wouldn't cause any serious problems. Plus, most of the people who would use this patch at all are advanced hackers who already have experience / have finished hacks before, so it's not that unreasonable to think that someone would know of this (extremely famous) patch prior to beginning a new hack.

Besides, it's not like there's anything Vitor Vilela can do to fix this issue.
Xboy1282 From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Bruh what's the point if you can't apply it to a modified ROM 90% of people aren't even gonna find this before they started making the ROM
Atari From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
I patched a fresh ROM and loaded it up on my SNES with a SD2SNES cartridge to try this. This is amazing!
I've been playing SMW since it released and it is so cool to have such high performance and never feel any slow down.
This makes 1 of the best games ever, even better.
Thank you to the authors! <3
El Cuh Fermin From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Originally posted by Darkbloom
Dynamic sprites aren't compatible with SA-1 anymore!


Dynamic Sprites patch that uses from its dsx.asm is already implemented on SA-1
Blizzard Buffalo Link
Imagine the following equation:

This SA-1 Update with More Sprites
+
Mode 7
+
Mega Mushroom for Custom Powerups
=
The most awesome SMW Romhack ever made.
anonimzwx Link
When i try to use Widescreen using the system provided for SA-1, doesn't work properly because it generates random inputs, for example when I press right the player spinjumps.

here i have a uberasm "global_code.asm" with the code that i used:

Code
load:
	rts
init:
	rts
main:
	rts
nmi:
    LDA.b #$E0
    STA $1D01
    LDA.b #$00
    STA $1D00

    LDA $6100
    CMP #$1E
    BEQ .pass2
    CMP #$1F
    BEQ .pass2
    CMP #$10
    BCS .pass1
        
    BRA .noLowerRes
.pass1
    CMP #$17
    BCC .pass2
        
    BRA .noLowerRes
.pass2

    
    REP #$20
	LDA #$0000
    STA $4360
	LDA #bright_table
    STA $4362
    SEP #$20
    LDA.b #bright_table>>16
    STA $4364

    LDA.b #$E0-$08
    STA $1D01
    LDA.b #$01
    STA $1D00

    LDA #%01000000
    TSB $0D9F|!addr
    LDA $0D9F|!addr
    STA $420C

.noLowerRes
RTS

bright_table:
db $08,$80 ;0-1
db $68,$0F ;2-3
db $68,$0F ;4-5
db $08,$80 ;6-7
db $00
obersteiner86 From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
no the steps are wrong dont open up the rom in lunar magic asar 1.71 expand the rom after you apply the sa-1 patch, after you apply the sa-1 patch, patch all orther patches to you rom(warrning you patches need sa-1 support now) after all patches apply to you rom then open up the rom with lunar magic and expand it to 4 mb, because if you us retry patch you need to change some stuff in lunar magic ore you rom not works. But ther is are tool on the forum that ats sa-1 support to most of the patches
GrumpyWalrus From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Can anyone confirm if there is a compatibility issue in the newest Lunar Magic release? I've spent the last 2 hours downloading new roms, following both the online README and the included txt readme, on a clean rom in both SNES9x v1.60 and BSNES v1.55 and the BSNES nightly beta release, and cannot get the SA-1 patched rom to load, even the ASAR states it's patched correctly with no issues.

Steps I've followed:
1. Opened new, clean, unmodified rom in Lunar Magic v3.21.
2. Expanded rom to 2mb.
3. Opened ASAR.
4. Put SA-1.asm patch in ASAR.
5. Put rom in ASAR.
6. Hit enter.
7. Read the screen where bites were increased and there were no issues.
8. Opened rom in every emulator I have on my PC to find that nothing works.

Thanks fellas for the help.
Dark Prince From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Originally posted by Romano338
Originally posted by Dark Prince
no more sprite tile limits:
autor: seven-ish persons
the best slowdown/disapearing tiles remover in smwc that even makes some resources that work get rejected for not being compatible:
autor: two persons

i see this patch pretty useful and easy for use.

One is from 2011, the other from 2013.
And not everything worked with SA-1. You couldn't even play SA-1 on certain flash cart a few years ago. Easy to criticize the work of others.

eh... i wasn't even criticizing the work... sa-1 is probably the best patch on smwc, and a good alternative for the old sprite tile limit patch, i just found out funny the fact that a special chip was made by two persons, and a patch that fixes the amount of sprite tilemap on screen was made by seven persons, the old one is pretty cool, that would explain it's use on smw hacking, and why would i criticize someone else's work, if it's pure asm, and i don't know asm? lmao
Romano338 From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Originally posted by Dark Prince
no more sprite tile limits:
autor: seven-ish persons
the best slowdown/disapearing tiles remover in smwc that even makes some resources that work get rejected for not being compatible:
autor: two persons

i see this patch pretty useful and easy for use.

One is from 2011, the other from 2013.
And not everything worked with SA-1. You couldn't even play SA-1 on certain flash cart a few years ago. Easy to criticize the work of others.
mish1 From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
they still are
Vivian Darkbloom From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Dynamic sprites aren't compatible with SA-1 anymore!
Batata Douce From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Originally posted by Kiatus
can you make this compatible with zsnes pleseae


You can use Zsnes 8MB Custom Build by FuSoYa(search on Google).
Wheat From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Is there anyway I can use an unclean rom? I only needed this patch after I started making my hack and I could use a clean new rom but I would need to start over!!!
SweatyNoodle From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Originally posted by Maxodex
is this compatible with SA-1

lol funny
Dark Prince From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
no more sprite tile limits:
autor: seven-ish persons
the best slowdown/disapearing tiles remover in smwc that even makes some resources that work get rejected for not being compatible:
autor: two persons

i see this patch pretty useful and easy for use.
Kiatus From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
can you make this compatible with zsnes pleseae
Maxodex From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
is this compatible with SA-1
lx5 From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Is This Compatible With Super FX And VWF Cutscene Tool
AntiDuck From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Originally posted by Shiny Ninetales
yeah please make this compatible with everything instead of making everything compatible with this

I'm not sure that's how SA-1 would work, I'm pretty sure that if there was a way to keep everything compatible with SA-1 on it's own, then he would have done that a long time ago. Besides, SA-1 already seems really weird with how it works on the SNES.
 Ayami From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
yeah please make this compatible with everything instead of making everything compatible with this
El Cuh Fermin From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Please make compatible with powerups 3.3.4, ExGFX, AddMusicK, Gopher Popcorn Stew, PIXI as well and everything that needs to be compatible.

Edit: I solved that I follow directions that I have to expand to any mb of 2, 3, or 4.
So never mind. It works fine.
El Cuh Fermin From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Originally posted by AntiDuck
Originally posted by izaguirrefermin28
It has a black screen.

Did you insert it to a clean ROM that's already been expanded to 2MB but otherwise unedited?
when I inserted with Addmusick and inserting Exgfx and won't work my game.
AntiDuck From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Originally posted by izaguirrefermin28
It has a black screen.

Did you insert it to a clean ROM that's already been expanded to 2MB but otherwise unedited?
El Cuh Fermin From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
It has a black screen.
 Erik From older version: SA-1 Pack v1.32 (Reduces Slowdown) Link
Tested with: Asar 1.71; Lunar Magic 3.03; bsnes v106.44
All of the fixes work, so I'm approving it.
(coders: be careful with NMI-heavy stuff when the lives exchanger is enabled though, it may break it again)
Knucklesfan From older version: SA-1 Pack v1.31 (Reduces Slowdown) Link
This patch doesn't work with VWF Messages as of yet. Kinda useless with my hack lol. Hope you get it working soon!
Zareption From older version: SA-1 Pack v1.26 (Reduces Slowdown) Link
God made patch
HammerBrother From older version: SA-1 Pack v1.26 (Reduces Slowdown) Link
Note that the multiplication registers are SIGNED, and performs calculation when $2254 is written.
HammerBrother From older version: SA-1 Pack v1.26 (Reduces Slowdown) Link
I notice a bug in ludwig boss fight about the item being dropped from the item box goes behind the sprite background (assuming you must've messed up the OAM order). In the normal original smw, it was fine.

Not much of a problem, since smw bosses are not often used on smw hacks.
 Erik From older version: SA-1 Pack v1.26 (Reduces Slowdown) Link
the tool should be compatible too. there's a sa-1 spritetool around there but I don't know where. Best to use PIXI.
Aurel509 From older version: SA-1 Pack v1.26 (Reduces Slowdown) Link
When I insert some sprites with the Romi's SpriteTool v1.41.
The ROM Crashes (Note: I have converted the sprite with sa-1 converter)
HammerBrother From older version: SA-1 Pack v1.26 (Reduces Slowdown) Link
you mean blue shellless koopas not catching moving shells at all.
 Erik From older version: SA-1 Pack v1.26 (Reduces Slowdown) Link
All of the bugfixes and other features seem to work fine. Good job on this patch!
Wind Fish From older version: SA-1 Pack v1.26 (Reduces Slowdown) Link
Is this the version the VLDCX base rom is using? If so, it works fine
 Erik From older version: SA-1 Pack v1.26 (Reduces Slowdown) Link
oh my god how do you even start with moderating this
HammerBrother From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
Note that when using the multiplication/division routine, $2254 must be written in order to take effect.
Kaisaan From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
When expanding the ROM to 8MB, do I patch 8mb.asm or can I expand it through LM without the use of that patch?
H.carrell on an ipad From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
thx
Vitor Vilela Author From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
It's a higan v100 bug, confirmed by byuu. SA-1 Pack heavily uses IRQs.
Mogu94 From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
Can confirm, black screen with Higan v100
 Noivern From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
Chiming in here...

I have no problem with making this patch work in higan v099. I haven't tried higan v100, will edit when I try it out.

EDIT: Confirmed, black screen with v100.
Vitor Vilela Author From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
I will check what's going on with higan v100.
 RPG Hacker From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
Also just tried Higan v092 (from the Tools section), worked fine in that verison as well, so it's definitely something introduced in newer versions of Higan that causes it to break...
 Erik From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
confirming that. works in higan v098 though.
 RPG Hacker From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
I have problems getting this too work with Higan v100. Whenever I apply this to a ROM (after following the appropriate steps listed here http://smwc.me/1118451) and start it in Higan, I just get a black screen. The ROM does still work in BSNES Accuracy, so I'm not sure if the ROM itself is corrupted. Other SA-1 games (such as Super Mario RPG) still work in Higan, though. Did anyone have this problem before?
 Aram From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
I don't find the appeal of playing hacks on an SNES.
UTF From older version: SA-1 Pack v1.25 (Reduces Slowdown) Link
yeah! real hardware compatibility!! with the sprite and block conversion tool and the sa-1 spritetool that got released recently, this patch definitely is more user-friendly than ever. good stuff.
Taffy From older version: SA-1 Pack v1.24 Link
I love this patch! It really suits what I am working on, and it is just really high quality! The ZSNES compatibility issue doesnt bother me, as I use snes9x.
HammerBrother From older version: SA-1 Pack v1.24 Link
Note that the real maximum number of slots are 22 slots (0-21 (#$00-#$15 for hex) possible range) the reason for 20 slots is because the last-two slot indexes are for misc spawning sprites (item box sprite after released and from blocks).
HammerBrother From older version: SA-1 Pack v1.24 Link
I think it has to do with the sprite header of LM (the Lakitu cloud button).
Nickelony From older version: SA-1 Pack v1.24 Link
I can't place more than 7 sprites on 1 screen, why?