View difference between Paste ID: 0KQWpAgA and hmZqUwv9
SHOW: | | - or go back to the newest paste.
1
		org	$0
2
3
DiscIdent:	dc.b	'SEGADISCSYSTEM  '	; Sega System Disc
4
VoluIdent:	dc.b	'SEGAIPSAMP ', 0	; Disc title
5
VolSys:		dc.w	0			; Prototype
6
VolType:	dc.w	1			; CD-ROM Disc
7
SysName:	dc.b	'SYSTEM NAME', 0	; System name
8
SysVer:		dc.w	0			; System version
9
		dc.w	0			; Always 0
10
IPOrg:		dc.l	$800			; IP origin address
11
IPSize:		dc.l	$800			; IP size
12
IPStart:	dc.l	$0			; IP entry point
13
IPRAM:		dc.l	$0			; IP RAM size
14
SPOrg:		dc.l	$1000			; SP origin address
15
SPSize:		dc.l	$7000			; SP size
16
SPStart:	dc.l	0			; SP entry point
17
SPRAM:		dc.l	0			; SP RAM size
18
		dcb.b	$B0, $20		; Pad with space char
19
System:		dc.b	'SEGA MEGA DRIVE '	; Console
20
Copyright:	dc.b	'(C)SEGA 1993.APR'	; Copyright
21
Title_Dom:	dc.b	'CD-SONIC THE HEDGEHOG                           '
22
Title_Int:	dc.b	'CD-SONIC THE HEDGEHOG                           '
23
Serial:		dc.b	'XX 00000000-00'
24
		dcb.b	$2, $20
25
IOSupport:	dc.b	'J               '
26
		dcb.b	$1E, $20
27
MODEMSupport:	dc.b	'  ', '    ', '    ', '  '
28
		dcb.b	$26, $20
29
Regions:	dc.b	'J               '
30
; ---------------------------------------------------------------------------
31
		org	$FF0000
32
33
SecurityCode:
34
		lea	SecurityData, a1	; Load security data to a1
35
		jsr	$364			; Jump to BIOS routine
36
		bra.w	IPStart			; Start IP
37
; ---------------------------------------------------------------------------
38
39
SecurityData:
40
		incbin	sec.bin
41
		even
42
; ---------------------------------------------------------------------------
43
44
IPStart:
45
		move.l	#SubCPUInt, ($FFFFFD08).w ; $FD08 calls level 2 on SubCPU	
46
		move.w	#$FD0C, ($A12006).l	; Set H-Int location to $FD0C
47
		move.l	#SubCPURet, ($FFFFFD0E).w ; $FD0E calls return from exception
48
		bset	#1, ($A12003).l		; Set DMNA flag
49
		lea	($A12010).l, a0		; Communication command
50
		moveq	#0, d0
51
		move.b	d0, -2(a0)		; Close communications
52
		move.l	d0, (a0)+		; Clear communication bank
53
		move.l	d0, (a0)+
54
		move.l	d0, (a0)+
55
		move.l	d0, (a0)+
56
		lea	MainOS, a0		; a0 -> MainOS
57
		lea	(MainOSLoc).l, a1	; a1 -> Load location
58
		move.w	#$4B, d7		; Size of MainOS
59
60
LoadMainOS:
61
		move.b	(a0)+, (a1)+		; Load the MainOS
62
		dbf	d7, LoadMainOS
63
		jmp	MainOSLoc		; Jump to the MainOS
64
; ---------------------------------------------------------------------------
65
66
MainOS:
67
		incbin	mainos.bin
68
		even
69
; ---------------------------------------------------------------------------
70
71
SubCPUInt:
72
		bset	#0, ($A12000).l
73
; ---------------------------------------------------------------------------
74
75
SubCPURet:
76
		rte
77
; ---------------------------------------------------------------------------
78
79
; Padding:
80
		dcb.b	$DC, 0
81
; ---------------------------------------------------------------------------
82
83
		org	$ff1000
84
MainOSLoc:	dcb.b	$600, 0
85
		end