<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>
Date   : Tue, 23 Nov 1999 15:17:30 GMT
From   : hick@... (gARetH baBB)
Subject: Re: Looking for Electron documentation (for emulator)

In message <30.199911231437.OAA10202@...>,
          alexdevries@... (=?iso-8859-1?q?Alex De Vries?=) wrote:

> So I'm looking for documentation on the Electron
> (memory map, generating sound and graphics etc). If

The only real hardware is the ULA, 16 duplicate bytes mapped at FExx.

FE00 - irq status and control

bit 0          master irq
bit 1          power on reset
bit 2          display end
bit 3          real time 50hz (combined with bit 2 gives a 100hz source)
bit 4          transmit data empty
bit 5          receive data full
bit 6          high tone detect
bit 7          not used

Write to the bit to enable appropirate irq.

Read for irq status, write to FE05 to clear irq.

FE01 - not used

FE02 - screen start address

bit 0          0
bit 1          0
bit 2          0
bit 3          0
bit 4          0
bit 5          A6
bit 6          A7
bit 7          A8

FE03 - screen start address

bit 0          A9
bit 1          A10
bit 2          A11
bit 3          A12
bit 4          A13
bit 5          A14
bit 6          not used
bit 7          not used

FE04 - cassette shift reg

FE05 - irq clear and paging reg

bit 0          rom page bit 0
bit 1          rom page bit 1
bit 2          rom page bit 2
bit 3          rom page enable
bit 4          clear display irq
bit 5          clear real time irq
bit 6          clear high tone irq
bit 7          clear nmi by writing 1 - this returns memory control back to ULA

"There is the potential within the operating system to directly address up
to 16 paged ROMs of 16K bytes eaach. However, four of the slots are
effectively occupied by the keyboard and the BASIC ROM. The keyboard
occupies positions 8 and 9 (both are equivalent). To read from the keyboard,
the 14 address lines A0-A13 are used. Each of these is connected to one of
the columns of the keyboard. If a particular address line is low, that line
of the keyboard is selected on a read. The row data from the keyboard is
then returned is the lower 4 bits read from the data bus. The BASIC ROM is
selected by paging ROM number 10 or 11."

"In order to select any of the other ROMs, a particular sequence must be
followed. First of all, the ULA must be told that BASIC should be
de-selected. This is done with the page enable bit. One of the ROMs 12-15
will be selected in this way. Now that BASIC has gone, it is (if so desired)
possible to page in one of the ROMs 0 to 7. This is simply performed by
setting the page enable bit to 0 and selecting the required ROM with bits 0
to 2."

FE06 - sound and cassette control

cassette transmit baud rate:

bit 0 - 6      0
bit 7          not used

cassette receive baud rate:

bit 0 -7       not used ...

sound:

bit 0 - 7      8 bit value, frequency generated is 1MHz/(16*(x+1))

FE07 - misc

bit 0          not used
bit 1 - 2      casette input (0) / sound enable (1) / cassette output (2)
bit 3 - 5      screen mode
bit 6          cassette motor on/off
bit 7          caps lock led on/off

FE08 - FE0F - palette

2 colour mode:

FE08   xx b1 xx b0 xx g1 xx xx
FE09   xx xx xx g0 xx r1 xx r0

b is blue component, r is red, g is green. 0 is colour 0, 1 is colour 1.

4 colour mode:

FE08   b3 b2 b1 b0 g3 g2 xx xx
FE09   xx xx g1 g0 r3 r2 r1 r0

16 colour mode:

FE08   b10 b8 b2 b0 g10 g8 xx xx
FE09   xx xx g2 g0 r10 r8 r2 r0
FE0A   b14 b12 b6 b4 g14 g12 xx xx
FE0B   xx xx g6 g4 r14 r12 r6 r4
FE0C   b15 b13 b7 b5 g15 g13 xx xx
FE0D   xx xx g7 g5 r15 r13 r7 r5
FE0E   b11 b9 b3 b1 g11 g9 xx xx
FE0F   xx xx g3 g1 r11 r9 r3 r1

Good luck, I doubt you can do worse that the WSS Electron emulator, which
last time I saw it it was seriously busted.
<< Previous Message Main Index Next Message >>
<< Previous Message in Thread This Month Next Message in Thread >>