Changes between Version 9 and Version 10 of TeradriveHardwareNotes


Ignore:
Timestamp:
08/07/2024 07:11:19 AM (9 months ago)
Author:
Mike Pavone
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • TeradriveHardwareNotes

    v9 v10  
    4747== PC Side Bus Switch Registers
    4848
    49 Key: X = writeable by both CPUS, M = writeable by M68K only, R = read-only, 1 = read-only, always 1, 0 = read only, always 0
     49Key: X = writable by both CPUS, M = writable by M68K only, R = read-only, 1 = read-only, always 1, 0 = read only, always 0
    5050
    51511160: `XXXXXXXX`
     
    5757      Controls address of memory window in 286 address space\\
    5858      Effectively top byte of real mode segment address or physical address >> 12\\
    59       Normally initialzied from a value stored in CMOS\\
     59      Normally initialized from a value stored in CMOS\\
    6060      Set to CE if value in CMOS is invalid\\
    6161      Window is 8KiB in size and is used for both PC-side access to MD hardware and the Kanji/romdisk ROM\\
    62621163: `XXRRXXXX`
    63       bit 0: Enables auxilliary ROM on 68K side\\
    64       bit 1: Enable 286 memory window into 68K addres space (must be clear when booting 68K)\\
     63      bit 0: Enables auxiliary ROM on 68K side\\
     64      bit 1: Enable 286 memory window into 68K address space (must be clear when booting 68K)\\
    6565      bit 2: unknown\\
    6666      bit 3: unknown\\
     
    8989      low bits of selected 8K page for access to 68K memory from 286\\
    90901167: `0000XXXX`
    91       high bits of selected 8K page for acces to 68K memory form 286\\
     91      high bits of selected 8K page for access to 68K memory form 286\\
    9292      when taken together with 1166, holds `68K address >> 12`\\
    9393      Also used along with 1166 for passing params from PC side to MD-side firmware\\
     
    137137
    138138A commented disassembly of this firmware is available here: https://github.com/mikepavone/teradrive_tmss_disassembly
     139
     140== Unlock Process
     141
     142You can use the following snippet of x86 real mode assembly to unlock the MD hardware from the PC side
     143
     144{{{
     145TD_BASE equ 0x1100
     146TD_FW_PAGE equ 0x60
     147TD_TMSS_FW_PAGE equ 0x21
     148TD_WINDOW_CTRL equ 0x63
     149TD_FW_TO_MD equ 1
     150TD_SWITCH equ 0x64
     151TD_SWITCH_TO_68K equ 1
     152TD_SWITCH_BASE equ 0x80
     153
     154md_unlock:
     155        mov dx, TD_BASE|TD_M68K_PAGE ;0x1166
     156        mov ax, cs
     157        shr ax, 8 ; you can also just clear ax here, but the unlock takes a little longer
     158        out dx, ax
     159       
     160        mov dl, TD_FW_PAGE
     161        mov al, TD_TMSS_FW_PAGE
     162        out dx, al
     163       
     164        mov dl, TD_WINDOW_CTRL
     165        mov al, TD_FW_TO_MD
     166        out dx, al
     167       
     168        inc dl
     169        mov al, TD_SWITCH_BASE|TD_SWITCH_TO_68K
     170        out dx, al
     171       
     172        mov ax, 0xFFFF ;unclear exactly why this busy loop is needed
     173.waitlp:
     174        dec ax
     175        jnz .waitlp
     176        retn
     177       
     178       
     179        align 2
     180        db "PRODUCED BY OR UNDER LICENSE FROM SEGA ENTERPRISES Ltd.", 0
     181}}}
    139182
    140183== Expansion Port Pinout
     
    244287U29: ALS240 (Octal inverter buffer)\\
    245288U30: ALS138 (3 to 8-line decoder/de-multiplexer)\\
    246 U31: ALS151 (1 of 8 selector/multilplexer)\\
     289U31: ALS151 (1 of 8 selector/multiplexer)\\
    247290U32: M5M5165FP-10L (8KB SRAM for Z80)\\
    248291U33: ALS32 (Quad 2-input OR gate)\\