Page 3 of 3

Posted: Thu Mar 15, 2007 8:12 pm
by bunnyboy
The timer counter is entirely hardware so no GG code will change the time. Game Genie can only work on the rom space, so you wouldn't be able to change the timer code stored in wram either. You could use the game genie to change the irq vector to a location that has rts, meaning that when the irq triggers it is just ignored. That would take out the timer completely and you would have to hand time it. Don't think there is another way except get a better emulator :)

A great code would be make tetris always feed you lines!

Posted: Fri Mar 16, 2007 6:35 pm
by AWal
rbudrick wrote:Anyone ever go to the minus world in the NWC cart?
Just did. Same old -1 we know and love.

Also, a while ago I ran through the FDS minus word and recorded it:

http://www.youtube.com/watch?v=xB2i-QOsBpw
bunnyboy wrote:A great code would be make tetris always feed you lines!
Good idea, I'm workin on that right now...

Posted: Fri Mar 16, 2007 7:45 pm
by AWal
...and done.

Tetris:
OXKOKESU
ZOKOSATI
XVKOVEOO

Nintendo World Championships:
OXXOASSU
ZOXOPSPL
XVXOZIVO

This forces every piece (besides the first :?) to a straight piece. They are also rotatable.

Believe me, I tried to find a space with a crapload of $12's to make a one-line code, but alas I was unsucessfull. A two-line code is possible by manipulation of the x register, but I'm feelin' lazy :p.

Posted: Mon Mar 19, 2007 1:09 pm
by rbudrick
Except the first piece, huh? Hmmm...this might be due to the fact that there are only (iirc) 4 four pattern orders for blocks in the NWC version, unlike the original, which appears to be random, but might just have a shitload of pattern orders and no one's ever noticed before. Thor Aackerlund won the NWC by recognizing that only 4 patterns could appear and he spent a bunch of time memorizing in his hotel rooms and at home the videotapes his Dad made of him playing to know the best patterns ahead of time. Pure genius, imo.

Just a theory, but I just wanted to point out that the game IS different from the released version.

-Rob

Posted: Mon Mar 19, 2007 8:45 pm
by AWal
I thought that'd be kinda fishy...I manipulate the call into the ordered set to always retreive (what is apparently the next piece) as 0x12, which equates to a straigh piece (laid horizontally).

Here's The Routines:

Tetris:

Code: Select all

$988E:A5 49     LDA $0049 = #$20
$9890:C9 20     CMP #$20
$9892:30 56     BMI $98EA
$9894:A5 BE     LDA $00BE = #$01
$9896:C9 01     CMP #$01
$9898:F0 20     BEQ $98BA
$989A:A5 A4     LDA $00A4 = #$00
$989C:C9 00     CMP #$00
$989E:D0 0E     BNE $98AE
$98A0:E6 A4     INC $00A4 = #$00
$98A2:A5 B7     LDA $00B7 = #$01
$98A4:85 A5     STA $00A5 = #$00
$98A6:20 EB 98  JSR $98EB
$98A9:85 A6     STA $00A6 = #$07
$98AB:4C EA 98  JMP $98EA
$98AE:A5 A5     LDA $00A5 = #$00
$98B0:C5 B7     CMP $00B7 = #$01
$98B2:D0 36     BNE $98EA
$98B4:A5 A4     LDA $00A4 = #$00
$98B6:C9 1C     CMP #$1C
$98B8:D0 30     BNE $98EA
$98BA:A9 00     LDA #$00
$98BC:85 A4     STA $00A4 = #$00
$98BE:85 45     STA $0045 = #$0A
$98C0:85 41     STA $0041 = #$02
$98C2:A9 01     LDA #$01
$98C4:85 48     STA $0048 = #$01
$98C6:A9 05     LDA #$05
$98C8:85 40     STA $0040 = #$05
$98CA:A6 BF     LDX $00BF = #$07
//$98CC:A9 12     LDA #$12
//$98CE:EA        NOP
$98CC:BD 56 99  LDA $9956,X @ $9956 = #$02
$98CF:85 42     STA $0042 = #$00
$98D1:20 69 99  JSR $9969
$98D4:A5 BE     LDA $00BE = #$01
$98D6:C9 01     CMP #$01
$98D8:F0 07     BEQ $98E1
$98DA:A5 A6     LDA $00A6 = #$07
$98DC:85 BF     STA $00BF = #$08
$98DE:4C E6 98  JMP $98E6
$98E1:20 EB 98  JSR $98EB
$98E4:85 BF     STA $00BF = #$08
$98E6:A9 00     LDA #$00
$98E8:85 4E     STA $004E = #$00
$98EA:60        RTS
$98EB:A5 C0     LDA $00C0 = #$05
$98ED:C9 05     CMP #$05
$98EF:D0 12     BNE $9903
$98F1:A6 D3     LDX $00D3 = #$0C
$98F3:E6 D3     INC $00D3 = #$0C
$98F5:BD 00 DF  LDA $DF00,X @ $DF00 = #$00
$98F8:4A        LSR
$98F9:4A        LSR
$98FA:4A        LSR
$98FB:4A        LSR
$98FC:29 07     AND #$07
$98FE:AA        TAX
$98FF:BD 4E 99  LDA $994E,X @ $994E = #$02
$9902:60        RTS
NWC:

Code: Select all

$956A:A5 69     LDA $0069 = #$20
$956C:C9 20     CMP #$20
$956E:30 56     BMI $95C6
$9570:A5 BE     LDA $00BE = #$01
$9572:C9 01     CMP #$01
$9574:F0 20     BEQ $9596
$9576:A5 A4     LDA $00A4 = #$00
$9578:C9 00     CMP #$00
$957A:D0 0E     BNE $958A
$957C:E6 A4     INC $00A4 = #$00
$957E:A5 B7     LDA $00B7 = #$01
$9580:85 A5     STA $00A5 = #$00
$9582:20 C7 95  JSR $95C7
$9585:85 A6     STA $00A6 = #$0B
$9587:4C C6 95  JMP $95C6
$958A:A5 A5     LDA $00A5 = #$00
$958C:C5 B7     CMP $00B7 = #$01
$958E:D0 36     BNE $95C6
$9590:A5 A4     LDA $00A4 = #$00
$9592:C9 1C     CMP #$1C
$9594:D0 30     BNE $95C6
$9596:A9 00     LDA #$00
$9598:85 A4     STA $00A4 = #$00
$959A:85 65     STA $0065 = #$2B
$959C:85 61     STA $0061 = #$05
$959E:A9 01     LDA #$01
$95A0:85 68     STA $0068 = #$01
$95A2:A9 05     LDA #$05
$95A4:85 60     STA $0060 = #$05
$95A6:A6 BF     LDX $00BF = #$0B
//$95A8:A9 12     LDA #$12
//$95AA:EA        NOP
$95A8:BD 39 96  LDA $9639,X @ $9639 = #$02
$95AB:85 62     STA $0062 = #$0B
$95AD:20 4C 96  JSR $964C
$95B0:A5 BE     LDA $00BE = #$01
$95B2:C9 01     CMP #$01
$95B4:F0 07     BEQ $95BD
$95B6:A5 A6     LDA $00A6 = #$0B
$95B8:85 BF     STA $00BF = #$0B
$95BA:4C C2 95  JMP $95C2
$95BD:20 C7 95  JSR $95C7
$95C0:85 BF     STA $00BF = #$0B
$95C2:A9 00     LDA #$00
$95C4:85 6E     STA $006E = #$00
$95C6:60        RTS
$95C7:A5 C0     LDA $00C0 = #$04
$95C9:C9 05     CMP #$05
$95CB:D0 12     BNE $95DF
$95CD:A6 D3     LDX $00D3 = #$00
$95CF:E6 D3     INC $00D3 = #$00
$95D1:BD 00 DF  LDA $DF00,X @ $DF00 = #$00
$95D4:4A        LSR
$95D5:4A        LSR
$95D6:4A        LSR
$95D7:4A        LSR
$95D8:29 07     AND #$07
$95DA:AA        TAX
$95DB:BD 31 96  LDA $9631,X @ $9631 = #$02
$95DE:60        RTS
That routine I manipulate:

Code: Select all

$993C/961E and up contents: Identical BTW
00000000010101010202030404050505
0506060207080A0B0E12020202020207
07070708080A0B0B0E0E0E0E1212
---
So if it's being manipulated, it has to be the seed value, unless I'm looking at this wrong.

Posted: Mon Mar 19, 2007 10:13 pm
by tepples
Yes, it's likely that the seed value is being manipulated. In the stand-alone Game Pak, the seed value is based on the timing of the first few start presses, but in NWC, the timing is the same from play to play, so it's probably predictable based on detritus left behind in RAM by Rad Racer or the menu system.

Posted: Tue Mar 20, 2007 1:39 pm
by AWal
Ah, that'd explain the seed predictability. Didn't even think of the title screen wait.

Posted: Tue Mar 20, 2007 2:29 pm
by rbudrick
If one were to extract the Tetris rom solely from the NWC cart/rom and play it alone, what would the value be then? Would the outcome always be the same, given the wait and the Rad Racer theory?

-Rob

Posted: Wed Mar 21, 2007 11:20 am
by AWal
rbudrick wrote:If one were to extract the Tetris rom solely from the NWC cart/rom and play it alone, what would the value be then?
You are dirty pirate if you think this is an nes file, but this is just an ips, so ha!

Great Scott! The same pattern...every time. No really, try for yourself. It patches against The (U) [!] build, so the one that everyone has should work just fine.

Posted: Fri Mar 23, 2007 3:02 pm
by rbudrick
AWal wrote:
rbudrick wrote:If one were to extract the Tetris rom solely from the NWC cart/rom and play it alone, what would the value be then?
You are dirty pirate if you think this is an nes file, but this is just an ips, so ha!

Great Scott! The same pattern...every time. No really, try for yourself. It patches against The (U) [!] build, so the one that everyone has should work just fine.
That's what I thought it would do. Sweet! Is it one of the four patterns, though?

It would be very interesting to be able to actually know how to control which pattern you would get to solely practice that one, if possible, but unlikely given that the seed may be determined by something somewhat random, like the Rad Racer theory. Or even better, make IPSs for all four, to practice the hell out of them all! One could really strive for high scores then!

And if it is RR that determines the Tetris pattern, I wonder i code was added to RR or the NWC rom itself to determine it.

-Rob

Posted: Fri Oct 12, 2007 5:58 pm
by NotTheCommonDose
Is there GG code to disable the timer in all games?

Posted: Tue Oct 16, 2007 10:19 am
by rbudrick
GG codes don't effect the time. Also, you'd never finish Tetris if there were, so what would be the point?
It would be very interesting to be able to actually know how to control which pattern you would get to solely practice that one, if possible, but unlikely given that the seed may be determined by something somewhat random, like the Rad Racer theory. Or even better, make IPSs for all four, to practice the hell out of them all! One could really strive for high scores then!

And if it is RR that determines the Tetris pattern, I wonder i code was added to RR or the NWC rom itself to determine it.

-Rob
Man, glad I found that doc to put in the instructions for the NWC repro so now all patterns are predictable. I rock, lol, jk.

-Rob

Posted: Tue Oct 16, 2007 12:42 pm
by NotTheCommonDose
Can PAR affect time?

Posted: Tue Oct 16, 2007 1:20 pm
by tepples
rbudrick wrote:GG codes don't effect the time.
But can they turn CLI opcodes into SEI opcodes?
Also, you'd never finish Tetris if there were
Unless a second code stuck a CLI into the top-out animation (bars filling the screen from top to bottom) so that the interrupt can finally squeeze through once the player tops out. Or unless the code to blink the screen on a 4-line clear were tweaked to restart the timer somehow. (Is that possible?
NotTheCommonDose wrote:Can PAR affect time?
Action Replay style products can affect only variables visible to the CPU. The timer value is in the mapper, not the internal RAM. Or it can restart the timer, if that's possible.