# Gernreich

Members

17

1

## Posts posted by Gernreich

### Monkey See, Monkey Do

Thanks for sharing DusanStrakl! I will take a look at them.

### Monkey See, Monkey Do

Dang, guess I'll need to study this a bit more, thanks for the quick responses StinkerB06 !

### Monkey See, Monkey Do

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

### Monkey See, Monkey Do

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..........

### Monkey See, Monkey Do

Hrm maybe decrement/increment?

### Monkey See, Monkey Do

Cheers StinkerB06 !!!  Do I need to reset to play another note?

WOOT!!!!!

LDA #\$00
STA \$9F25
LDA #\$01
STA \$9F22
LDA #\$F9
STA \$9F21
LDA #\$C2
STA \$9F20
LDA #\$FF
STA \$9F23
LDA #\$C3
STA \$9F20
LDA #\$3F
STA \$9F23
LDA #\$C0
STA \$9F20
LDA #\$4A
STA \$9F23
LDA #\$C1
STA \$9F20
LDA #\$04
STA \$9F23

WORKED!!!!!

### Monkey See, Monkey Do

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
#############################################################
\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$\$

### Monkey See, Monkey Do

<light bulb>!!!

### BASIC

``````10 POKE\$9F20,0
20 POKE\$9F21,0
30 POKE\$9F22,0
40 POKE\$9F23,1
``````

This is identical to doing `VPOKE0,0,1`.

### 6502

```stz \$9F20
stz \$9F21
stz \$9F22
lda #1
sta \$9F23```
• 1

### Monkey See, Monkey Do

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

• 1

### Monkey See, Monkey Do

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!

### Similar to Easy 6502 inside the X16 Emulator?

I AM ROOT!

(TrueNuff callback)

• 2

### Similar to Easy 6502 inside the X16 Emulator?

Thanks! I am now reading Machine Language for Commodore Machines. And am typing in code now    Also thanks for your youtube Hello World video and answering my questions there

• 1

### Similar to Easy 6502 inside the X16 Emulator?

Hello all,

I just worked thorough the Easy 6502 tutorial with its assembler/debugger.  Is there something similar that can be ran inside the X16 emulator?  Maybe some combination of using -debug and mon?  By similar I mean I can type in assembly code, assemble it, then either run it or step through it with a debugger.

Thanks!

### Ben Eater series on 65C02 Breadboard computer

Agreed he explains them very well for me.  I would not be surprised if he is interested in this project

### Ben Eater series on 65C02 Breadboard computer

Just finished going through Ben Eater's whole series on the 65C02 Breadboard computer.  I am totally going to get his kits to make one.  I find it so cool that it uses the 65C02, the same that will be in the X16!

P.S. hope this is the right non-X16 forum if not please let me know

• 6

### Hi I'm Michael :-)

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!

• 1
×
×
• Create New...