EMMA 02

Netronics Elf II

  • Home
  • CDP18S020
    • General Information
    • I/O Map
  • COMIX-35
  • COMX-35
    • General Information
    • F&M
    • Did You Know...?
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
    • Expansion Box
    • Disk
    • Printers
    • Thermal
    • PL-80
    • 32K RAM
    • 80 Column
    • F&M EPROM
    • F&M Joy Card
    • Super Board
    • COMX BASIC V1.00
  • COSMAC Elf
    • General Information
    • I/O Map
  • COSMAC Elf 2000
    • General Information
    • I/O Map
    • Memory
    • Video
  • COSMAC Microtutor
    • General Information
    • I/O Map
  • COSMAC Microtutor II
    • General Information
    • I/O Map
  • COSMAC Vip
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
    • STK
    • Chip-8 and 8X
    • Test-Word
    • Floating Point BASIC 2.2
  • COSMAC Vip II
    • General Information
    • I/O Map
    • Floating Point BASIC 2.2
  • Cidelsa
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
  • Conic
  • Cosmicos
    • General Information
    • I/O Map
  • CyberVision
  • ETI-660
  • FRED 1
    • General Information
    • I/O Map
    • Cassette
    • CARDTRAN Syntax
  • FRED 1.5
    • General Information
    • I/O Map
    • Cassette
    • FPL-2
    • FPL-4
    • FEL-1
  • HEC1802
  • HUG1802
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
    • Chip-8 ETI-660
  • Infinite UC1800
    • General Information
    • I/O Map
  • JVIP
  • Macbug
  • Membership Card
    • General Information
    • I/O Map
  • Netronics Elf II
    • General Information
    • I/O Map
    • Keyboard
    • BASIC/Math
  • Oscom Nano
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Casette
  • Pecom 32 and 64
    • General Information
    • Software
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Casette
    • Pecom 32 BASIC
    • Pecom 64 BASIC 1.0 & 4.0
  • Pico/Elf V2
    • General Information
    • I/O Map
  • Quest Super Elf
    • General Information
    • I/O Map
  • RCA Game System
  • RCA Microboard
    • General Information
    • I/O Map
  • RCA MS2000
    • General Information
    • I/O Map
  • RCA MCDS
    • General Information
    • I/O Map
  • RCA Studio II
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard
    • ST2
  • RCA Studio III
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard
  • RCA Studio IV
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard
    • ST4 Syntax
  • RCA Video Coin
    • General Information
    • I/O Map
    • Memory
    • GPL-A (2K RAM)
    • GPL-A (2K ROM)
    • GPL-2
    • GPL-3
    • GPL-4
  • SBC1802
  • Studio 2020
  • Telmac 1800
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard
    • Cassette
  • Telmac 2000
    • General Information
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
  • Telmac TMC-600
    • General Information
    • Software
    • I/O Map
    • Memory
    • Video
    • Sound
    • Keyboard
    • Cassette
    • Telmac SBASIC v24.3
  • VELF
    • General Information
    • I/O Map
    • BIOS
    • Video
    • Keyboard
  • VIP2K MC
    • General Information
    • I/O Map
    • Memory
    • Video
    • Chip 8
  • VIS1802
  • VT1802
  • Visicom COM-100
    • General Information
    • I/O Map
    • Memory
    • Video
    • Keyboard

 

 

 

 

 

 

 

 

 

 

 

 

Full BASIC Math/ROM Board

The Full BASIC Math/ROM Board has 3 2KB EPROMs for the Netronics BASIC LEV III A1, Copyright 1979, written by Larry Sandlin. This BASIC is rather unique in the RCA1802 world due to the usage of the National MM57109 Number Cruncher Unit.

In 2024 the AVI Elf II rev D Variant project was started, this is a re-creation of the Elf II including a recration of the Full BASIC Math/ROM Board, designed by the late Ed Keefe. Thanks to Josh Bensadon, Andrew Wasson, Walter Miraglia, Costas Skordis and Rizal Acob.

Herb Johnson collected a lot of valuable information about this board and the National NCU on his old/new ELF II BASIC/Math board page.

BASIC quirks

Startup & baud rate

The first bytes in the BASIC ROM contain a LBR to 0xF000, i.e., the GiantBoard monitor is started on power up or reset. To start BASIC use the Elf keypad and type 03 00 00 (each followed by IN). Then on the terminal press 'return' to run the auto baud routine. After this BASIC will request a number 32 or 64 to set the line width. I have only managed to get BASIC running on 300 baud. Lower baud rates do get detected but these will drop some characters.

The Emma 02 XML file for the Math/ROM board will automatically start at address 3 so no manual start is needed.

Instead of starting at address 3, which is a COLD start, a start at address 5 is also possible, resulting in a WARM start.

END Command

The BASIC END command is mandatory, if not specified, BASIC will be restarted with a COLD restart (at the END of program execution).

Backspace key

Backspace key code is 0x7F, not 8 as most other SW uses.

National MM57109 NCU

The following MM57109 commands are not supported in BASIC: HALT, Branch Test and Count commands, IN, AIN, PF1, PF2, PRW1 and PRW2. Some of these commands will likely not work on the Math/ROM Board either as they would need additional RAM installed. These commands are not implemented in Emma 02, except for HALT, IN, PF1 and PF2.

For timing Emma 02 is using average execution times where available, otherwise worst case values are used.

Some of the simulated MM57109 calculations in Emma 02 will be different compared to the real board, this is due to different calculation methods and math accuracy.

I/O Map

The following table lists the I/O definitions for the Full BASIC Math/ROM Board (including required Giant Board I/O)

Q Serial and cassette output.
EF2 (Reversed) MM57109 calculation data ready and error flag, cassette input.
EF3 Parallel input data ready flag.
EF4 Serial input (reversed).
OUT 5 MM57109 ouput port, bit 0 to 5: 6 bit OP CODE, bit 6: POR (Power On Reset).
OUT 7 Parallel ouput port.
INP 2 MM57109 input port, bit 0 to 3: digit input (DO1 to DO4), bit 5: error flag, bit 6: Ready (ready to execute next instruction).
INP 7 Parallel input port.

Memory Map

0000 - 17FF Three 2 KB ROMs containging the Full BASIC.
1800 - 1FFF Reserved for an additional 2 KB ROM.
2000 - xxxx RAM, size is detected on startup. The last RAM page is used for the stack and data. The second last RAM page is used for variable storage.
F000 - FFFF Giant board ROM, repeated every 256 bytes.

BASIC variables

The second last RAM page (and lower) is used for variable and string storage. There is no fixed place for any variable, RAM is just filled from top down, variable names and first bytes have bit 7 set.

The memory dump below shows BASIC variable input:

A=1.23456789
B=HELLO
C=987

Note second last RAM page in this example is on 0xEE00:

Changing variable A to:

A=10

Will change memory to:

BASIC System Parameters

The last RAM page is used for BASIC System parameters.

The second last page (and lower if needed) is used for variable and string storage. There is no fixed place for anything RAM is filled from top down, variables name and first digit have bit 7 set.

For details about the last page, see table below, note that these are my guesses and are potentially incorrect. xx indicates the high byte of the last RAM page, yy the high byte of the seconf last RAM page.

xx01 - xx02 End location BASIC variables (0xyyFF).
xx03 - xx04 End location BASIC variables (0xyyFF).
xx05 - xx06 Start location BASIC program (0x2006).
xx07 - xx08 Start location terminal input buffer (0xxx70)
xx09 0x49 (300 baud), measured input baud rate code.
xx0A 0x4B (300 baud), measured output baud rate code.
xx0B - xx0C End location BASIC variables (0xyyFF).
xx0D - xx0E End location BASIC program.
xx20 0x49 (300 baud), user defined (via SET K) input baud rate code.
xx21 0x4B (300 baud), user defined (via SET P) output baud rate code.
xx22 - xx23 Copy of start location terminal input buffer (0xxx70).
xx26 - xx27 Start location BASIC variables.
xx28 - xx29 Copy of start location terminal input buffer (0xxx70).
xx36 Cursor line position counter (1 is left most position).
xx37 0x18 or 0x37 (selecting line width 32 or 64, set on startup).
xx42 - xx4F Calculation result digits.
xx42 RPN format for sign, bit 3 = 1 indicates negative mantissa, bit 1 = 1 indicates negative exponent.
xx43 RPN digital point number.
xx44 - xx4F Rest of the result, in text format, repeating signs like minus (-), digital point (.) and exponent (E).
xx62 - xx66 ‘00000’ - probably used for the BREAK line number.
xx67 - xx6A ‘0000’ - used for the CONDITION error code number.
xx70 - xxB7 Terminal input buffer.
xxB8 - xxBA ‘;’ a semicolon followed by a return and new line code.
xxBB - xxBD ‘:’ a colon followed by a return and new line code.
xxBE - xxC2 ‘WHAT’ followed by a return code (used as error message in BASIC input).
xxC3 - xxC4 0x8A followed by a new line code.
xxC5 - xxD1 ‘CONDITION #’ followed by 0xA0 and a return code (used as error message, 0xA0 will be replaced by an error number).
xxD2 - xxD8 ‘BREAK n’ followed by 0xA0/0xEE (used when break where n is the line number).
xxD9 - xxFF Reserved for stack.