Updates:

Fans are welcome!

Fixes and improvements for TGL (NES)

Started by Shredder, August 04, 2016, 04:09:30 PM

Previous topic - Next topic

Shredder

All of these patches are compatible with Japan and USA ROMs, including "Secret Edition" hack. European ROM is incompatible :D

1. "TGL compact mapper" - it frees up some space and allows you to use expanded ROM.

2. "TGL eraser fix" - this will fix cheating by EE weapon, i.e. you are no longer gain infinite powerups by using EE. Also it will fix dangerous bug when game freezes if you simultaneously press button to use EE and select/start on weapon selection screen.

3. "TGL wall fix" - fixes "walking through vertical walls" glitch. Originally glitch appears if you press the diagonal when you standing closely to a wall and have increased speed (i.e. 5 or more shields).

4. Utility for expanding ROM.
http://www.romhacking.net/utilities/425/
Using it, you can double size of TGL ROM. But note that to use the new space you need to install "TGL compact mapper" patch. Bank switching program in TGL located at D705 - D7A9 (RAM). For example, after installing "compact mapper patch", addresses D705 - D723 are used for switching banks #00, #03, #04, #05 and 06. Addresses D724 - D765 are free and can be used for your needs. New banks (07-0E) can be switched by writing 87-8E into D76D-D774 respectively. Following code, for example, switches bank №08 for using:

LDA #$08
BNE $D707


See http://wiki.nesdev.com/w/index.php/Programming_UNROM

Easy way to switch banks without using any space in the fixed bank.

Attention! The order of modifying is important. First you have install patches #1-3 (in any order), then expand ROM if needed.

Good hacking! :skull:

"TGL-Secret_blue_boss_rush.zip" - this patch only for "TGL Secret Edition" ROM. It changes final level background, so it would be same Naju surface background like in the very first level - corridor 0.
Download TGL-Secret_blue_boss_rush.zip

Quoise Games

Thank you! I'll be using this when making improvements to TGL Worlds

Charly

If you can fix the boss rush theme (instead of sand), would be like Optomon did but with the original color (the very first flight)
Gaming Channel on YouTube, including many TGL stuff.
https://www.youtube.com/channel/UC657r8BxfC5ZceOtDC5nNKQ

Shredder

Quote from: Charly on August 07, 2016, 12:30:23 AM
If you can fix the boss rush theme (instead of sand), would be like Optomon did but with the original color (the very first flight)

You mean change music on some boss?

arseniy

Quote from: Shredder on August 07, 2016, 11:21:52 PM
Quote from: Charly on August 07, 2016, 12:30:23 AM
If you can fix the boss rush theme (instead of sand), would be like Optomon did but with the original color (the very first flight)

You mean change music on some boss?

I am pretty sure he means the level background. So it would be same Naju surface background like in the very first level - corridor0. In Optomon's version it has different pallete from the original.

Shredder

Hmm, a palette in other words. I can try :bluelanderbig:

Shredder

Quote from: arseniy on August 08, 2016, 12:57:38 AMI am pretty sure he means the level background. So it would be same Naju surface background like in the very first level - corridor0. In Optomon's version it has different pallete from the original.

Done!

arseniy

Is this for TGL secret or for original game too?
This could be added to the very first post, you know :redlander:

Shredder

Quote from: arseniy on August 10, 2016, 04:29:00 AMIs this for TGL secret or for original game too?

Only for TGL Secret.

Quote from: arseniy on August 10, 2016, 04:29:00 AMThis could be added to the very first post, you know :redlander:

I added  ;)

arseniy


Charly

Quote from: arseniy on August 10, 2016, 08:40:23 AM
Quote from: Shredder on August 10, 2016, 04:59:50 AM
Quote from: arseniy on August 10, 2016, 04:29:00 AMIs this for TGL secret or for original game too?

Only for TGL Secret.


OK. He meant the original tho  ;)
Actually I mean the original one. Instead of the sand surface for the boss rush, it would be better if it just like Optomon did but forthe different colour, like the prologue of the game :)
Arseniy was right in this case.
Gaming Channel on YouTube, including many TGL stuff.
https://www.youtube.com/channel/UC657r8BxfC5ZceOtDC5nNKQ

Ratix

Fix 3 was a very handy feature to have. It had saved a lot of time. These are nice fixes though as it restores balance to the game.

Why is it that after picking up the 5th shield you speed up naturally?

optomon

I'll bet that fifth shield thing is intentionally programmed. Weird how no one has bothered to check it yet.

Grimgrin

Thank you very much!
On TGL compact mapper, I was able to bankswitch the boss music for corridors code indo another bank now I need to fix the problem. To bad that I cant do this in the fixed bank but in MMC5, you can do that in the fixed bank.
Currently extending the game.

Shredder

#14
Quote from: Charly on August 12, 2016, 10:45:41 PM
Actually I mean the original one. Instead of the sand surface for the boss rush, it would be better if it just like Optomon did but forthe different colour, like the prologue of the game :)
Arseniy was right in this case.

Sorry, I have no time at this moment. Maybe later :bluelanderbig:

I found a way to switch code banks without using any space in fixed bank.

For example, this is original game code. Highlighted in purple is the part which we replace and relocate to new bank:

$D325:A9 00     LDA #$00
$D327:9D 90 05  STA $0590,X @ $05A7 = #$00
$D32A:BD 90 05  LDA $0590,X @ $05A7 = #$00
$D32D:D0 0F     BNE $D33E
$D32F:BD 00 05  LDA $0500,X @ $0517 = #$D7
$D332:29 7F     AND #$7F
$D334:9D 40 07  STA $0740,X @ $0757 = #$00
$D337:A8        TAY

$D338:B9 41 D4  LDA $D441,Y @ $D445 = #$00
$D33B:9D 00 05  STA $0500,X @ $0517 = #$D7
$D33E:60        RTS

This is new code. Replaced part highlighted in green, it is switching to new bank #07:

$D325:A9 00     LDA #$00
$D327:9D 90 05  STA $0590,X @ $05A7 = #$00
$D32A:BD 90 05  LDA $0590,X @ $05A7 = #$00
$D32D:D0 0F     BNE $D33E
$D32F:A9 7F     LDA #$7F
$D331:48        PHA
$D332:A9 FF     LDA #$FF
$D334:48        PHA
$D335:4C 24 D7  JMP $D724

$D338:B9 41 D4  LDA $D441,Y @ $D498 = #$08
$D33B:9D 00 05  STA $0500,X @ $0517 = #$D7
$D33E:60        RTS

Part of switching subroutine which we point by JMP $D724 in the code above:

$D720:A9 06     LDA #$06
$D722:D0 E3     BNE $D707
$D724:A9 07     LDA #$07
$D726:D0 DF     BNE $D707

This is code we write in the new bank. Part of original relocated code in purple. After it you can place any of your new code. Finally you should return to previous bank (#6 in this example), the backswitching code highlighted in green:

$8000:BD 00 05  LDA $0500,X @ $0506 = #$D2
$8003:29 7F     AND #$7F
$8005:9D 40 07  STA $0740,X @ $0746 = #$00
$8008:A8        TAY

.....................
[HERE YOU CAN PLACE ANY OF YOUR NEW CODE]
.....................
$8009:A9 D3     LDA #$D3
$800B:48        PHA
$800C:A9 37     LDA #$37
$800E:48        PHA
$800F:4C 20 D7  JMP $D720


Now explanation how we point the address where we want to be after switching. Subtract 1 from this address in hexadecimal, then split it into two bytes, first byte put in first LDA, second put in LDA below. For example, 8000 - 1 = 7FFF, the result is:

$D32F:A9 7F     LDA #$7F
$D331:48        PHA
$D332:A9 FF     LDA #$FF
$D334:48        PHA