Sunday, February 19, 2012

It's Alive!

"It's Alive!"  Remember the movie of the same name that came out in the 70s?  Somehow, as a kid I convinced my mother to take me to the Yam Drive-In to see it... but that's another story.

The headline for today is that the Liber809... well, SHE'S ALIVE!  This short video shows it hooked up to the Atari XEGS and being fired up.  The TV shows colors being cycled and the sound coming from the speaker.  The 6809 assembly that makes this happen is below.

So that's where I am now.  The next steps are:
  1. Expand on the test code a bit and gain confidence that things are working well.
  2. Get several actual prototype boards made so I can get away from using the Frankenstein wire wrap.  Gary's working on this.
  3. Learn more about the Atari 8 bit hardware to see what other cool things can be done.
  4. Come up with a plan to bring NitrOS-9 to the platform.








        org $C000

DelayQuick
        clra
d@
        deca
        bne             d@
        rts

DelayLong
        ldd             #$4000
d@
        subd    #$0001
        bne     d@
        rts

ClearIO
        clrb
loop
        ldx             #$D000
        clr             b,x
        ldx             #$D200
        clr             b,x
        ldx             #$D300
        clr             b,x
        ldx             #$D400
        clr             b,x
        decb
        bne             loop
        rts

SetupPOKEY
        lda             #3
        sta             $D20F           ; set POKEY to active
        rts

SetupSound
        lda             #$A0
        sta             $D200
        lda             #$A1
        sta             $D202  ; set audf1 and audf2
        lda             #$A8
        sta             $D201
        sta             $D203  ; set audc1 and audc2
        rts

        fill    $FF,$E000-*
SWI3Vct
        rti
SWI2Vct
        rti
FIRQVct
        rti
IRQVct
        rti
SWIVct
        rti
NMIVct
        rti
RESETVct
        orcc    #$50
        lds             #$2000

        lbsr    ClearIO
        lbsr    DelayQuick
        lbsr    SetupPOKEY
        lbsr    SetupSound

        clra
xxx
        sta             $D01A
        inca
        pshs    a
        lbsr    DelayLong
        puls    a
        bra             xxx

wait
        jmp             wait

* 6809 Vectors
        fill    $FF,$FFF0-*
        fdb             $0000           Reserved
        fdb             SWI3Vct         SWI3
        fdb             SWI2Vct         SWI2
        fdb             FIRQVct         /FIRQ
        fdb             IRQVct          /IRQ
        fdb             SWIVct          SWI
        fdb             NMIVct          /NMI
        fdb             RESETVct        /RESET

No comments:

Post a Comment