Main CPU


Background


The Juno-106 has two CPU:s both are NEC 87AD cpus, model numbers uPD7810 or uPD7811. The 7810 models all have external Eprom:s for the CPU code. Some of the 7811 versions have external Eprom. The 7811s in my chopped-down Juno have CPU-internal masked ROM which cannot be read out, which is why I bought an older CPU card on e-bay.
Both ROM images are 4096 bytes.
The MAIN CPU seems to take care of:
  1. Scanning of front panel Sliders and buttons
  2. Scanning the keyboard
  3. Storing / recalling patch setting from battery-backed RAM
  4. Receiving MIDI data
  5. Signalling the SLAVE CPU upon keyboard action or MIDI events

From the schematics it seems plausible that the MAIN CPU talks to the SLAVE cpu with MIDI-like messages. This model is used in the JX-10 (which is another project that may appear on this web server some day) and makes it easy to receive MIDI data, since the MAIN CPU then just have to forward the incoming MIDI message onto the SLAVE CPU which then produces the correct voltages for the note to start playing. This is not confirmed yet though.
The SLAVE CPU seems to take care of:
  1. Generating control voltages for DCOs, VCFs and VCAs
  2. Generating control signals for Chorus and HPF (fed to JACK board where those circuits are placed)

The SLAVE CPU generates control voltages by putting a 12-bit value onto the PB and PC ports, which is D/A converted in an external R/2R resistor network. This voltage is time-divided into 23 time slots?!?, where for example time slot 0 is noise level, and time slot 6 is DCO CV for voice 3 (found in Juno-106 service manual). The frequency of this pattern is 238 Hz (i.e. each control voltage appears on the CV pin 238 times per second). Had this frequency been higher, the Juno could probably have had much snappier envelopes than it currectly has.

Progress


I have received the CPU board with external Eprom from the seller in the US
The 4kb eprom image has been disassembled and I am now trying to identify the various subroutines in the NEC 7811 code.
Status 2006-05-19
Started looking at the CPU Initialization parts. The various I/O port setups seems to match the schematics in the Juno-106 service manual so I'm pretty confident that the assembly code from the disassembler is pretty OK.
Code snippet from CPU init;

L009C:	MVI	A,00EH			;009C	69 0E			i.	//A <- 0xE
	MOV	MM,A			;009E	4D D0			M.		//Set memory mapping mode 0xE (A)
;														// 16k RAM + onboard RAM enable
	MVI	A,00EH			;00A0	69 0E			i.		//A <- 0xE
	MOV	SMH,A			;00A2	4D C9			M.		//Set SerialModeHighReg to 0xE
;														// = Internal Clk, Tx+Rx Enable
	MVI	A,04EH			;00A4	69 4E			iN		//A <- 0x4E
	MOV	SML,A			;00A6	4D CA			M.		//Set SerialModeLowReg to 0x4E
;														//Clk x16, 8 bit, no par, 1 stopb
	MVI	ANM,008H		;00A8	64 80 08		d..		//Set up A/D converter
;														// = scan mode AN4, 192 states
	MVI	V,0FFH			;00AB	68 FF			h.		//V <- 0xFF
	EXA				;00AD	10			.				//Swap V<->A, (A<-0xFF) ???
	MVI	V,0FFH			;00AE	68 FF			h.		//Load V with 0xFF
	LXI	SP,0FFFFH		;00B0	04 FF FF		...		//Init stack pointer to 0xFFFF
	MVI	A,000H			;00B3	69 00			i.		//A <- 0x0
	LXI	H,0FF00H		;00B5	34 00 FF		4..		//H <- 0xFF L <- 0x00
;
L00B8:	STAX	H+			;00B8	3D			=		//Loop to initialize stack
	EQI	L,000H			;00B9	74 7F 00		t..		// sets 0xFF00-0xFFFF to zero
	JR	L00B8			;00BC	FB			.			// -- end loop
	MVI	A,003H			;00BD	69 03			i.
	MOV	MCC,A			;00BF	4D D1			M.		//Set ModeControlC to 0000 0011
;														// - using PC0, PC1 for serial
	MVI	A,03AH			;00C1	69 3A			i:		
	MOV	MC,A			;00C3	4D D4			M.		//Set Mode C to       0011 1010
;														//                    ooii ioio
;														PC0-1 out-in MIDI+serial
;														PC2 out, MIDI or serial select
;														PC3 in from pedal
;														PC4 in from XXX
;														PC5 in from Casette
;														PC6-7 out to Casette
	MVI	A,000H			;00C5	69 00			i.
	MOV	MB,A			;00C7	4D D3			M.		//Set port B i/o (LED) oooo oooo
	MOV	MF,A			;00C9	4D D7			M.		//Set port F i/o       oooo oooo
;														//Port F0-2 addr RAM b8-10
;														//Port F0-4 addr EPR b8-12
;														//Port F5 selects Eprom(1)/RAM(0)?
;														//Port F6-7 LED row scan
	MOV	PF,A			;00CB	4D C5			M.		// Init PF to all-zero
	MOV	PB,A			;00CD	4D C1			M.		// Init PB to all-zero
	MVI	A,0FFH			;00CF	69 FF			i.
	MOV	MA,A			;00D1	4D D2			M.		//Set port A i/o (KBD) to all-in

Back: To chapter one