This version adds MaxTile support, a system that removes all sprite tile limitations from SMW and allows up to 128 sprite tiles on the screen and fixes priority issues between sprites, such as the key and keyhole.
- 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.
This version fixes one of the 'boxes' floating on the bonus game, being caused by an incompatibility with sprite memory 0x08 and the bonus game sprites.
In addition, for ROM hackers, it adds a mechanism for retrying DMA interrupted by HDMA on the LZ2/LZ3 decompressor and adds a few missing notes on the programming guide.
- 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.
For game players, this release activates 22 sprites mode for most of the levels, unlocking the default sprite spawning limitations Nintendo imposed on the levels. That will make the game slight harder, but it will let enemies spawn enemies as maximum as the SA-1 Pack allows for!
For ROM hackers, this release adds DMA remap which frees channel 7 for custom HDMA and fixes a graphics uploading bug, adds a finish OAM hook, useful for custom sprites that uses a lot of OAM slots, fixes a bug involving bank switching and fixes an issue related to custom game over screens, in addition if the ROM is clean, it changes the sprite header to 0x08 on all compatible levels.
Full change log
- 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.
This version fixes some minor but important bugs.
Recommended upgrade procedure:
- Apply this SA-1 Pack version.
- Run your preferred Sprite Tool.
- Fixed an oversight in the Lives Exchanger fix. (LX5)
- Fixed a rare bug involving the tile generation routine. (Tattletale)
- Minor code cleanup.
This version still 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.
Recommended upgrade procedure:
- Edit your ROM with new Lunar Magic version
- Apply this SA-1 Pack version.
- 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.
- 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.
This version does not work with the current VWF dialogues due of its new IRQ controller. It requires a small tweak to its code.
- 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.
- Fixed Snes9x 1.56 crashing the game on SMW ROMs without Addmusic installed. This occurs because of the increased SA-1 CPU base clock.
- Fixed Asar 1.60 reporting error when applying the patch, due of changes in the label preprocessor.
- Fixed a missing channel change (from 0 to 1) on part of the CC-DMA setup. CC-DMA should work again.
- Migrated SA-1 Pack source code to GitHub, now available at https://github.com/VitorVilela7/SA1-Pack
- Migrated README to Markdown (ExE-Boss)
Blue Shelless Koopa finally can play shell-soccer in peace without bugs ruining their fun.
- Fixed Sprite <-> Sprite interaction missing several sprite pointer changes, making certain sprite tables corrupted. One of the most notables consequences of the glitch were the blue shelless koopas not being able to hold a shell thrown from behind.
- Fixed Yoshi spitting fire (from a red shell or if red yoshi) slight off position (around -16 pixels from where it was supposed to), due of yet another missing sprite pointer change.
- Fixed one missing wait for h-blank call, which seems the responsible for generating the lag in ZSNES for mode 7 bosses.
- Fixed Dynamic Sprites setting !SLOTSUSED to #$01 instead of #$00 after upload. This bug happened because the channel used to DMA transfer was changed to #$02 instead of #$01 and the same value was subtracted to determine !SLOTSUSED value. Also slight optimized the code, by setting the zero store before the jump table.
- Updated the Quick Guide, with more recent instructions regarding resource compatibility.
- Rewrote part of the read me.
- Add a memory map summary file to the docs folder, which contains basically all memory changes the SA-1 does. Useful for converting resources.
- Registered SA-1 main loop address, as JML, at $008A74.
- Removed some unused code related to h-blank detection.
- Removed a leftover print pc from Overworld hijack.
- Removed most of the compatible tools/patches/block/etc. pages as Dropbox will be killing them soon.
Real Hardware Compatible
This version pretty much adds compatibility with real hardware, making it run (for now) with hacked SA-1 carts (with 128KB BW-RAM or more). Thanks a lot markfrizb for discovering, testing and helping me with the fixing process. Without him I'd never really know that the SA-1 Pack had real hardware issues.
Complete change list:
- Fixed SNES NMI and IRQ vectors override not getting written correctly ($220C, $220E). These registers are SA-1 only write and they were being written on SNES CPU side, making real hardware crash. None of the major emulators currently emulate this register properly.
- Added a code on RESET routine to put the SA-1 CPU on sleep state before booting and setting up initial variables. The same procedure is done on most commercial games so I decided to include it on SA-1 Pack just to be safe in real hardware.
- Added a code for clearing DMA state ($2230) on SA-1 RESET routine.
- Made all DMAs invoked by the patch use channel 1 instead of 0. This should make the DMA remap patch work with SA-1 ROMs without requering to modify any of the SA-1 Pack code.
- Made DSX (Dynamic Sprites) patch code optional, requested by anonimzwx.
- Made some minor grammar fixes.