             
             Technical Information about the Emerson Arcadia 2001

Written by Paul Robson (autismuk@aol.com)

Created on 25th June 1998.
Last updated on 22nd July 1998.

Introduction
------------

This document is an attempt to exactly describe the internal workings of
the Emerson Arcadia 2001 Videogame Console.

1. General
----------

- Signetics 2650 CPU at 3.58 Mhz
- 1k x 8 of RAM (physically present but mostly unavailable :-( )
- 128 x 208 pixel resolution (alternate 128 x 104 mode available)
- 16 x 26 background display (2 colour 8 x 8 pixel characters) (can be 16x13=
)
- 4 x 8 x 8 Sprites (2 colour 8 x 8 pixels)
- total of 8 user defined characters available... jaw drops in amazement.
- 2 x 2 axis Analogue Joysticks
- 2 x 12 button Controllers
- 3 buttons on system unit and CPU Reset
- Single channel beeper

2. Memory map
-------------

The memory map of the 2001 is below.

0000..0FFF      4k ROM Block 1 (first 4k of a cartridge)
1000..17FF      (Unmapped)
1800..18CF      Screen display , upper 13 lines, characters/palette high bit=
s
18D0..18EF      Free for user programs.
18F0..18F7      Sprite coordinates y0x0y1x1y2x2y3x3 (Section 10).
                The sprite uses a UDG 0 =3D $1980,1 =3D $1988,2 =3D $1990 3=20=
=3D $1998
18F8..18FB      User memory.
18FC            A control byte, function unknown [is almost always EE ED or=20=
EF]
18FD..18FE      Sound Hardware Pitch & Volume. The 3 high bits of 18FE contr=
ol
                the horizontal scanline scrolling.
18FF            Current Character Line
1900..1902      Keypad Player 1
1903            Unmapped
1904..1906      Keypad Player 2
1907            Unmapped
1908            Controller Buttons
1909..197F      Unmapped
1980..19BF      User defined characters (8 possible, 8 bytes per character)
19C0..19F7      Unknown usage - not used for anything, apparently.
19F8            Screen resolution (bit 6)
19F9            Background Colour / Colour #0 (bits 0..5)
19FA            Sprite Colour 2 & 3 (bits 0..5)
19FB            Sprite Colour 0 & 1 (bits 0..5)
19FC..19FD      Sprite-Sprite & Sprite-Background Collision bits (see later)
19FE..19FF      Paddles (read only) 19FE is Player 2 , 19FF is Player 1
1A00..1ACF      Screen display , lower 13 lines, characters/palette high bit=
s
1AD0..1AFF      User memory
1B00..1FFF      Unmapped
2000..2FFF      4k ROM Block 2 (for 8k carts such as Jungler)
3000..7FFF      Unknown. The flyers talk about the ability to have 28k
                carts. This would only be feasible if 0000-7FFF was all ROM
                except for the '1111' page.

3. Video Memory
---------------

The screen table is at 1800-CF and 1A00-CF. Each page has 13 lines of the
screen (16 bytes per line,26 lines in total, 208 scan lines). The 2 most
significant bits of each byte are colour data, the 6 least significant
are character data. The resolution of the Arcadia is 128 x 208 pixels.

It is possible to halve the screen resolution so 1A00..1ACF can
be used for code. This is controlled by bit 6 of $19F8.

The byte at location $18FF is the current Character Line address, lower
4 bits only. The start line goes from 1800 to 18C0 then from 1900 to 19C0.
The 4 least significant bits of this count 0123456789ABC0123456789ABC,
going to D when in vertical blank. The 4 most significant bits are always
'1'. Some games do use this for scrolling effects - a good example of this
is the routine at $010F in Alien Invaders which scrolls the various bits of
the screen about using the memory locations $18FF and $18FE.

The screen can be scrolled upto 7 pixels to the left using the high 3 bits
of $18FE. This is used in Alien Invaders.

A line beginning with $C0 contains block graphics. Each square contains
3 wide x 2 high pixels, coloured as normal. The 3 least significant bits
are the top, the next 3 bits are the bottom. Alien Invaders uses this for
shields. The graphics are returned to normal for the next line.

The VBlank signal (maybe VSYNC) is connected to the SENSE input. This is
logic '1' when the system is in VBLANK.

The Flag line does.... something graphical - it might make the sprites
half width/double height perhaps. Breakaway sets this when the bats are
double size in vertical mode.

4. Character codes
------------------

Character codes 00..37 to be in a ROM somewhere in the Emerson. These
are known, others may be discovered by comparing the screen snapshots
against the character tables. If the emulator displays an exclamation
mark you've found one. Get a snapshot to see what it looks like
normally and let me know. Codes 38..3F are taken from RAM.

00      (space)
01..0F  Graphic Characters
10..19  0..9
1A..33  A..Z
34      Decimal Point
35..37  Unknown - Control Characters ?
38..3F  User Defined Characters (8 off, from 1980..19FF)

Character data is stored 8 bits per character , as a single plane graphic
The 2nd and 3rd bits of palette data come from the screen tables, so there
are two colours per character and 4 possible palette selections for the
background.

A character set is available from Paul Robson (autismuk@aol.com) on
request.

5. ROM Images
-------------

ROM Images are loaded into 0000-0FFF. If the ROM is an 8k ROM it is
also loaded into 2000-2FFF. I do not know how 12k images or greater
are mapped but I doubt that many exist (there is very little RAM
available for user programs).

6. Controls
-----------

All key controls are indicated by a bit going to '1'. Unused bits at
the memory location are set to zero.

Keypads
-------

1900-1902 (Player 1) 1904-1906 (Player 2)

The keypads are arranged as follows :-

        1       2       3
        4       5       6
        7       8       9
      Enter     0     Clear

Row 1/4/7 is 1900/4, Row 2/5/8/0 is 1901/5 and Row 3/6/9 is 1902/6
The topmost key is bit 3, the lowermost key is bit 0.

Location $1908 contains bit 0 Start,bit 1 Option,bit 2 Difficulty.
These keys are "latched" i.e. a press causes a logic 1 to appear
on the current frame.

The paddles are mapped onto 19FE (player 2) and 19FF (player 1). The
currently selected direction seems to toggle every frame, and the
only way it seems to be possible to work out which axis is being
accessed is to count the number of frames. Each game I have tried
is doing this. "Cat Tracks" swaps the paddles every game ; the reason
is as yet unknown.

The fire buttons are equivalent to Keypad #2 e.g. they are 1901 and
1905 bit 3.

7. Sound
--------

Single channel buzz. Need to do more with this !

18FC control byte ?
18FD pitch
18FE volume ? (lower 4 bits)

8. Sprites
----------

Sprite pointers are at 18F0..18F7 (there are four of them). The graphics
used are the ones in the 1980..19BF UDG table (the first four).

Sprite addresses (x,y) are converted to offsets in the 128 x 208 as follows=20=
:-

1) 1's complement the y coordinate
2) subtract 16 from the y coordinate
3) subtract 44 from the x coordinate

9. Palette
----------

The Palette is encoded between 19F8-19FB. This section describes the method
by which colours are allocated. There are 8 colours, information is coded 3=20
bits per colour (usually 2 colours per byte)

 Colour Code    Name    Colour Elements
 ------ ----    ----    ---------------
  7     111     Black   (GRB =3D 000)
  6     110     Blue    (GRB =3D 001)
  5     101     Red     (GRB =3D 010)
  4     100     Magenta (GRB =3D 011)
  3     011     Green   (GRB =3D 100)
  2     010     Cyan    (GRB =3D 101)
  1     001     Yellow  (GRB =3D 110)
  0     000     White   (GRB =3D 111)

Bits 0..2 of $19F9 are the background colour
Bits 3..5 of $19F9 are the colours of tile set 0
                tiles 1,2 and 3 are generated by adding 2,4,6 to the colour.
                this is probably what the xor gates are for !
Bits 0..5 of $19FB are the colours of Sprites 0 & 1 (sprite 1 is low bits)
Bits 0..5 of $19FA are the colours of Sprites 2 & 3 (sprite 3 is low bits)

Bits 6..7 of $19F9..B and all of $19F8 (except bit 6) currently has
no known function. Brightness ???

10. Collision Detection
-----------------------

Bits are set to zero on a collision - I think they are reset at the
frame start. There are two locations : one is for sprite/background
collisions, one is for sprite/sprite collisions.

19FC    bits 0..3 are collision between sprites 0..3 and the background.

19FD    bit 0 is sprite 0 / 1 collision
        bit 1 is sprite 0 / 2 collision
        bit 2 is sprite 0 / 3 collision
        bit 3 is sprite 1 / 2 collision
        bit 4 is sprite 1 / 3 collision (guess)
        bit 5 is sprite 2 / 3 collision (guess)

11. Other information
---------------------

Interrupts are not supported.. maybe. All cartridges have a RETC UN
at 0003 (presumably the interrupt vector). This may be called on VSYNC
or VBLANK, but until I find a cart which uses it, who cares !

The Read/Write 2650 CPU Commands do not appear to be connected to
anything in hardware. No cartridge has been found which uses them.
The emulator crashes to the debugger with these commands, as it does
with any illegal commands.

12. Frame Description
---------------------

This describes the frame rendition (for NTSC). The description Starts at
the end of a display frame, e.g. scanline 216 on the diagram. For a PAL
machine these will be slightly different - however I don't think that
this would affect anything because of the way timing is usually done on
games, and the fact that scanline level operations are virtually
impossible.

1.   Set the VBLANK (SENSE) line to logic 1, indicating entry of vblank
2.   Set the current character address to $FD (off screen)
3.   Wait for 46+8 Scanlines. (see frame diagram)
4.   Set the VBLANK (SENSE) line to logic 0.
5.   Reset the Collision Bytes to $FF
6.   For 1800..18C0, then for 1A00..1AC0 (if not low resolution)
6a.    Set the current character address to $Fx
6b.    wait for 8 (standard) or 16 (low resolution) Scanlines
6c.    Render the line using the current character & vertical scroll data
6d.    Draw all sprites which terminate in the area just drawn.
7.   Restart the frame (from Stage 1).

Stage 5 can be replaced by execute 208 Scanlines if this is not a 'redraw'
frame.

0       ---------------------------
        ! Initial Vertical Blank  !
8       ---------------------------
        ! Display (208 scanlines) !
216     ---------------------------
        !     Frame Retrace       !
262     ---------------------------


---------------------------------------------------------------
        

        [later additions by Paul Robson]

0x18fe bit 4 set means sound off?

Sound is implemented on the latest code version, but I lost the
source to it. I *think* it's a straightforward value to frequency
calculation, might be 7874/(n+1) (from the Acetronic system),
but it is almost certainly something like

Clock Freq / (2^Something) / (Byte Data + 1)

It is more or less right on the release version, so a bit of 
experimenting should come up with the right code.

I also believe (and this isn't clear from the tech I think) that
the CPU is frozen during display time.

PSR


---------------------------------------------------------------


        [later additions by PeT, who wrote the MESS emulator]

pet additions:
Golf has a 4kbyte block at 0x0000 and a 2kbyte block at 0x4000.

19f9 bit 6 
switches between the axes of the analog stick
of both? players
(must not affect ad converter immediately)

Sprites are used around the playfield a lot
(space vultures, grand slam tennis, space attack, ...)
some cartridges think the left 16? pixels are not displayed
so I display a 32 pixel frame left and right,
a 8 pixel frame at the top and a bottom frame of 24 pixel

character color ((ch&0xc0)>>5) | ((mem[0x19f9]&8)>>3)

1903 palladium player 1 4 additional keys
1907 palladium player 2 4 additional keys

19f8 bit 6
 off 13 charlines
 on  26 charlines
19f9 
 bit 7
  off doublescan
  on no doublescan

19f8 bit 7 graphics mode on (lower 6 bits descripe rectangles)
0xc0 in line switches to graphics mode in this line
0x40 in line switches to char mode in this line
 22111000
 22111000
 22111000
 22111000
 55444333
 55444333
 55444333
 55444333

sprite doublescanned (vertical enlarged)
sprite 0 0x19fb bit 7
sprite 1 0x19fb bit 6
sprite 2 0x19fa bit 7
sprite 3 0x19fa bit 6
 
18fc crtc vertical position register
in PAL palladium
 0xff 16*16+6 visible
  about 8 lines above and below
 0x00 in PAL palladium
  7 lines visible

18fd
 bit 7 on
  alternate character mode color2x2
  (2 backgrounds, 2 foreground colors)

color2x2
 character bit 7 -> background select 
  0 19f8 bits 2..0
  1 19f9 bits 2..0
 character bit 6 -> foreground select
  0 19f8 bits 5..3
  1 19f9 bits 5..3

normal mode:
 character bit 7..6 foreground colors bits 2..1
 19f9 bits 0..2 ->background color
 19f9 bit3 foreground color bit 0
 
19f8, 19f9 readback alway 0xff
1900 readback 0x5y
17bf readback 0x54
1b00 holds value for a moment, gets 0x50

sprite y position 
 basically the same as crtc vertical psoition register, but 1 line later

sprite x position
 not 44 but 43

---------------------------------------------------------------

[end of document]
