Enter debug mode on Tenchi wo Kurau II - Shokatsu Koumei Den

This is an archive of a topic from NESdev BBS, taken in mid-October 2019 before a server upgrade.
View original topic
Enter debug mode on Tenchi wo Kurau II - Shokatsu Koumei Den
by on (#119254)
Tenchi wo Kurau II - Shokatsu Koumei Den
Enter debug mode on real cartridge and real famicom(Does not need game genies)

Japanese ver is same as chinese:
http://youtu.be/q9tTYZ4U3V0
Re: Enter debug mode on Tenchi wo Kurau II - Shokatsu Koumei
by on (#119270)
I've tried to repeat this a few times and I can't get it to work. The problem is that you didn't really explain how to do it. :-)

1. During the Capcom title screen fade in/out, are you actually pressing A+B or just B or is it just your hand holding the controller?

2. During the save game creation (naming) screen, you choose a name of the 1st/2nd/3rd/4th glyphs in the first column. I've tried this to no avail (but answer to #3) matters),

3. Does the save game have to be the 2nd slot for this to work? Edit: I've now tried it in the 2nd slot to no avail as well.

So I'm all ears at this point.
Re: Enter debug mode on Tenchi wo Kurau II - Shokatsu Koumei
by on (#119273)
koitsu wrote:
I've tried to repeat this a few times and I can't get it to work. The problem is that you didn't really explain how to do it. :-)

1. During the Capcom title screen fade in/out, are you actually pressing A+B or just B or is it just your hand holding the controller?

2. During the save game creation (naming) screen, you choose a name of the 1st/2nd/3rd/4th glyphs in the first column. I've tried this to no avail (but answer to #3) matters),

3. Does the save game have to be the 2nd slot for this to work? Edit: I've now tried it in the 2nd slot to no avail as well.

So I'm all ears at this point.


I will show the detail later!
But to put simply,I copy the initialise code to the wram and run the code from wram(not reset code)
and when finish zero the ram code,I write the debug sign to the ram,next jmp the original code(next the zero ram)

Code:
BANK3F:FFD8 RESET:
BANK3F:FFD8                 SEI
BANK3F:FFD9                 JMP     loc_2B800_F12D

BANK3F:F12D loc_2B800_F12D:                         ; CODE XREF: RESET+1^Yj
BANK3F:F12D                 CLD
BANK3F:F12E                 LDA     #0
BANK3F:F130                 STA     $2000
BANK3F:F133                 STA     $2001
BANK3F:F136                 LDX     #$FF
BANK3F:F138                 TXS
BANK3F:F139                 LDX     #4
BANK3F:F13B
BANK3F:F13B loc_2B800_F13B:                         ; CODE XREF: BANK3F:F13E^Yj
BANK3F:F13B                                         ; BANK3F:F146^Yj
BANK3F:F13B                 LDA     $2002
BANK3F:F13E                 BPL     loc_2B800_F13B
BANK3F:F140
BANK3F:F140 loc_2B800_F140:                         ; CODE XREF: BANK3F:F143^Yj
BANK3F:F140                 LDA     $2002
BANK3F:F143                 BMI     loc_2B800_F140
BANK3F:F145                 DEX
BANK3F:F146                 BNE     loc_2B800_F13B
BANK3F:F148                 LDA     #$1E
BANK3F:F14A                 STA     $FE
BANK3F:F14C                 LDA     #0
BANK3F:F14E                 STA     $4010
BANK3F:F151                 STA     $4015
BANK3F:F154                 LDA     #$40 ; '@'
BANK3F:F156                 STA     $4017
BANK3F:F159                 LDX     #5
BANK3F:F15B
;//init the chr-ram reg
BANK3F:F15B loc_2B800_F15B:                         ; CODE XREF: BANK3F:F165^Yj
BANK3F:F15B                 STX     $8000
BANK3F:F15E                 LDA     $F1C6,X
BANK3F:F161                 STA     $8001
BANK3F:F164                 DEX
BANK3F:F165                 BPL     loc_2B800_F15B

BANK3F:F167                 LDA     #$3C ; '<'
BANK3F:F169                 JSR     $C720         ;bank prg-banks to 8000~BFFF
BANK3F:F16C                 LDA     #1
BANK3F:F16E                 STA     $A000
BANK3F:F171                 LDA     #$80 ; '€'      ;open wram
BANK3F:F173                 STA     $A001
BANK3F:F176                 STA     byte_2B800_E000
BANK3F:F179                 LDA     $2002
BANK3F:F17C                 LDA     #$10
BANK3F:F17E                 TAX
BANK3F:F17F
BANK3F:F17F loc_2B800_F17F:                         ; CODE XREF: BANK3F:F188^Yj
BANK3F:F17F                 STA     $2006
BANK3F:F182                 STA     $2006
BANK3F:F185                 EOR     #$10
BANK3F:F187                 DEX
BANK3F:F188                 BNE     loc_2B800_F17F
BANK3F:F18A                 LDA     #0
BANK3F:F18C                 LDX     #$F0 ; '?
BANK3F:F18E
BANK3F:F18E loc_2B800_F18E:                         ; CODE XREF: BANK3F:F191^Yj
BANK3F:F18E                 STA     0,X            ;zero-memory
BANK3F:F190                 DEX
BANK3F:F191                 BNE     loc_2B800_F18E
;BANK3F:F193                 STA     $400
;BANK3F:F196                 LDA     #$3C ; '<'
;BANK3F:F198                 STA     $43
;BANK3F:F19A                 STA     $44
;BANK3F:F19C                 LDA     #$88 ; '?
;BANK3F:F19E                 LDX     #8

next the pc (F191) you need init the debug reg 0xa6!
Code:
LDA #$04
STA $A6
LDA #$00
JMP $F193

now you have all the init code,compile it and copy to wram(ex:7000)
run the code from 7000!
it will worked.
(Don't forget to open the wram,write 0x80 to 0xa001)
Re: Enter debug mode on Tenchi wo Kurau II - Shokatsu Koumei
by on (#119275)
So basically the Youtube video + the Subject of this thread is highly misleading. All you're doing is what's called bootstrapping, pre-storing a value of $04 in ZP/RAM location $a6, to enable "debug mode" (although all I saw in the video is that you can walk through walls, so whether or not this is "debug mode" vs. "affects the collision detection" is unknown -- I'd go look myself but this has already disappointed/annoyed me to the point of losing interest).

The post here + Youtube video, by its description/title, implies that you can enter this mode by doing something special -- i.e. an easter egg -- such as pressing buttons at a specific time, or entering a specific sequence of characters/letters as your save game name, to enable this mode. Your previous post clearly indicates that isn't the case.

Politely, you should really disclose that up front. Something like:

"So I found that there is code left in the Tenchi wo Kurau II ROM for debugging. To enable it, you need to put a value of $04 into ZP location $a6 during the initial startup/reset routine of the game. There's no normal way in the commercial game to do this, but you can modify the ROM or add your own bootstrap routine to accomplish this. Here's how I did the latter..."

I think it's cool that you bootstrapped things using WRAM and accomplished this through unconventional means -- honest, I really do, it's neat -- but it's very important to disclose those kinds of details + what it is you accomplished (and HOW you accomplished it) from the get go. :/
Re: Enter debug mode on Tenchi wo Kurau II - Shokatsu Koumei
by on (#119276)
koitsu wrote:
So basically the Youtube video + the Subject of this thread is highly misleading. All you're doing is what's called bootstrapping, pre-storing a value of $04 in ZP/RAM location $a6, to enable "debug mode" (although all I saw in the video is that you can walk through walls, so whether or not this is "debug mode" vs. "affects the collision detection" is unknown -- I'd go look myself but this has already disappointed/annoyed me to the point of losing interest).

The post here + Youtube video, by its description/title, implies that you can enter this mode by doing something special -- i.e. an easter egg -- such as pressing buttons at a specific time, or entering a specific sequence of characters/letters as your save game name, to enable this mode. Your previous post clearly indicates that isn't the case.

Politely, you should really disclose that up front. Something like:

"So I found that there is code left in the Tenchi wo Kurau II ROM for debugging. To enable it, you need to put a value of $04 into ZP location $a6 during the initial startup/reset routine of the game. There's no normal way in the commercial game to do this, but you can modify the ROM or add your own bootstrap routine to accomplish this. Here's how I did the latter..."

I think it's cool that you bootstrapped things using WRAM and accomplished this through unconventional means -- honest, I really do, it's neat -- but it's very important to disclose those kinds of details + what it is you accomplished (and HOW you accomplished it) from the get go. :/


here is the nes boodloader:
http://slack.net/~ant/old/nes-code/boot ... usage.html
I use this way to write to nes and run the code!

more detail please read the nrpc's (NES Remote Procedure Call Library) code!
thefox release the code at:http://kkfos.aspekt.fi/

Another way is use the tapedump to write the code to wram and run the code from wram!
here is the tape dump's web site:
http://www.chrismcovell.com/TapeDump_Controls.html