LoginSignup
4
3

More than 5 years have passed since last update.

[PC-6001] PSG制御

Last updated at Posted at 2013-04-26

I/O

ポート番号 内容
$A0 レジスタ指定ポート
$A1 出力データ
$A2 入力データ

read/write

BIOS使わない

;read
        ld      a,register      ;レジスタ番号
        out     ($A0),a
        in      a,($A2)

;write
        ld      a,register      ;レジスタ番号
        out     ($A0),a
        ld      a,data
        out     ($A1),a

BIOS使う

;write
        ld      a,register
        ld      e,data
        call    $1BC5

;read & write
        ld      a,register
        ld      e,data
        call    $1BBE
        ;Dreg = 書き込み前のデータ
  • readは無い

レジスタ

register PC-6001 AY-3-8910 Operation
\$00~$05 R0~R5 R0~R5 Tone Generator Control
\$06 R6 R6 Noise Generator Control
\$07 R7 R7 Mixer Control-I/O Enable
\$08~$0A R8~R10 R10~R12 Amplitude Control
\$0B~$0C R11~R12 R13~R14 Envelop Period Control
\$0D R13 R15 Envelop Shape/Cycle Control
  • R8以降はAY-3-8910と番号がズレているので注意
4
3
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
4
3