To Run the Emulator

Best to use TENBUG not BSOD. BSOD was written to replace tenbug, back when tenbug would not run on the emulator.

When the emulator starts, it initializes the Opcode Map, but does not initialize all hardware. This means that before you can run any instructions, you must do a POWER ON RESET. Normally the real VME10 would have done a POR when powered up. The POR will reset the hardware, and cause the Internal ROM (either TENBUG or BSOD) to run and initilize the SCM.

The Emulator does not do an Automatic POR. This gives the user a chance to do things, like plug or unplug cards. Add memory. Load a different ROM than the default. Load a code file. 

NOTE - It is best to always STOP the emulator before doing a POR or a RESET.

NOTE - TENbug and the BSOD rom does many things that are neccessary, like initialize the SCM, Unswap the ROM, configure IO devices.  It is best to run the Tenbug or the BSOD rom before loading other code (unless you are capable of writting your own initialization code). The BSOD rom when done, simply does a BRA *. When Tenbug is done initializing, issues a prompt, and allow you to select which IO device is the console. Tenbug 2.1 waits for any character typed on an IO device and chooses the first that a  character is input. Tenbug 2.2 requires a cntrl-C as the first character to see the MVME400 cards.

Failing to do a POR and correctly initialize the SCM, prior to running code, will most likely cause the emulator to either encounter an internal error and/or the CPU may Double bus fault (HALT). 

The TENBUG and BSOD ROM, also has support routines that allow the CPMLDR, the Motorola IPL.SY boot loader and the unix loader to do its thing. (UNIX requires TENBUG 2.0 or greater)

If you want to do a POR without transfering control to the reset routine, pointed to by the reset vector, use the debugger's POR command. The debugger's POR command does a POR and then STOPs at the PC pointed to be the reset vector. NO program is executed until you use another command to do so.

NOTE - it is best to STOP the emulator before using either RESET or Power On Reset. Sometimes the emulator double buss faults if you dont stop it first. Don't know why..


HOWTO add qualifier to the VME10 emuator.

The Vme10 emulator saves its settings in the windows registry, in a key called VMES10 in the key Sofware/VB and VBA Program Settings/.  (windows 98)

If you want, you can add a qualifier to the KEY. The value on the Command line is processed to remove everything that might look like a drag-n-drop subject (automation VERB - SUBJECT). This command line value is concatenated with the key VMES10 to make VMES10XXXXXXXX, where XXXXXXXX is up to 8 ALPHA characters. This makes the VME10 store different registry enties for different configurations.

Edit the PIF or LNK file to add a qualifier to the Command line. 

/applicationPath/VMES10.exe XXXXXXXX

if XXXXXXXX is VDOS44 then the key is VMES10VDOS44


UNIX vs VERSADOS vs CPM

each OS sets different values for things like the RTC. It is best to set a qualifier for the emulator so it can keep registry entries separate. Add an 8 character ALPHAnumeric string to the command line in the LNK or PIF file used to invoke the emulator.

example..

C:\ApplicationPath\VMES10.EXE UNIX
C:\ApplicationPath\VMES10.EXE CPM
C:\ApplicationPath\VMES10.EXE VERSADOS

Since each qualifier uses separate registry entries, you MUST set defaults for each .LNK (.pif) with a unique Qualifier. 


To Set Defaults

You MUST specify the location of the Internal ROM and the Initial Font. 

Use menu->Boot->defaults->ROM to set default ROM location. Use TENBUG22.mx
Use menu->Boot->defaults->FONT to set default Font location. Use CharRam.S19 or Font.S19

(note - CharRam.S19 is from an application note - Font.S19 is extracted from the TENBUG rom)

( there is also, a font extracted from the graphics server)(more fonts on the VDOS 4.6 HD image)

After setting the defaults, you should restart the emulator. The Emulator automagically loads the defaults at start up. Beginning with v1.0.6, the emulator now correctly saves the defaults.

You can load the ROM at anytime by using File->Load Rom

You can load the Font at anytime by using File->Load Memory
  (WARNING - Font MUST be org'ed at the address of the Character Generator RAM)



Which Bug to use

You should use the TENBUG 2.2 rom image. The BSOD ROM is obsolete, but still can be used.

Even if you use the BSOD rom, you should, via a menu item, select "Use TENBUG". This causes the emulator to set up the registers during a simulated Boot to be what TENBUG would have set. The simulted BOOT is only for the BSOD rom. DO NOT use the simulated BOOT with TENBUG. Use TENBUG's BO and/or BH command instead. The simulated BOOT will overwrite and corrupt the scratch pad area used by TENBUG, crashing TENBUG.

The BSOD rom supports the routines to allow either a TENBUG or a VMEBUG style boot. The VME10's TENBUG uses ME4U/T15IO. The disk IO is done via a jump table, while the console IO is done via Phoenix Trap 15. The VMEBug option, uses Trap 15 disk IO and Austin Alt Trap 15 console IO. I may remove the VMEbug option. It was there to aid in debug, so i could boot other stuff.

Selecting the menu option USE TENBUG simply causes the emulator to passes values to the IPL.SY program to tell it how to interface with the ROM as though it was the real TENBUG ROM. The BSOD ROM tries to implement the TENBUG stuff needed for the IPL.SY program to work. 



To BOOT distribution CPM floppy disk (CPM68KD1.IMD) 

 Start Emulator. This loads the Default ROM which should be TENBUG 2.2 
  The Character Font was also loaded but is not used with TENBUG, Tenbug has an internal FONT.
  (However, since the emulator can display characters before the firmware initializes the 6845, you will see garbage during initialization. This is TENBUG testing the Display.)

 Open VME10 Screen/Keyboard.

 Open FD02. (use CPM68KD1.IMD - this will open R/O, because it contains compressed sectors)

 Push Power On Reset Button. Wait. 

 After you see the TENBUG> prompt, select which IO device for Tenbug to use as its console
  (type Any Character on a device..or for TENBUG 2.2 a cntrl-C is required for the 400 cards)
 At TENBUG 2.2> prompt, type BO 2

You should see the CPMLDR message appear on the VME10 Screen (tenbug). This is due to the fact, that CPMLDR uses TRAP 15 IO to display messages, and TENBUG uses the SCREEN. Then the CPM prompt should appear on the Screen/Keyboard. CPM.SYS uses its own driver to display message on the Screen/keyboard.

The VME10's CPM BIOS only supports VME10 Floppies and VME10 HDs. The Floppies MUST be inserted (opened) in the FD0x drives, and the HDs MUST be inserted (opened) in the HD0x drives. The RWIN disk controller can only access IMD Floppies, and RAW HDs.


To BOOT CPM hard disk (VME105MB.DSK) (contains distribution CPM for VME10, but with IOBYTE implemented)

 Start Emulator. This loads the Default ROM and the Character Font.

 Open TTY (First MVME400 port, Device 0) by selecting under Menu Devices.

 Open VME10 Screen/Keyboard.

 Open HD00. (use VME105MB.DSK - this will open R/W)

 Push Power On Reset Button. Wait. 

 After you see the TENBUG> prompt, select which IO device for Tenbug to use as its console
  (type Any Character on a device..or for TENBUG 2.2 a cntrl-C is required for the 400 cards)
 At TENBUG 2.2> prompt, type BO

You should see the CPMLDR message appear on the VME10 Screen. This is due to the fact, that CPMLDR uses TRAP 15 IO to display messages and TENBUG uses the SCREEN.

Next, you should see the CPM prompt (on the TTY). 

(This is because the IOBYTE is implemented in the VME10's BIOS located on the HD. Initially,  IOBYTE is set to a 400 card, CON:=TTY:. The Screen keyboard is CON:=UC1:)

The VME10's BIOS only supports VME10 Floppies and VME10 HDs. The Floppies MUST be inserted (opened) in the FD0x drives, and the HDs MUST be inserted (opened) in the HD0x drives. The RWIN disk controller can only access IMD Floppies, and RAW HDs.

To use Screen/Keyboard - STAT CON:=UC1:

To switch back to TTY - STAT CON:=TTY:

To use LPT: - STAT LST:=LPT: (must also open LPT via Devices Menu, and set ONLINE)
To use UL1: - STAT LST:=UL1: (must also open UL1 via Devices Menu, and set ONLINE)


To BOOT CPM hard disk with FAKE bios (CPM5mbHiTPA.DSK) 

The Fake BIOS uses a special emulator only, disk controller that can access many types of disks. This disk controller can access any (emulator) supported type of disk in any drive. It auto blocks and deblocks. 

 The CPM BIOS auto detects the disk types and sets the DPBs appropriately. 

Start Emulator. This loads the Default ROM and the Character Font.

Open HD00. (use CPM5mbHiTPA.DSK - this will open R/W)

Open TTY (First MVME400 port, Device 0) by selecting under Menu Devices.

Push Power On Reset Button. Wait. 

 After you see the TENBUG> prompt, select which IO device for Tenbug to use as its console
  (type Any Character on a device..or for TENBUG 2.2 a cntrl-C is required for the 400 cards)
 At TENBUG 2.2> prompt, type BO

You should see the CPMLDR message appear on the VME10 Screen (tenbug). This is due to the fact, that CPMLDR uses TRAP 15 IO to display messages and TENBUG uses the SCREEN.

Next, you should see CPM prompt (on the TTY). Fake BIOS does not use the vme10's screen. There's no driver.

The fake hardware bios uses A: as the HD 

The Fake BIOS prompts for the TPA size. This is for when i was debugging, and running stuff from many sources.

H= $180000 - $E00000 (the VMEbus) (this is what you want) 
L=    $B00 - $E00000 (B00 is after the TenBug (BSOD) scratch. You MUST populate the Reserved SCM memory)
V=    $400 -  $60000 (VME10 - overlays Tenbug (BSOD) scratch)
2=    $B00 -  $60000 (standard VME10)
C=    $400 - $E00000 (allows CPMSIM stuff to run. You MUST also populate the Reserved SCM memory)
S=    $B00 -  $15000 (for the CPM15000 S-Rec files)


This CPM's BIOS, for fake hardware, supports many disk types. You may insert (open) a disk image in any drive. The CPM fake Disk Controller can use any type of disk in any of the drives. 

IOBYTE is supported, but there's NO UC1: (the VME10 Screen/Keyboard driver is not included)

To use LPT: - STAT LST:=LPT: (must also open LPT, Device 8 via Devices Menu)
To use UL1: - STAT LST:=UL1: (must also open UL1, Device 9 via Devices Menu)


To Create a Disk Image.

Menu -> Disks -> Create IMD/RAW IMage
Select disk image type
  CPM uses floppies with 16 128 byte sectors on track 0 and  8 512 byte sectors on other tracks
Click Create button.

This Creates an empty disk image, initialized with the appropriate sector data as defined by Motorola ($4E for HD, and $E9 for FD) You MUST use CPM program INIT to place $E5's in the directory, else the disk wont work with CPM.

  (NOTE - VersaDOS and unix uses floppies with 16 128 byte sectors on track 0 and 16 256 byte sectors on the other tracks.)

To Use a Disk Image

HD00 as example...
Select Menu -> Disks -> HD00 (if no disk already open for HD00)
Select disk in dialog box.


TO Stop Using a Disk Image.

HD00 as example...
Select Menu -> Disks -> HD00 (if disk already open for HD00, it will be closed)

WARNING - before closing (removing) a disk image, you must do whatever the OS requires for removing disk Media. For CPM, before removing a disk, you MUST do a Cntrl-C to flush the buffers. You should, also, do a Cntrl-C after inserting a new disk (if you did not do, before removing).

It appears that the VME10 CPM bios treats the HD as a removable disk. The Fake bios also treats the HD as a removable disk. 


To Transfer files between different formats of disks (CPM).

Best to use FAKE bios.

NOTE - Several types of Disks are predefined and the FAKE bios auto detects the supported types. Only predefined types may be opened. Also, not all predefined types are supported by every OS. CPM's Standard BIOS for the VME10, only supports 5mb, and 96TPI 5.25 floppies. The Fake BIOS supports many formats and the driver auto-Logs the appropriate type. 

SpecTbl:
	dc.l	$00020020,$01000132,dpb5mb,0		* 5mb
	dc.l	$00040020,$01000132,dpb10mb,0		*10mb
	dc.l	$00060020,$01000132,dpb15mb,0		*15mb
*	dc.l	$00060020,$0100033e,dpb40mb,0		*40mb
*	dc.l	$00080020,$01000400,dpb70mb,0		*70mb
	dc.l	$00020008,$02000028,dpb48TPI,1		*48tpi
*	dc.l	$00020008,$02000028,dpbCPM86,1		*48tpi
	dc.l	$00020008,$02000050,dpb96TPI,1		*96tpi
	dc.l	$0001001a,$0080004d,dpb3470,xlt3470	*.25
	dc.l	$00020012,$02000050,dpbPC1440,1		*PC1440
	dc.l	$00010100,$00800200,dpbCS16,0		*CPMSIM16MB

CPM86, 40mb and 70mb disks are commented out in the BIOS, because i dont know the CPM standard to use. 
CPM86 disk conflicts with the 48TPI disk. There's a program to allow transfers from a CPM disk that reprograms the DPB (it might work, have not tried it)


How to reconfigure CPM with FAKE BIOS

Files to rebuild CPM and the CPMLDR are found in USER 5 on the CPM5mbHiTPA.dsk image. 
Use the PUTBOOT found there, not the default one in USER 0. (the default putboot expects an RWIN DC)
Follow standard directions to rebuild. 


How to reconfigure CPM with VME10 BIOS

Follow standard directions. 

However, on disk image, VME105MB.DSK you will find new files for the modified System, in USER 5. Use the original PUTBOOT. The standard Putboot skipps the missing sectors on track 0 for floppies. 

The Modified BIOS uses standard files, except for BIOSA.S, which is modified to support IOBYTE and to login drive C instead of drive A:

You will note that it is a kludge. The Fake bios IOBYTE stuff was simply added to the BIOSA.S file, with existing Bios functions called for everything else, except the MVME400 and MVME410. The 400 and the 410's drivers were left in the BIOS.C source, and are also in the resulting CPM.SYS, but only their initialize code is used. A UC1 output status was added, so that BAT: will work. 


How to Change CPU type

The defalt is MC68010. This is what you want. 

Stop the emulator before changing CPU type. Do NOT change while software is running. This is due to the fact that the CPU type can be changed in the middle of executing microcode. This will ruin the instruction currently executing. Attempts were made to make the change occur between instructions, but is not thoroughly tested.

Changing the CPU type also changes how the instructions are dissassembled; and the format of CPU addressing modes. 

The Table Lookup instructions are NOT implemented. The TBL cause an F-line exception. This allows you to add simulation software.