Dead Hackers Society
Other BBSes »
 
 

68k Inside

Sommarhack 2024

Silly Venture 2024 SE
Demoscene  Coding  CT60  Buy/sell

Atari coding BBS
 
Re: DMA/YM Chip Question
Posted by: Defjam Oct,01.2011-18:55 


My top/lower border routine used in Suretrip 2,
works with 3xSID voice.
Maybe it's of some use.

;-------------------------------------------------------------------------------
vbl_rout: >PART
move #$2700,SR

move.w #32,$00000140.w
move.l #hbl,$00000068.w

move #$2100,SR ; hbl on

movem.l D0-A6,-(SP)

movem.l (SP)+,D0-A6
move.b #$21,(SP) ; hbl on
addq.l #1,$00000466.w
rte
hbl:
subq.w #1,$00000140.w
bmi.s hbl_da
rte
hbl_da:
move #$2700,SR
move.l #hbl_sync,$00000068.w
move.b $FFFFFA13.w,reset_1+3 ; save mfp
move.b $FFFFFA15.w,reset_2+3 ; "
clr.b $FFFFFA13.w ; mfp lock
clr.b $FFFFFA15.w ; "
hdwait:
stop #$2100
bra.s hdwait
hbl_sync:
move #$2700,SR
addq.l #6,SP ; <-- 68000 stackframe !!

move.l D0,-(SP)
moveq #24,D0
wait: dbra D0,wait

move.w #$0700,$FFFF8240.w
move.w #$0000,$FFFF8240.w

move.b #0,$FFFF820A.w ; 60 Hz
DS.W 16,$00004E71
move.b #2,$FFFF820A.w ;50 Hz

move.l #timer_b_bottom,$00000120.w
clr.b $FFFFFA1B.w
move.b #228,$FFFFFA21.w
move.b #8,$FFFFFA1B.w


reset_1: move.b #$12,$FFFFFA13.w ; restore mfp
reset_2: move.b #$34,$FFFFFA15.w ;

move.l (SP)+,D0
move.b #$23,(SP)
rte
ENDPART
timer_b_bottom: >PART
move #$2700,SR

clr.b $FFFFFA1B.w
move.b #$13,$FFFFFA21.w
move.b #8,$FFFFFA1B.w

move.w D0,-(SP)

move.b $FFFFFA21.w,D0
sync_tbu: cmp.b $FFFFFA21.w,D0
beq.s sync_tbu

move.b #0,$FFFF820A.w
DS.W 10+8,$00004E71 ;10
move.b #2,$FFFF820A.w

move #$2400,SR

move.w (SP)+,D0

move.l #rte_tb,$00000120.w
rte_tb:
clr.b $FFFFFA1B.w
rte
;-------------------------------------------------------------------------------








[All messages in this thread]    [Start new thread]

Topic Posted by  Date 
DMA/YM Chip Question Bod/STAX Sep,30.2011-14:31
  Re: DMA/YM Chip Question evil Sep,30.2011-17:31
    Re: DMA/YM Chip Question Defjam Oct,01.2011-18:55
      Re: DMA/YM Chip Question Bod/STAX Oct,02.2011-22:08
        Re: DMA/YM Chip Question Bod/STAX Oct,03.2011-00:10
          Re: DMA/YM Chip Question Bod/STAX Oct,03.2011-00:19
            Re: DMA/YM Chip Question evil Oct,03.2011-21:22
              Re: DMA/YM Chip Question Bod/STAX Oct,07.2011-15:54
                Re: DMA/YM Chip Question evil Oct,07.2011-17:15
                  Re: DMA/YM Chip Question Bod/STAX Oct,07.2011-17:44


Reply to this message
Name:
Topic:
Anti-troll code:

Message:

What's the anti-troll code?
That's your personal code to be able to add comments and messages on the dhs.nu site.
Don't have a code or forgot it? Fix it here.
© 1994-2024 Dead Hackers Society Contact: Anders Eriksson