Close

Day 2

A project log for Project 72 - Korg DW-6000 wave memory expansion

An attempt to reverse engineer and modify Korg DW-6000s firmware in order to expand its wave memory.

mateuszkolanskimateusz.kolanski 03/12/2016 at 18:240 Comments

I found the Holy Grail: THE manual. Over 400 pages long epic journey through the innards of 7811. Neat! It was soo sexy that I even printed it out. And what do you know, I found an explanation for those illegal opcodes and other instructions making no sense whatsoever: there are two nice opcodes: TABLE and JB. The first one puts the current value of program counter incremented by 3 and whatever lies in the accumulator into the C register and does the same (but this time +4 instead of +3) with the B register. The latter instruction performs a jump to the address pointed by the register pair B:C. So basically if there is any data after TABLE and JB opcodes, it's the jump table - not instructions. That's why some of them were senseless and others illegal.

00000E8E: 48 A8              TABLE   
00000E90: 21                 JB      		; jump to addres pointed by BC
00000E91: 29                 LDAX    (BC)	; if A = 0, jump to $1429
00000E92: 14 05 14           LXI     BC,$1405	; if A = 1, jump to $1405
00000E95: 5C 14              BIT     4,VV:14	; if A = 2, jump to $145C
00000E97: B8                 RET     		; ...
00000E98: 14 06 0F           LXI     BC,$0F06	; ...
00000E9B: 06                 illegal 		; ...
00000E9C: 0F                 MOV     A,L
00000E9D: 06                 illegal 

Discussions