VZ200/VZ300
Memory Map
VZ200
| address | Size | |
|---|---|---|
| $0000-$1fff | BASIC Interpreter (ROM 0) | 8KB |
| $2000-$3fff | BASIC Interpreter (ROM 1) | 8KB |
| $4000-$67ff | Reserved for ROM Cartridges | 10KB |
| $6800-$6fff | Keyboard, Cassette I/O, Speaker, VDP Control | 2KB |
| $7000-$77ff | Video Display RAM | 2KB |
| $7800-$8fff | Internal User RAM | 6KB |
| $9000-$cfff | Expansion RAM | 16KB |
| $d000-$ffff | (unused) | 12KB |
VZ300
| address | Size | |
|---|---|---|
| $0000-$3fff | BASIC Interpreter (Single ROM) | 16KB |
| $4000-$67ff | Reserved for ROM Cartridges | 10KB |
| $6800-$6fff | Keyboard, Cassette I/O, Speaker, VDP Control | 2KB |
| $7000-$77ff | Video Display RAM | 2KB |
| $7800-$b7ff | Internal User RAM | 16KB |
| $b800-$f7ff | Expansion RAM | 16KB |
| $f800-$ffff | (unused) | 2KB |
I/O
| address | device |
|---|---|
| $00~$0f | Printer |
| $10~$1f | Floppy disk controller |
| $20~$2f | Joystick interface |
| $30~$3f | Communications MODEM |
| $70~$7f | Memory bank switch |
Joystick
- スイッチが押されると該当ビットが0になる。(負論理)
- $20がよく使われている。$2eのミラー?
| address | bit4 | bit3 | bit2 | bit1 | bit0 |
|---|---|---|---|---|---|
| $27 | 2-Arm | ||||
| $2b | 2-Fire | 2-Right | 2-Left | 2-Down | 2-Up |
| $2d | 1-Arm | ||||
| $2e | 1-Fire | 1-Right | 1-Left | 1-Down | 1-Up |
Keyboard, Cassette I/O, Speaker, VDP Control
- $6800にマッピングされている。(Memory Mapped I/O)
- $6801~$6fffにもミラーリングされている。
- リードオンリー。BASICでは$783bに保存されている。
| bit | function | |
|---|---|---|
| bit5 | Speaker B | |
| bit4 | VDC Background | 0 = green (text & graphics), 1 = orange (text) / buff (graphics) |
| bit3 | VDC Display Mode | 0 = mode 0 (text/low res.), 1 = mode 1 (graphics/hi-res.) |
| bit2 | Cassette out (MSB) | |
| bit1 | Cassette out (LSB) | |
| bit0 | Speaker A |
Keyboard Matrix
- $68xxにマッピングされている。(Memory Mapped I/O)
- $69xx~$6fxxにもミラーリングされている。
- キーが押されると該当ビットが0になる。(負論理)
- アドレスのbitを0にしたマトリクス(のOR)を同時に取得することが出来る。
- $687d(01111101)の場合は、$687fと$68fdを同時に取得できる。
- $6800(00000000)の場合は、全てのマトリクスを同時に取得できる。
| address(bit) | bit5 | bit4 | bit3 | bit2 | bit1 | bit0 |
|---|---|---|---|---|---|---|
| $687f (01111111) | J | ; | K | : | L | H |
| $68bf (10111111) | U | P | I | RETURN | O | Y |
| $68df (11011111) | 7 | 0 | 8 | - | 9 | 6 |
| $68ef (11101111) | M | SPACE | , | . | N | |
| $68f7 (11110111) | 4 | 1 | 3 | 2 | 5 | |
| $68fb (11111011) | V | Z | C | SHIFT | X | B |
| $68fd (11111101) | F | A | D | CTRL | S | G |
| $68fe (11111110) | R | Q | E | W | T |
割り込み
- VSYNCのタイミングでRST $38が呼ばれるっぽい。
BASICワークエリア
| address | size | note | |
|---|---|---|---|
| $783b | 1B | Copy of output latch | ($6800) |
| $787d | 3B | Interrupt exit (called upon interrupt) | |
| $788e | ptr | Execute address for USR program | |
| $789c | 1B | Output device code | (0=video, 1=printer, -1=cassette) |
| $78a0 | ptr | Start of string table | End of BASIC's stack +1 |
| $78a4 | ptr | Start of BASIC program | $7ae9 |
| $78a6 | 1B | Cursor position | |
| $78b1 | ptr | Top of Memory | |
| $78f9 | ptr | Star of simple variable table | End of BASIC program +1 |
| $78fb | ptr | Start of array variable table | Endr of simple variable table +1 |
| $78fd | ptr | Free space | End of array variable table +1 |
| $79e8 | Start of BASIC line input buffer |
キャラクターコード
| $x0 | $x1 | $x2 | $x3 | $x4 | $x5 | $x6 | $x7 | $x8 | $x9 | $xA | $xB | $xC | $xD | $xE | $xF | |
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| $0x | @ | A | B | C | D | E | F | G | H | I | J | K | L | M | N | O |
| $1x | P | Q | R | S | T | U | V | W | X | Y | Z | [ | \ | ] | ^ | ← |
| $2x | ! | " | # | $ | % | & | ' | ( | ) | * | + | , | - | . | / | |
| $3x | 0 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | : | ; | < | = | > | ? |
- $40~$7Fは反転(Inverse)。
.VZ File Format
| offset | size | |
|---|---|---|
| $00~$03 | 4B | Magic Number |
| $04~$14 | 17B | File Name |
| $15 | 1B | File Type ($F0/$F1) |
| $16~$17 | 1W | Start Address (Little Endian) |
| $18~ | Program |
Type F0
- Start AddressにProgramを読み込んだ後、開始/終了アドレスをBASICワークエリアにセットする。
- BASICプログラム用
Type F1
- Start AddressにProgramを読み込んだ後、実行する。
- マシン語プログラム用
Last modified 2016-08-04 13:37:16