back to buchty.net
Section Ensoniq
back to Ensoniq heaven

 
SQ80 / ESQ-1 cartridge
Trying to reach me?
Mostly the cartridge is used only for storing sounds. The reserved memory area for cartridges is $2000 to $3fff, i.e. 8kB. So an ordinary card can hold up to 80 sounds arranged in two banks which we all know as CART-A and CART-B.

Originally, the cartridge was EEPROM based but other carts contain just ROM and thus are read only.

Sad but true... These days one really calls for spam when publishing an email address on a website. But what the heck.

rainer@buchty.net

If you expect an answer please send plain text emails. HTML-formatted mails will be dumped automatically.

Cartridge specifications

Recently I got a double-sized cartridge together with a used SQ80. So I took my multi meter and got the following schematics:
Cartridge Internals
2864 Pinout

There's not much magic inside the cartridge: The heart of any cartridge is an 8k EEPROM, providing 4k each to CART A and CART B. Address and Data Lines are directly connected to the EEPROM, only the write signal has some extra circuitry to guarantee the proper write pulse as needed by the EEPROM.

The latter is due to the fact that CWRT# (cartridge pin 28) is set up for use with a SEEQ 52B33 EEPROM which requires dedicated write-signal conditioning. Not sure why this signal is used and converted into a "classic" write pulse again rather than using the native BWR# signal on pin 25. With contemporary "behaves (almost) like SRAM" EEPROMs, you'd use the standard BWR# signal.

If, like me, you have a double-sized EEPROM (or even bigger) there's also an extra switch needed to route the /CS signal to the desired EEPROM -- each 2864 then holds two banks.

Now, what's a bit weird here is the Cartridge Present circuitry -- although it's included in my cartridge it's not used at all -- the connecting line to /CPRES is cut, which is just hardwired to GND, so the cartridge is always detected as present when inserted.

Finally, for stabilizing the voltage a 2.2uF tantalum capacitor is used and for the sake of proper termination each address, data and control signal is pulled up by a 4k7 resistor.

Software Aspects

Now, what quite nobody knows it the fact that the cartridge can be used also for getting control over your synthesizer. This offers you a method for experimenting with your hardware without having to pulling out the OSROMs. User friendly, I´d say.

While performing a reset the SQ80 / ESQ-1 checks if a cartridge is present by looking at the DUART´s input port 2. If a cart is plugged in it´ll pull this line to Vcc. If a cartridge is detected the address $3fff is checked - and this is where the magic comes in: If $55 is stored here the system control will be handed over to the cartridge by a simple JMP $2000.

During normal operation, the addresses $3ffd and $3ffe serve as "data present" flags showing the presence of program banks in CART B or CART A. An empty bank is marked by $ff in the corresponding flags, a filled one by $00.

Writing to the cartridge works as follows:

  1. clear memory address (write #$ff)
  2. delay
  3. read memory address (must be #$ff now)
  4. write data
  5. delay
  6. read memory address (must be data now)
  7. check if written and read back data are the same
  8. break if check fails, else transfer next byte 

Building your own cartridge
There's not much magic happening here. The memory layout of a cartridge is as follows (offsets, not ESQ1/SQ80 memory addresses):
  • $0000-$0fef: bank A
  • $0ff0-$1fdf: bank B
  • $1ffd: $00 means "bank B occupied"
  • $1ffe: $00 means "bank A occupied"
  • $1fff: $01 means "data cartridge"
    (if you place $55 here, the cartridge will be interpreted as 6809 assembly code and is executed after power-on instead of the OS)

Why this odd layout? Because from the OS's point of view, internal programs (1-40) are bank 0, whereas A and B are bank 1 and 2. Or, put the other way round, cartridge programs are programs 41-80 (A) and 81-120 (B). That way, patch memory forms one consecutive block from $1010 to $2fdf in 6809 memory space and hence can be easily indexed by the following formula:

bank# * 40 (numbers of programs in a bank) * 102 (bytes in a program) + $1010 (base address).