Jump to content

Gernreich

Members
  • Posts

    17
  • Joined

  • Last visited

  • Days Won

    1

Posts posted by Gernreich

  1. Maybe something like this added to the end of your program:

     

    LDA #$C0
    STA $9F20 ; Set ADDR0_L to $C0
    LDA #$4B
    STA $9F23 ; Frequency=$xx4B
    LDA #$A0
    STA $9F23 ; Frequency=$A04B

    LDA #$C0
    STA $9F20 ; Set ADDR0_L to $C0
    LDA #$4C
    STA $9F23 ; Frequency=$xx4C
    LDA #$A9
    STA $9F23 ; Frequency=$A94C

    .

    .

    .

    If the above is correct there is still the matter of it playing the notes too fast 🙂

  2. Cheers again!  I'll need to look at this for a bit.  Is this the minimum code for me to reset and play a new frequency? (no other change is made).  How about rewind by four, increment, increment, rewind by two, increment, increment, rewind by two..........

  3. OK here is what I have for playing one note 🙂

    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$
    ###https://github.com/commanderx16/x16-emulator/wiki/(VERA-0.9)-Register-$9F25###
    ###https://www.commanderx16.com/forum/index.php?/topic/438-need-help-with-basicasm-access-to-vera-sound/###

    ###VERA I/O control register###
    ###When ADDRSEL is set to 0, any reads or writes to $9F20-$9F22 will refer to the VRAM address used by $9F23 (DATA0).###
    lda #$00
    sta $9F25

    ###Contains the middlin-significant byte of VRAM we want to access###
    lda #$F9
    sta $9F21

    ###Contains the most-significant bit of VRAM we want to access and sets the memory access increment for VERA data ports###
    lda #$01
    sta $9F22

    #############################################################
    ###low frequency byte###
    ###Contains the least-significant byte of VRAM we want to access###
    lda #$C0
    sta $9F20

    ###Data port 0###
    lda #$4A
    sta $9F23
    #############################################################

    #############################################################
    ###high frequency byte###
    ###Contains the least-significant byte of VRAM we want to access###
    lda #$C1
    sta $9F20

    ###Data port 0###
    lda #$04
    sta $9F23
    #############################################################

    #############################################################
    ###L-R_volume###
    ###Contains the least-significant byte of VRAM we want to access###
    lda #$C2
    sta $9F20

    ###Data port 0###
    lda #$FF
    sta $9F23
    #############################################################

    #############################################################
    ###waveform and pulse width###
    ###Contains the least-significant byte of VRAM we want to access###
    lda #$C3
    sta $9F20

    ###Data port 0###
    lda #$3F
    sta $9F23
    #############################################################
    $$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$$

  4. Thank you all very much!  Steven thank you for the translation! The frequency is off because it is set to match a note on a great highland bagpipe practice chanter. I want to convert my basic program that plays a pipe tune, adjustable so as to be practiced with, over to assembly.  When I have done so I hope to share it 🙂.  StinkerB06 thank you as well for the shorted version of loading zero into the address 🙂 

     

    The four lines I am jumping off with are:

    VPOKE $0001,$F9C2,$FF
    VPOKE $0001,$F9C3,$3F
    VPOKE $0001,$F9C0,$4A
    VPOKE $0001,$F9C1,$04

    Given the translation of one of the lines I believe I can translate the rest 🙂

     

     

    • Like 1
  5. I've been looking around for an hour+ but I can't seem to find what I need.  Also I am a Monkey See, Monkey Do kind of person.  Could someone translate this one line into assembly? Please?

    VPOKE $0001,$F9C1,$04

    If I can get that in assembly I will have a great jumping off point for a program I want to write in assembly 🙂

    Thanks!

  6. VIC-20 was my first computer, I remember playing Amok, and Snake, and learning to program in BASIC.  I got a expansion cartridge to give higher resolution and I used it for my Trigonometry class :-) I regret not getting an expansion cartridge to do assembly.  Lastly all of it was stolen a few years later, my tape drive included :-(

    But I don't want to end on a low note, I am so happy for this project! 

    • Like 1
×
×
  • Create New...

Important Information

Please review our Terms of Use