the cutting room mirror

Family Computer Disk System

This article has a talk page!
view on tcrf.net

This page contains notes for the game Family Computer Disk System.

3DS VC Nazo no Murasamejou/The Mysterious Murasame Castle#

Below is a disassembly of the modified FDS BIOS code in the 3DS Virtual Console release of The Mysterious Murasame Castle, which hijacks a subroutine at $EB13 (originally for reading the Family BASIC keyboard). The game itself appears to have been modified to call or jump to various entry points located in this section.

ReadKeyboard_Mod:
eb13   a5 83                lda $83
eb15   c9 08                cmp #$08
eb17   90 08                bcc leb21

eb19   ad 43 03             lda $0343
eb1c   d0 03                bne leb21

eb1e   a9 00                lda #$00
eb20   60                   rts

eb21   a5 f5      leb21     lda $f5 ; P1 buttons
eb23   29 10                and #$10 ; start pressed?
eb25   60                   rts

eb26   a2 22      leb26     ldx #$22
eb28   a5 51                lda $51
eb2a   c9 03                cmp #$03
eb2c   90 02                bcc leb30

eb2e   a2 ff                ldx #$ff
eb30   8e d4 b5   leb30     stx $b5d4
eb33   4c e4 64             jmp $64e4

eb36   a9 3c      leb36     lda #$3c
eb38   8d 0f 01             sta $010f
eb3b   a9 14                lda #$14
eb3d   85 1a                sta $1a
eb3f   60                   rts

eb40   48         leb40     pha
eb41   ad 0f 01             lda $010f
eb44   c9 01                cmp #$01
eb46   90 03                bcc leb4b

eb48   ce 0f 01             dec $010f
eb4b   68         leb4b     pla
eb4c   29 40                and #$40
eb4e   f0 05                beq leb55
eb50   b0 03                bcs leb55
eb52   4c 16 6f             jmp $6f16
eb55   4c 79 6f   leb55     jmp $6f79

; end of patch, rest of ReadKeyboard follows
eb58   ff                   ??? ; eor #$ff operand
eb59   95 00                sta $00,x
eb5b   ca                   dex
eb5c   10 c8                bpl leb26
eb5e   a4 fb                ldy $fb
eb60   09 ff                ora #$ff
eb62   8c 16 40             sty $4016
eb65   60                   rts

(Source: TakuikaNinja)