

General Comments for the Emulator
----------------------------------------------------
Newbrain emulator
Programmed by Despinidis Chris
----------------------------------------------------
This emulator uses the raize z80 emulator.
The disassembly part in the debug screen is from the
pasmulator z80 emulator with very seceral modifications by me.
At first i used the pasmulator for emulating the z80 but
it was not a 100% z80 emulator so i switched to raize.
The newbrain emulator was first programmed in Delphi version 5.0
using the following third party components:
Delphi X
Jedi code library
VGLib version 1
Hit more to get more info for these topics:
Starting
--------
Loading And Saving
------------------
Importing Files
----------------
Designing Characters
--------------------
Led Screen
----------
Changing Speed
--------------
Keyboard
--------
Hit more to get more info for these topics
Starting
--------
To Start the emulator press F5 or choose Start Emulation from the menu.
Loading And Saving
------------------
The load and save commands in the menu loads and saves snapshots of
newbrains ram. This is useful if you want to continue what you were doing
later from the point you were. You don't have to load a program and run it.
To Load a basic file first you must use the menu command Set Basic File and choose
a .bas file.
Then when you start the emulator (or it may be already started) you just type Load
and after a while the program will be loaded and you can type Run to execute it.
To save a basic program type Save "<Filename>" where <Filename> is the name of the file
that will be created in the folder BAS.
IMPORTAND NOTE : Use the Save command only WITH a filename i.e. Save "Demo" not just Save
Importing Files
----------------
After you start the emulator choose a file from the menu tools/import from textfile and wait
until it finishes then save the file (Type Save and a filename a described previously).
Designing Characters
--------------------
From the tools menu choose Design Charset.
Load the charset or if the emulator is running it is already loaded.
The rest is very easy to understand Click the character you want to change and
the character will apear on the matrix in the right.Change it and press save above the matrix.
When you are finished press the save button next to load.
Note : Charset 1 and 2 is 8 by 10 not 8 by 8 but it is encoded as 8 by 8. Importand role to the
encoding play the two first rows and the two right pixels in these rows. What is does os this.
If the first row has the right most bit set then it is transfered as row 9.The first row is empty.
If the Second row has the right most bit set then it is transfered as row 10.The second row is empty.
Led Screen
----------
The led screen shows the 15 characters in the vf display of the newbrain AD model.
It is not a 100% emulation of the display so it shows characters that the vf display could not.
Changing Speed
--------------
By Using the tools menu Set MHz you can change the speed of the emulator.
Do not use values greater than 100.
You can put real numbers as well i.e. 4.3
Keyboard
--------
Left Shift Shifts keys as in Newbrain i.e. shft-2 gives " not @
Right Shift Shifts keys as in PC i.e. Shft-2 gives @
Left Ctrl is Newbrain Control key
Right Ctrl is Newbrain Graph key
Break is Newbrain Stop key
BackSpace is Newbrain Shift <-
Del is Newbrain Shift ->
Insert is Newbrain Insert key
Home is Newbrain Home key
Esc is Newbrain Escape key
CapsLock does the same as in PC
You can save the Keyboard mapping from the tools menu. This will
create two files Charmap0.cmp and Charmap1.cmp.
The first one is used for normal operation of the keyboard and when using the left shift.
The second one is used when the right shift is pressed so all keys in there should be
ored with 40h (which denotes that the key is shifted).
You can change these files to suit your needs. If you mess things up just delete them.
Newbrain interprets keys by position not by ASCII char number so the mapping does this:
When a user presses a key it takes the Ascii number of the key pressed finds the Newbrain
equivelant and gives it to the Newbrain.
** The Keyboard emulation is not 100% but close enough.**
Following is the file KTable.S21 which is relevant to the keyboard in Newbrain:
TITLE (C) 1982 GRUNDY BUSINESS SYSTEMS
NAME KTABLE
* This module contains the tables needed by NKBIO, set
* out for a standard (QWERTY) keyboard. The tables are
* KTABLE - principal lookup
* KTAB1 - indexed by result of KTABLE for SHIFT with
* non-group A characters.
* KTAB2 - as KTAB1, for CONTROL.
* KTAB3 - indexed by result of KTABLE for GRAPHICS
* with non-numeric non-group A characters.
* KTAB4 - indexed by result of KTABLE when GRAPHICS
* pressed with numeric character or *
* (* comes out to KTAB4 due to need to give $
* on SH/* for English keyboard).
* KTAB5 - used by KTTCAPS if numbers normally obtained
* with the SHIFT pressed - locates number when
* a shift-lock is in force.
* First byte gives number of entries plus 1. If
* first byte is 1, keyboard has numerics on
* unshifted keys; otherwise, first byte is 11
* and entries are characters corresponding to
* unshifted 9,8,...,2,1,0.
* KTAB6 - defines which key-depressions are 'pre-fixing
* accents'. Table has two parts, each with the
* same number of entries. First byte is number
* of entries in each part plus 1. First part
* consists of one-byte entries, each the matrix
* code of an accent. Second part is in THE
* REVERSE ORDER and consists of the two-byte
* addresses of corresponding 'KACCn' tables.
*
* KACCn - Fix-up table for accent n. First byte is
* number of two-byte entries plus 1. Each
* entry consists of a matrix code followed
* by the accented character required from
* the keystroke when preceded by accent 'n'.
GLOBAL KTABLE
GLOBAL KTAB1
GLOBAL KTAB2
GLOBAL KTAB3
GLOBAL KTAB4
GLOBAL KTAB4#
GLOBAL KTAB5
GLOBAL KTAB6
;Character codes
FF EQU 0CH
BS EQU 08H
HT EQU 1AH
LF EQU 0AH
VT EQU 0BH
CR EQU 0DH
SCR EQU 10H
BLANK EQU 20H
INS EQU 11H
RUBOUT EQU 018H
RUBRT EQU 19H
CLEAR EQU 1FH
ESC EQU 1BH
IL EQU 1
DL EQU 2
SI EQU 0FH
SO EQU 0EH
VD EQU 0 ;viewdata
TAB EQU 09H
MP EQU 12H
MS EQU 13H
CCR EQU 14H
XYR EQU 15H
XY EQU 16H
TV EQU 17H
CHL EQU 1CH
CHR EQU 1DH
CLL EQU 1EH
PR EQU 03H
EJECT
KTABLE EQU $
KT00H DEFB 0,0,BS,'7','6','5','4','3'
KT08H DEFM '21trewq '
KT10H DEFB 0,0,HT,'8','9','0','(',')'
KT18H DEFB '*',VD,'p','=','-','+',CR,ESC
KT20H DEFB 0,0,LF,'u','i','y','o','l'
KT28H DEFM ';hgfdsa/'
KT30H DEFB 0,0,VT,'j','n','m',',','.'
KT38H DEFB 'b','v','c','x','z',INS,'k',FF
KT40H DEFB 0,0,0,97H,96H,95H,94H,93H
KT48H DEFB 92H,91H,'T','R','E','W','Q',0AH
KT50H DEFB 0,0,1,8EH,8FH,90H,'[',']'
KT58H DEFB 098H,07H,'P','@','\','^',09H,0BH
KT60H DEFB 0,0,2,'U','I','Y','O','L'
KT68H DEFB 06H,'H','G','F','D','S','A',0CH
KT70H DEFB 0,0,3,'J','N','M',04H,05H
KT78H DEFB 'B','V','C','X','Z',08H,'K',0DH
KTAB1 EQU $
DEFB RUBOUT,RUBRT,DL,SO,'<','>',':','_'
DEFB IL,CR,' ',SI,'?',CLEAR,'(',')'
DEFB 0C0H,'!','"','#','$','%','&',''''
DEFB 0E4H
DEFB 0,0,0,0,0,0,0 ;available
KTAB2 EQU $
DEFB CHL,CHR,0,0,7FH,'|',0C1H,0
DEFB XY,PR,' ',TAB,0C2H,CLL
DEFB 0,0,0,0,0,0,0,0,0,0,0 ;unreferenced
DEFB 0,0,0,0 ;available
DEFB 0,0,0 ;available
KTAB3 EQU $
DEFB 0,0,MS,MP,'{','}',60H,0
DEFB XYR,SCR,' ',10H,'~',CCR
*
* The values in KTAB4, which is part of KTAB3, give the results
* of GRAPHICS/0 to GRAPHICS/9, and GRAPHICS/*.
*
KTAB4 EQU $
KTAB4# EQU KTAB4-8EH
DEFB 0 ; GR/8
DEFB 0 ; GR/9
DEFB 0 ; GR/0
DEFB 0 ; GR/1
DEFB 0 ; GR/2
DEFB 0 ; GR/3
DEFB 0 ; GR/4
DEFB 0 ; GR/5
DEFB 0 ; GR/6
DEFB 0 ; GR/7
DEFB 0,0,0,0,0 ;available
DEFB 0,0,0 ;available
KTAB5 EQU $ ;TTY caps for numbers
DEFB 1 ;11 followed by translate table
;for keyboards with numerics
;on shifted keycaps.
;1 alone for standard keyboards.
DEFB '9'
DEFB '8'
DEFB '7'
DEFB '6'
DEFB '5'
DEFB '4'
DEFB '3'
DEFB '2'
DEFB '1'
DEFB '0'
KTAB6 EQU $
DEFB 1 ;no accent tables
END
Main Menu
Home NB Hardware Catalog News Information Specifications FAQs NB Emulator HELP Advanced searchUser Login
Statistics
Languages: 2Members: 616
News: 93
WebLinks: 16








![]() | Today | 60 |
![]() | Yesterday | 314 |
![]() | This Week | 1611 |
![]() | This Month | 3618 |
Please use the NB CATALOG page here to insert your hardware and help us catalog everything that survived all these years.
Most programs on this website are in WinRar format. The WinRar compression program is available for free on the Internet.
Shouter
NB Forum Latest Posts

by cdesp

by proton

by proton

by plore90

by admin
Popular Files

(Emulation)

(Emulation)

(BOOKS)

(Emulation)

(BOOKS)

(Technical Notes)