mirror of
https://github.com/deater/dos33fsprogs.git
synced 2024-09-27 11:55:20 +00:00
second: iigs support seems to be working
This commit is contained in:
parent
5f435b846c
commit
3943db72e8
@ -243,6 +243,7 @@ music.inc: generate_common MUSIC
|
|||||||
./generate_common -a 0xd000 -s copy_aux_main music.lst >> music.inc
|
./generate_common -a 0xd000 -s copy_aux_main music.lst >> music.inc
|
||||||
./generate_common -a 0xd000 -s mute_ay_both music.lst >> music.inc
|
./generate_common -a 0xd000 -s mute_ay_both music.lst >> music.inc
|
||||||
./generate_common -a 0xd000 -s unmute_ay_both music.lst >> music.inc
|
./generate_common -a 0xd000 -s unmute_ay_both music.lst >> music.inc
|
||||||
|
./generate_common -a 0xd000 -s interrupt_handler music.lst >> music.inc
|
||||||
|
|
||||||
music2.inc: generate_common MUSIC2
|
music2.inc: generate_common MUSIC2
|
||||||
./generate_common -a 0xd000 -s pt3_init_song music2.lst > music2.inc
|
./generate_common -a 0xd000 -s pt3_init_song music2.lst > music2.inc
|
||||||
@ -258,6 +259,7 @@ music2.inc: generate_common MUSIC2
|
|||||||
./generate_common -a 0xd000 -s copy_aux_main music2.lst >> music2.inc
|
./generate_common -a 0xd000 -s copy_aux_main music2.lst >> music2.inc
|
||||||
./generate_common -a 0xd000 -s mute_ay_both music2.lst >> music2.inc
|
./generate_common -a 0xd000 -s mute_ay_both music2.lst >> music2.inc
|
||||||
./generate_common -a 0xd000 -s unmute_ay_both music2.lst >> music2.inc
|
./generate_common -a 0xd000 -s unmute_ay_both music2.lst >> music2.inc
|
||||||
|
./generate_common -a 0xd000 -s interrupt_handler music2.lst >> music2.inc
|
||||||
|
|
||||||
####
|
####
|
||||||
|
|
||||||
|
9
demos/second/gs_interrupt.s
Normal file
9
demos/second/gs_interrupt.s
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
|
||||||
|
gs_interrupt_handler:
|
||||||
|
; swap back in language card
|
||||||
|
|
||||||
|
; read/write RAM, use $d000 bank1
|
||||||
|
bit $C083
|
||||||
|
bit $C083
|
||||||
|
|
||||||
|
jmp interrupt_handler
|
@ -12,6 +12,7 @@ TBCOLOR = $C022 ; IIgs text fg/bg colors
|
|||||||
NEWVIDEO = $C029 ; IIgs graphics modes
|
NEWVIDEO = $C029 ; IIgs graphics modes
|
||||||
SPEAKER = $C030
|
SPEAKER = $C030
|
||||||
CLOCKCTL = $C034 ; bits 0-3 are IIgs border color
|
CLOCKCTL = $C034 ; bits 0-3 are IIgs border color
|
||||||
|
CYAREG = $C036 ; iigs motor detect and clock speed
|
||||||
SET_GR = $C050
|
SET_GR = $C050
|
||||||
SET_TEXT = $C051
|
SET_TEXT = $C051
|
||||||
FULLGR = $C052
|
FULLGR = $C052
|
||||||
|
@ -1,7 +1,10 @@
|
|||||||
;====================
|
;====================
|
||||||
; Hardware Detect
|
; Hardware Detect
|
||||||
|
; called for disk1 and disk2
|
||||||
|
|
||||||
; simplified version for disk2
|
; simplified version that just detects model and mockingboard
|
||||||
|
; for the fake BIOS we do a bit more, but we do rely
|
||||||
|
; on this being run first
|
||||||
|
|
||||||
hardware_detect:
|
hardware_detect:
|
||||||
|
|
||||||
@ -13,10 +16,24 @@ hardware_detect:
|
|||||||
jsr detect_appleii_model
|
jsr detect_appleii_model
|
||||||
|
|
||||||
lda APPLEII_MODEL
|
lda APPLEII_MODEL
|
||||||
cmp 'g'
|
cmp #'g'
|
||||||
bne not_iigs
|
bne not_iigs
|
||||||
|
|
||||||
is_a_iigs:
|
is_a_iigs:
|
||||||
|
|
||||||
|
; enable 1MHz mode
|
||||||
|
; see hw.accel.a in 4cade
|
||||||
|
setspeed:
|
||||||
|
lda CYAREG
|
||||||
|
and #$7f
|
||||||
|
sta CYAREG
|
||||||
|
|
||||||
|
; gr/text page2 handling broken on early IIgs models
|
||||||
|
; this enables the workaround
|
||||||
|
|
||||||
|
jsr ROM_TEXT2COPY ; set alternate display mode on IIgs
|
||||||
|
|
||||||
|
|
||||||
; set background color to black instead of blue
|
; set background color to black instead of blue
|
||||||
lda NEWVIDEO
|
lda NEWVIDEO
|
||||||
and #%00011111 ; bit 7 = 0 -> IIgs Apple II-compat video modes
|
and #%00011111 ; bit 7 = 0 -> IIgs Apple II-compat video modes
|
||||||
@ -30,6 +47,12 @@ is_a_iigs:
|
|||||||
sta CLOCKCTL ; black border
|
sta CLOCKCTL ; black border
|
||||||
sta CLOCKCTL ; set twice for VidHD
|
sta CLOCKCTL ; set twice for VidHD
|
||||||
|
|
||||||
|
; gs always swaps in RAM
|
||||||
|
lda #<gs_interrupt_handler
|
||||||
|
sta $3FE
|
||||||
|
lda #>gs_interrupt_handler
|
||||||
|
sta $3FF
|
||||||
|
|
||||||
not_iigs:
|
not_iigs:
|
||||||
|
|
||||||
|
|
||||||
|
@ -36,6 +36,17 @@ bios_test:
|
|||||||
bne not_iigs
|
bne not_iigs
|
||||||
|
|
||||||
is_a_iigs:
|
is_a_iigs:
|
||||||
|
|
||||||
|
; we do this earlier in detect_hardware
|
||||||
|
.if 0
|
||||||
|
; enable 1MHz mode
|
||||||
|
; see hw.accel.a in 4cade
|
||||||
|
setspeed:
|
||||||
|
lda CYAREG
|
||||||
|
and #$7f
|
||||||
|
sta CYAREG
|
||||||
|
|
||||||
|
|
||||||
; set background color to black instead of blue
|
; set background color to black instead of blue
|
||||||
lda NEWVIDEO
|
lda NEWVIDEO
|
||||||
and #%00011111 ; bit 7 = 0 -> IIgs Apple II-compat video modes
|
and #%00011111 ; bit 7 = 0 -> IIgs Apple II-compat video modes
|
||||||
@ -48,6 +59,7 @@ is_a_iigs:
|
|||||||
lda #$00
|
lda #$00
|
||||||
sta CLOCKCTL ; black border
|
sta CLOCKCTL ; black border
|
||||||
sta CLOCKCTL ; set twice for VidHD
|
sta CLOCKCTL ; set twice for VidHD
|
||||||
|
.endif
|
||||||
|
|
||||||
lda #'s'
|
lda #'s'
|
||||||
sta model_patch_1+9
|
sta model_patch_1+9
|
||||||
@ -198,14 +210,24 @@ done_detect_cpu:
|
|||||||
;=====================
|
;=====================
|
||||||
; Detect mockingboard
|
; Detect mockingboard
|
||||||
;=====================
|
;=====================
|
||||||
|
; did this earlier too
|
||||||
|
.if 0
|
||||||
lda #0
|
lda #0
|
||||||
sta SOUND_STATUS
|
sta SOUND_STATUS
|
||||||
|
|
||||||
|
|
||||||
PT3_ENABLE_APPLE_IIC = 1
|
PT3_ENABLE_APPLE_IIC = 1
|
||||||
|
|
||||||
|
|
||||||
jsr mockingboard_detect
|
jsr mockingboard_detect
|
||||||
bcc mockingboard_notfound
|
bcc mockingboard_notfound
|
||||||
|
.endif
|
||||||
|
|
||||||
|
; patch if necessary
|
||||||
|
|
||||||
|
lda SOUND_STATUS
|
||||||
|
and #SOUND_MOCKINGBOARD
|
||||||
|
beq mockingboard_notfound
|
||||||
|
|
||||||
mockingboard_found:
|
mockingboard_found:
|
||||||
lda MB_ADDR_H
|
lda MB_ADDR_H
|
||||||
@ -214,13 +236,12 @@ mockingboard_found:
|
|||||||
|
|
||||||
sta mock_slot_patch+7
|
sta mock_slot_patch+7
|
||||||
|
|
||||||
lda SOUND_STATUS
|
; lda SOUND_STATUS
|
||||||
ora #SOUND_MOCKINGBOARD
|
; ora #SOUND_MOCKINGBOARD
|
||||||
sta SOUND_STATUS
|
; sta SOUND_STATUS
|
||||||
|
|
||||||
mockingboard_notfound:
|
mockingboard_notfound:
|
||||||
|
|
||||||
|
|
||||||
;===================
|
;===================
|
||||||
; Load graphics
|
; Load graphics
|
||||||
;===================
|
;===================
|
||||||
|
@ -212,6 +212,8 @@ mockingboard_setup_interrupt:
|
|||||||
lda #>interrupt_handler
|
lda #>interrupt_handler
|
||||||
sta $ffff
|
sta $ffff
|
||||||
|
|
||||||
|
; note elsewhere we put gs_interrupt_handler in $3FE/$3FF
|
||||||
|
|
||||||
; nop out the "lda $45" since we are bypassing the ROM irq handler
|
; nop out the "lda $45" since we are bypassing the ROM irq handler
|
||||||
; that puts A in $45
|
; that puts A in $45
|
||||||
lda #$EA
|
lda #$EA
|
||||||
|
@ -191,6 +191,7 @@ PT3_ENABLE_APPLE_IIC = 1
|
|||||||
|
|
||||||
.include "pt3_lib_detect_model.s"
|
.include "pt3_lib_detect_model.s"
|
||||||
.include "pt3_lib_mockingboard_detect.s"
|
.include "pt3_lib_mockingboard_detect.s"
|
||||||
|
.include "gs_interrupt.s"
|
||||||
|
|
||||||
mod7_table = $1c00
|
mod7_table = $1c00
|
||||||
div7_table = $1d00
|
div7_table = $1d00
|
||||||
|
@ -15,7 +15,7 @@ second_start:
|
|||||||
; initializations
|
; initializations
|
||||||
;=====================
|
;=====================
|
||||||
|
|
||||||
jsr hardware_detect ; FIXME: remove when hook up part00
|
jsr hardware_detect
|
||||||
|
|
||||||
jsr hgr_make_tables
|
jsr hgr_make_tables
|
||||||
|
|
||||||
@ -62,8 +62,13 @@ restart:
|
|||||||
|
|
||||||
; patch mockingboard
|
; patch mockingboard
|
||||||
|
|
||||||
|
lda SOUND_STATUS
|
||||||
|
beq skip_mbp1
|
||||||
|
|
||||||
jsr mockingboard_patch ; patch to work in slots other than 4?
|
jsr mockingboard_patch ; patch to work in slots other than 4?
|
||||||
|
|
||||||
|
skip_mbp1:
|
||||||
|
|
||||||
;=======================
|
;=======================
|
||||||
; Set up 50Hz interrupt
|
; Set up 50Hz interrupt
|
||||||
;========================
|
;========================
|
||||||
@ -200,7 +205,11 @@ load_program_loop:
|
|||||||
;========================
|
;========================
|
||||||
; patch mockingboard
|
; patch mockingboard
|
||||||
|
|
||||||
|
lda SOUND_STATUS
|
||||||
|
beq skip_mbp2
|
||||||
jsr mockingboard_patch ; patch to work in slots other than 4?
|
jsr mockingboard_patch ; patch to work in slots other than 4?
|
||||||
|
skip_mbp2:
|
||||||
|
|
||||||
jsr mockingboard_init
|
jsr mockingboard_init
|
||||||
;=======================
|
;=======================
|
||||||
; Set up 50Hz interrupt
|
; Set up 50Hz interrupt
|
||||||
@ -542,6 +551,8 @@ forever:
|
|||||||
.include "wait_keypress.s"
|
.include "wait_keypress.s"
|
||||||
.include "zx02_optim.s"
|
.include "zx02_optim.s"
|
||||||
|
|
||||||
|
.include "gs_interrupt.s"
|
||||||
|
|
||||||
;.include "title.s"
|
;.include "title.s"
|
||||||
|
|
||||||
disk_change_string:
|
disk_change_string:
|
||||||
|
Loading…
Reference in New Issue
Block a user