Aw guys I'm sorry, but I completely lose interest on this project.
I will get working on this project again soon.
worldpeace, that's an bug. ZSNES doesn't like the IRQStart code for some reason, so I will need to restore the older onr or redo from scratch.
And this is the same reason for all ZSNES related crashes on switch palaces, monty moles... Anything which modifies Map16 is affected too by ZSNES.
Also I found a rare bug on the LZ3 decoder, so I will remove this patch on next version unless if I find a workaround for that.
Originally posted by Sakuya IzayoiThis patch requires the LC_LZ3 GFX Compression thing. However, the SA-1 patch forces the ROM to use LC_LZ2 (Optimized for speed version). If I try to change it, the ROM crashes at startup.
But there's something else, as usually the only thing that happens when using the L3Customizer w/out LC_LZ3 is that levels with Layer 3 have garbage graphics. Now, the game crashes on startup, so I think it's not the problem?
You would have to change the compression options to LC_LZ3 and reapply the SA-1 patch -- so it will apply the SA-1 working LZ3 code.
But as I said before it's buggy right now, so the only option left is to wait for next Lunar Magic version if you want to use LC_LZ3.
Originally posted by ArujusI just found out about this patch and would really like to use it in my hack if possible. I hope it is still under development. Reading through this thread Vitor talked at one point about releasing the next version in a few days, but it was never released.
I have been doing some testing with this patch and the various tools that work with it, most recently the manual custom block inserter, and I was encountering crashes when a sprite touches a custom block, just like King Dedede a few pages back:
Originally posted by King DededeEh... There's a problem with the SA-1 version of the Manual Custom Block Inserter patch. Whenever a sprite touches a block from the custom block pages, the game crashes. It happens even if there is no code for the block.
I'm pretty sure the reason for the crash is that the patch uses SNES multiplication registers that will only work when executing on the SNES cpu and not on the SA-1 cpu, and when a sprite touches a block the custom block code will be executed on SA-1 because sprites run on SA-1.
To fix it the patch needs to be modified to use the SA-1 multiplication registers if executing on SA-1. Is there an easy way to check if we are currently executing on SA-1 or SNES? If there isn't then I'll just have to manually set some flag in the SpriteV and SpriteH cases of the patch and use that instead.
On a different note, how can you do a trace of code that is executing on SA-1? It seems that in the Snes9x debugger breakpoints only work for code executing on SNES and not on SA-1. I know this because when I was looking at the custom block inserter crash I tried putting a breakpoint at the start of the patch code and it was crashing without reaching the breakpoint, which was making me think for a while that the crash was happening before it reached the patch code, when in reality it was just not triggering the breakpoint.
I have no idea why that patch is not working correctly.
The registers are okay, because you only have to use the SA-1 math registers when you're using SA-1 CPU.
And the only way to trace SA-1 code is using snes9x 1.43 debugger, but you don't have any trace once, so the best solution is creating a custom build of bsnes or snes9x with the trace code.
Originally posted by Vitor VilelaSome days I had a idea of expanding the maximum number of sprites on screen to 30 (instead of 10), but this require moving all sprite related RAMs to another place, but it's impossible to find free ram on Direct Page for 6 sprite addresses.... So, should I find a workaround for this or better I give up?
It's too bad that there is no addressing mode for DP indirect indexed by x, otherwise you could just store the addresses of the new sprite tables where the old tables were and then just change the addressing mode. Currently this would only work in cases where the tables are indexed by y.
I can't think of a good solution for expanding those tables that doesn't involve doing something stupid like putting a JMP in every place that the tables are accessed.
</div></div>
Yeah, it's too bad. I guess I will with the worst option: Hijack every place which accesses those RAMs. It's around ~1700 to replace iirc, so I will try doing a tool or abuse regex to do that.
QuoteOriginally posted by jesusOriginally posted by Vitor VielaCode(assuming that XX is in the $00-$3F or $80-$BF range
and YY equals either XX or $7E)
$YY:0000-$YY:00FF to $XX:3000-$XX:30FF.
$YY:0100-$YY:1FFF to $XX:0100-$XX:1FFF.
I'm not sure if I'm just being dumb, but I don't get what you mean by this. Are you just saying that for those banks ($00-$3F, $7E, and $80-$BF) all addresses $0000-$00FF are mapped to $3000-$30FF? In other words, the bank is NOT changing?
I was confused by this too when I first read it but I think I understand how all the memory mapping works now. As far as I know this is saying that previously all addresses of the form $YY:0000-$YY:00FF (for YY in the range $00-$3F or $80-$BF or $7E) accessed the same data, and now that data is instead accessed through addresses of the form $XX:3000-$XX:30FF (for XX in the range $00-$3F or $80-$BF). The same thing for the second line, except there is a mistake and it should say "$YY:0100-$YY:1FFF to $XX:6100-$XX:7FFF".
The SNES DEV book linked to at the end of the readme had some very helpful images on pages 1-3-1 and 1-3-2 of book 2 that helped clarify things for me.
Yep, you're right. I have to fix those issues on readme for next version anyway.
I guess I will include those images on snes dev. book. Indeed they're very useful, they helped me pretty much when I was learning SA-1.
======================================================
To who don't like manual block inserter, I have an temporally solution:
https://dl.dropboxusercontent.com/u/16203903/A/btsdsa1.asm. Use BTSD on your SA-1 ROM, save and apply this patch with Asar. It will fix BTSD's code to work with SA-1. The only thing you will have to fix is the block's RAM/ROM addresses.
GitHub -
Twitter -
YouTube -
SnesLab Discord