alright i've said it doesn't work a couple of times.. even before the code was dumped i tested and found it not to work... so now here is why the pin #4 to ground CIC fix doesn't work and locks the system
turns out not all 3193A's are the same.. although they are labeled the same "some" don't work with the pin #4 mod and lockout
from my post below
this is the original code i posted
NOTE: BL sets the output port
this function is called just before it recalculates the seeds
EDIT2: as requested by tepples for anyone who doesn't understand 4-bit sharp assembly code
"ldi" loads 4-bit's (1-nibble) into the (A)ccumulator
"lbli" loads the lower nibble of the B register called BL this selects what port the "out" instuction writes (A) to
the "tml" instructions call's the code block SKIP_NEXT_IF_LOCK..
this skips the next instruction on return if pin #4 is high (1) making the "lock out" go high and your game boot up
when pin #4 is low (0) it's in key mode the code jumps to SET_RESET and writes 0 to the "lock out" pin.. this is the same as holding reset for ever
this is how the lockout pin is wired
"lockout"----(CPU/PPU)---|>o---220ohm---LED---(+)
if you float pin 4 it's possible that it could work.. but i haven't had it work reliably.. i'll test later if this only effects some regions but i can't see sharp removing this part of the CIC code because it's also part of the CPU reset signal (clears reset after 15 bit transfers between lock and key)
almost finished coding my "TENNIS" firmware for the universal JCIC.. it's in the SNES section of the forum..
here's the link to the relevant thread
PLEASE DO NOT POST IN THIS THREAD ABOUT THE ABOVE LINKED THREAD
EDIT: tepples could you sticky this this thread?
turns out not all 3193A's are the same.. although they are labeled the same "some" don't work with the pin #4 mod and lockout
from my post below
Quote:
alright i just couldnt help myself it turns out the pin #4 mod is a backdoor put in by a programmer.. maybe it was fixed maybe it was added in later i don't know
literately when it would write the reset pin i see a "nop"
anyway wish i had more time for this.. but i need to get back to work.. i'll check back later..
literately when it would write the reset pin i see a "nop"
Code:
; KILL_KEY:
010: 21 lbli 1 ; B = x0001
048: 30 ldi 0 ; A = 0x0
; DIE:
064: 00 nop ; <--- oops instruction removed! =)
072: e4 t 064 ; jmp DIE
010: 21 lbli 1 ; B = x0001
048: 30 ldi 0 ; A = 0x0
; DIE:
064: 00 nop ; <--- oops instruction removed! =)
072: e4 t 064 ; jmp DIE
anyway wish i had more time for this.. but i need to get back to work.. i'll check back later..
this is the original code i posted
Code:
; RESET_HOST_IF_KEY:
100: 7c 83 tml 103 ; call SKIP_NEXT_IF_LOCK
160: ef t 16f ; jmp SET_RESET
170: 31 ldi 1 ; A = 0x1
178: 21 lbli 1 ; B = x0001
17c: 00 nop
17e: 00 nop
13f: 00 nop
15f: cf t 14f ; jmp CLEAR_RESET
SET_RESET:
16f: 30 ldi 0 ; A = 0x0
177: 21 lbli 1 ; B = x0001
17b: 46 out ; if key port1.0 = 00 (A) ; reset
17d: 00 nop
13e: 00 nop
11f: 00 nop
CLEAR_RESET:
14f: 46 out ; if lock port1.0 = 01 (A) ; clear reset if lock
167: 4c rit ; return
; SKIP_NEXT_IF_LOCK:
103: 20 lbli 0 ; B = x0000
141: 55 in ; A = port0
120: 67 ska 3 ; skip if A.3 = 1
150: 8f t 10f ; jmp DONTSKIP
168: 4d ritsk ; return and skip next instruction
; DONTSKIP:
10f: 4c rit ; return
100: 7c 83 tml 103 ; call SKIP_NEXT_IF_LOCK
160: ef t 16f ; jmp SET_RESET
170: 31 ldi 1 ; A = 0x1
178: 21 lbli 1 ; B = x0001
17c: 00 nop
17e: 00 nop
13f: 00 nop
15f: cf t 14f ; jmp CLEAR_RESET
SET_RESET:
16f: 30 ldi 0 ; A = 0x0
177: 21 lbli 1 ; B = x0001
17b: 46 out ; if key port1.0 = 00 (A) ; reset
17d: 00 nop
13e: 00 nop
11f: 00 nop
CLEAR_RESET:
14f: 46 out ; if lock port1.0 = 01 (A) ; clear reset if lock
167: 4c rit ; return
; SKIP_NEXT_IF_LOCK:
103: 20 lbli 0 ; B = x0000
141: 55 in ; A = port0
120: 67 ska 3 ; skip if A.3 = 1
150: 8f t 10f ; jmp DONTSKIP
168: 4d ritsk ; return and skip next instruction
; DONTSKIP:
10f: 4c rit ; return
NOTE: BL sets the output port
this function is called just before it recalculates the seeds
EDIT2: as requested by tepples for anyone who doesn't understand 4-bit sharp assembly code
"ldi" loads 4-bit's (1-nibble) into the (A)ccumulator
"lbli" loads the lower nibble of the B register called BL this selects what port the "out" instuction writes (A) to
the "tml" instructions call's the code block SKIP_NEXT_IF_LOCK..
this skips the next instruction on return if pin #4 is high (1) making the "lock out" go high and your game boot up
when pin #4 is low (0) it's in key mode the code jumps to SET_RESET and writes 0 to the "lock out" pin.. this is the same as holding reset for ever
this is how the lockout pin is wired
"lockout"----(CPU/PPU)---|>o---220ohm---LED---(+)
if you float pin 4 it's possible that it could work.. but i haven't had it work reliably.. i'll test later if this only effects some regions but i can't see sharp removing this part of the CIC code because it's also part of the CPU reset signal (clears reset after 15 bit transfers between lock and key)
almost finished coding my "TENNIS" firmware for the universal JCIC.. it's in the SNES section of the forum..
here's the link to the relevant thread
PLEASE DO NOT POST IN THIS THREAD ABOUT THE ABOVE LINKED THREAD
EDIT: tepples could you sticky this this thread?