Sega Channel hardware ports

Ask anything your want about Megadrive/Genesis programming.

Moderator: BigEvilCorporation

Post Reply
Sik
Very interested
Posts: 939
Joined: Thu Apr 10, 2008 3:03 pm
Contact:

Sega Channel hardware ports

Post by Sik » Thu Jul 20, 2017 5:52 pm

I was looking at the Sega Channel files in the huge archive released not long ago and noticed this file (P__\SCTOOLS\MENUTEST\HARDWARE.I), no point in not including it since the files are already spread all over by now and this is all equates anyway. It seems to contain all the port addresses unique to Sega Channel? (and some stuff probably not relevant)

Code: Select all

;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;                                                                           ;
;              PROJECT: SEGA CHANNEL BIOS                                   ;
;                                                                           ;
;               MODULE: HARDWARE.I                                          ;
;                                                                           ;
; MODULE CREATION DATE: August 1994                                         ;
;                                                                           ;
;               AUTHOR: D. Castelnuovo                                      ;
;                                                                           ;
;   DEVELOPMENT SYSTEM: SIERRA SYSTEMS 3.1                                  ;
;                                                                           ;
;    COPYRIGHT (C)1994 PACIFIC SOFTSCAPE INC                                ;
;                                                                           ;
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;


*
* Game Data Structure
*
                offset  0
DownloadAddress ds.l    1                       ; Address to download to
UncompSize      ds.l    1                       ; Uncompressed size in bytes
CompSize        ds.l    1                       ; Compressed size in bytes
SuperPackets    ds.w    1                       ; number of super packets
GameCRC         ds.l    1
GameID          ds.w    1                       ; 0 for MenuData
GameServiceID   ds.b    1
PacketID        ds.b    1
StationNumber   ds.b    1
LogicalChannel  ds.b    1
GameTimeout     ds.b    1
PPDSlot         ds.b    1                       ; Play-per-Day Game
HelpId          ds.w    1
ClearSRAMFlag   ds.b    1
SRAMPatternFill ds.b    1
CompressionFlag ds.b    1                       ; 0=none,1=comp,2=newload
HelpFlag        ds.b    1
DLIndicator     ds.l    1                       ; Lptr DownloadIndicatorTable
SIZEOF_GAMEDATA ds.w    0


*
*
* Hardware Control equates
*
*

REALHW          EQU     0                       ; Set to 1 for real hardware!

MenuData        EQU     $110000                 ; Where the menu's are decompressed

SRAM_START      EQU     $200001
SRAM_LENGTH     EQU     $2000                   ; 8k bytes of SRAM

DRAM_START      EQU     $100000
DRAM_LENGTH     EQU     $400000                 ; 4MB's worth
TEST_PATTERN    EQU     $A125A125               ; DRAM Test Pattern

FIXIT_START     EQU     $100000                 ; start of fixit buffer
FIXIT_BUFFER_ENTRIES    EQU     32              ; number of fixit buffer entries

COUNT_PER_FRAME EQU     2048                    ; look at 2k packets per frame
SIZEOF_PACKET   EQU     246                     ; current size of packet

*
* Fixit buffer structure
*
                offset 0
fbData          ds.b    26              ; Data buffer
fbS0            ds.b    1
fbS1            ds.b    1
fbPacketAddress ds.w    1
fbParity        ds.b    1               ; Parity/Used buffer
fbPacketNumber  ds.b    1
SIZEOF_FIXITBUFFER ds.w 0               ; Size of the buffer



*
* ASIC Registers
*

REGBASE         EQU     0xA13000

TCU_STATUS      EQU     REGBASE+0x04
TCU_DATA        EQU     REGBASE+0x06
FIXIT_STARTADDR EQU     REGBASE+0x10
FIXIT_WORKBOUND EQU     REGBASE+0x12
GAME_TIMEOUT    EQU     REGBASE+0x20
GAME_ID         EQU     REGBASE+0x22
PKT_MATCHADDR   EQU     REGBASE+0x24
CURRENT_SPACKET EQU     REGBASE+0x26
GEN_STATUS      EQU     REGBASE+0x30
GEN_CONTROL     EQU     REGBASE+0x32
ERROR_COUNTER   EQU     REGBASE+0x34
CRC_INPUT       EQU     REGBASE+0x40
CRC_LOWOUT      EQU     REGBASE+0x42
CRC_HIGHOUT     EQU     REGBASE+0x44
BANKSWITCH0     EQU     REGBASE+0xF0
BANKSWITCH1     EQU     REGBASE+0xF2
BANKSWITCH2     EQU     REGBASE+0xF4
BANKSWITCH3     EQU     REGBASE+0xF6
BANKSWITCH4     EQU     REGBASE+0xF8
BANKSWITCH5     EQU     REGBASE+0xFa
BANKSWITCH6     EQU     REGBASE+0xFc
BANKSWITCH7     EQU     REGBASE+0xFe

*
* TCU Registers
*

TCU_AUTHMAP     EQU     $00
TCU_FREEMAP     EQU     $10
TCU_P2PLAY      EQU     $20
TCU_P2PSERVID   EQU     $23
TCU_TRANSDATA   EQU     $A0
TCU_GAMETIME    EQU     $B1                     ; b1-b2
TCU_RESETCOND   EQU     $B3
TCU_DAYOFWEEK   EQU     $B4
TCU_WEEK        EQU     $B5
TCU_TODTIMOUT   EQU     $B6
TCU_AUTHBYTE    EQU     $B7
TCU_CHECKSUM    EQU     $B8                     ; Unit Address Checksum
TCU_PLLCONFIG   EQU     $B9
TCU_PLLDATA0    EQU     $BA                     ; From BA to BD
TCU_PASSWORD    EQU     $C0                     ; C0 and C1
TCU_CHANBITMAP  EQU     $C2
TCU_PCLEVEL     EQU     $CB                     ; current parental guidance level
TCU_INITIALIZED EQU     $CC                     ; has the ASIC been Initialized
TCU_RANDOMSEED  EQU     $CD                     ; Random Number Seed (WORD)
TCU_NEXTTEST    EQU     $CF                     ; next DRAM test block
TCU_STATION     EQU     $E0
TCU_SLOT        EQU     $E1
TCU_SERVICEID   EQU     $E2
TCU_FILTERCODE  EQU     $E3                     ; E3 and E4
TCU_CHANNELNO   EQU     $E5
TCU_UNITADDR    EQU     $F3                     ; F3,f4,f5,f6
TCU_LANGUAGE    EQU     $1E0                    ; 0=English
                                                ; 1=French
                                                ; 2=German
                                                ; 3=Spanish
TCU_HELPCOM     EQU     $1E1                    ; help comunications port
TCU_MENULPTR    EQU     $1E2                    ; Lptr to Menu Stack
TCU_TUNERTYPE   EQU     $1E6                    ; 0=TD1A, 1=TD1B
TCU_BIOSNVM2    EQU     $1E1                    ; 1E1 through 1FF


HELP_DATA       MACRO
                dc.l    $100000+$10007a         ; DownloadAddress
                dc.l    $0009ce44               ; UncompSize
                dc.l    $0009ce44               ; CompSize
                dc.w    2613                    ; SuperPackets
                dc.l    $798361a0               ; GameCRC
                dc.w    62                      ; GameID
                dc.b    1                       ; GameServiceID
                dc.b    0                       ; PacketID
                dc.b    1                       ; PipeNumber
                dc.b    0                       ; LogicalChannel
                dc.b    0                       ; GameTimeout
                dc.b    -1                      ; PPDSlot
                dc.w    \1                      ; HelpID
                dc.b    0                       ; ClearSRAMFlag
                dc.b    0                       ; SRAMPatternFill
                dc.b    5                       ; CompressionFlag
                dc.b    0                       ; Help Flag
                dc.l    DownloadIndicator       ; DLIndicator
                dc.w    127                     ; GIPackets

                ENDM
Also for what matters: the SCTOOLS folder itself seems to contain the stuff needed to build your own menus. No guarantees, it may be missing a good chunk of stuff (honestly I didn't try this), but at the rate things are going, next you know we're emulating Sega Channel :P
Sik is pronounced as "seek", not as "sick".

Asagoth
Interested
Posts: 18
Joined: Sat Jul 29, 2017 11:09 am
Location: Portugal

Re: Sega Channel hardware ports

Post by Asagoth » Sun Oct 08, 2017 8:40 pm

I know this topic is 4 months old... so i hope that i'm not disrespecting some rules here... Dave Castelnuovo was at the time, a Pacific Softscape Inc employee, he was the programmer of the Sega Channel BIOS... i don't know nothing about programming... but i guess that is something big... could that be the BIOS code?

Post Reply