Home » Archimedes archive » Zipped Apps » 6502em » !6502Em/Docs/Technical

!6502Em/Docs/Technical

This website contains an archive of files for the Acorn Electron, BBC Micro, Acorn Archimedes, Commodore 16 and Commodore 64 computers, which Dominic Ford has rescued from his private collection of floppy disks and cassettes.

Some of these files were originally commercial releases in the 1980s and 1990s, but they are now widely available online. I assume that copyright over them is no longer being asserted. If you own the copyright and would like files to be removed, please contact me.

Tape/disk: Home » Archimedes archive » Zipped Apps » 6502em
Filename: !6502Em/Docs/Technical
Read OK:
File size: 0754 bytes
Load address: 0000
Exec address: 0000
File contents
6502Em: The Emulation
=====================

The processor emulated is the 65C12 as in the
Master 128, with the following exceptions:

o Opcodes &07, &0B, &4B, &87, &DC emulate the
  respective 6502 undocumented opcodes
o Opcode &07 when in Sideways ROM issues a SWI
  under RISC OS (see 'Opcode07')
o The timing of opcodes when in BCD mode is
  as for the original 6502, not the 65C12
o The flags are not fully emulated in BCD mode
o A few of the opcode timings are not quite
  correct for 1MHz memory accesses
o Opcodes &03 and &23 are used for internal
  purposes by the emulator
o The JMP (&xxFF) bug is emulated for the 
  BBC and Electron modes

NB "Unused" Opcodes are defined to be NOPs
   The extra Rockwell opcodes are not supported

The 6845 CRTC
-------------

Registers 1,6,10,11,12,13,14,15 are fully emulated
Register 9 is partially emulated

The Video ULA
-------------

Fully emulated, except for "mode 8"
Gap modes are displayed without gaps

The 6850 ACIA & Serial ULA
--------------------------

Not Emulated

The Paged ROM Select Register (ROMSEL)
--------------------------------------

Fully Emulated
Supports ROM or RAM in any of the 16 banks

The 6522 VIAs
-------------

The VIAs are fully emulated except for the shift register

The System VIA
--------------

Interrupts supported from 6845, keyboard and the two timers
Interrupts from 7002 ADC and light pen not supported
Keyboard, sound and the screen wrap address supported
Caps Lock LED emulated
Shift Lock LED not supported

The User Via
------------

Interrupts supported from the 2 timers and printer.
User port not supported

The 7002 ADC
------------

Returns the mouse's position on both channels unless a
joystick module is loaded that conforms to Acorn's
Joystick SWI specifications.

Econet & Disc Hardware
----------------------

Not Emulated

Tube Hardware
-------------

Not Emulated
00000000  36 35 30 32 45 6d 3a 20  54 68 65 20 45 6d 75 6c  |6502Em: The Emul|
00000010  61 74 69 6f 6e 0a 3d 3d  3d 3d 3d 3d 3d 3d 3d 3d  |ation.==========|
00000020  3d 3d 3d 3d 3d 3d 3d 3d  3d 3d 3d 0a 0a 54 68 65  |===========..The|
00000030  20 70 72 6f 63 65 73 73  6f 72 20 65 6d 75 6c 61  | processor emula|
00000040  74 65 64 20 69 73 20 74  68 65 20 36 35 43 31 32  |ted is the 65C12|
00000050  20 61 73 20 69 6e 20 74  68 65 0a 4d 61 73 74 65  | as in the.Maste|
00000060  72 20 31 32 38 2c 20 77  69 74 68 20 74 68 65 20  |r 128, with the |
00000070  66 6f 6c 6c 6f 77 69 6e  67 20 65 78 63 65 70 74  |following except|
00000080  69 6f 6e 73 3a 0a 0a 6f  20 4f 70 63 6f 64 65 73  |ions:..o Opcodes|
00000090  20 26 30 37 2c 20 26 30  42 2c 20 26 34 42 2c 20  | &07, &0B, &4B, |
000000a0  26 38 37 2c 20 26 44 43  20 65 6d 75 6c 61 74 65  |&87, &DC emulate|
000000b0  20 74 68 65 0a 20 20 72  65 73 70 65 63 74 69 76  | the.  respectiv|
000000c0  65 20 36 35 30 32 20 75  6e 64 6f 63 75 6d 65 6e  |e 6502 undocumen|
000000d0  74 65 64 20 6f 70 63 6f  64 65 73 0a 6f 20 4f 70  |ted opcodes.o Op|
000000e0  63 6f 64 65 20 26 30 37  20 77 68 65 6e 20 69 6e  |code &07 when in|
000000f0  20 53 69 64 65 77 61 79  73 20 52 4f 4d 20 69 73  | Sideways ROM is|
00000100  73 75 65 73 20 61 20 53  57 49 0a 20 20 75 6e 64  |sues a SWI.  und|
00000110  65 72 20 52 49 53 43 20  4f 53 20 28 73 65 65 20  |er RISC OS (see |
00000120  27 4f 70 63 6f 64 65 30  37 27 29 0a 6f 20 54 68  |'Opcode07').o Th|
00000130  65 20 74 69 6d 69 6e 67  20 6f 66 20 6f 70 63 6f  |e timing of opco|
00000140  64 65 73 20 77 68 65 6e  20 69 6e 20 42 43 44 20  |des when in BCD |
00000150  6d 6f 64 65 20 69 73 0a  20 20 61 73 20 66 6f 72  |mode is.  as for|
00000160  20 74 68 65 20 6f 72 69  67 69 6e 61 6c 20 36 35  | the original 65|
00000170  30 32 2c 20 6e 6f 74 20  74 68 65 20 36 35 43 31  |02, not the 65C1|
00000180  32 0a 6f 20 54 68 65 20  66 6c 61 67 73 20 61 72  |2.o The flags ar|
00000190  65 20 6e 6f 74 20 66 75  6c 6c 79 20 65 6d 75 6c  |e not fully emul|
000001a0  61 74 65 64 20 69 6e 20  42 43 44 20 6d 6f 64 65  |ated in BCD mode|
000001b0  0a 6f 20 41 20 66 65 77  20 6f 66 20 74 68 65 20  |.o A few of the |
000001c0  6f 70 63 6f 64 65 20 74  69 6d 69 6e 67 73 20 61  |opcode timings a|
000001d0  72 65 20 6e 6f 74 20 71  75 69 74 65 0a 20 20 63  |re not quite.  c|
000001e0  6f 72 72 65 63 74 20 66  6f 72 20 31 4d 48 7a 20  |orrect for 1MHz |
000001f0  6d 65 6d 6f 72 79 20 61  63 63 65 73 73 65 73 0a  |memory accesses.|
00000200  6f 20 4f 70 63 6f 64 65  73 20 26 30 33 20 61 6e  |o Opcodes &03 an|
00000210  64 20 26 32 33 20 61 72  65 20 75 73 65 64 20 66  |d &23 are used f|
00000220  6f 72 20 69 6e 74 65 72  6e 61 6c 0a 20 20 70 75  |or internal.  pu|
00000230  72 70 6f 73 65 73 20 62  79 20 74 68 65 20 65 6d  |rposes by the em|
00000240  75 6c 61 74 6f 72 0a 6f  20 54 68 65 20 4a 4d 50  |ulator.o The JMP|
00000250  20 28 26 78 78 46 46 29  20 62 75 67 20 69 73 20  | (&xxFF) bug is |
00000260  65 6d 75 6c 61 74 65 64  20 66 6f 72 20 74 68 65  |emulated for the|
00000270  20 0a 20 20 42 42 43 20  61 6e 64 20 45 6c 65 63  | .  BBC and Elec|
00000280  74 72 6f 6e 20 6d 6f 64  65 73 0a 0a 4e 42 20 22  |tron modes..NB "|
00000290  55 6e 75 73 65 64 22 20  4f 70 63 6f 64 65 73 20  |Unused" Opcodes |
000002a0  61 72 65 20 64 65 66 69  6e 65 64 20 74 6f 20 62  |are defined to b|
000002b0  65 20 4e 4f 50 73 0a 20  20 20 54 68 65 20 65 78  |e NOPs.   The ex|
000002c0  74 72 61 20 52 6f 63 6b  77 65 6c 6c 20 6f 70 63  |tra Rockwell opc|
000002d0  6f 64 65 73 20 61 72 65  20 6e 6f 74 20 73 75 70  |odes are not sup|
000002e0  70 6f 72 74 65 64 0a 0a  54 68 65 20 36 38 34 35  |ported..The 6845|
000002f0  20 43 52 54 43 0a 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  | CRTC.----------|
00000300  2d 2d 2d 0a 0a 52 65 67  69 73 74 65 72 73 20 31  |---..Registers 1|
00000310  2c 36 2c 31 30 2c 31 31  2c 31 32 2c 31 33 2c 31  |,6,10,11,12,13,1|
00000320  34 2c 31 35 20 61 72 65  20 66 75 6c 6c 79 20 65  |4,15 are fully e|
00000330  6d 75 6c 61 74 65 64 0a  52 65 67 69 73 74 65 72  |mulated.Register|
00000340  20 39 20 69 73 20 70 61  72 74 69 61 6c 6c 79 20  | 9 is partially |
00000350  65 6d 75 6c 61 74 65 64  0a 0a 54 68 65 20 56 69  |emulated..The Vi|
00000360  64 65 6f 20 55 4c 41 0a  2d 2d 2d 2d 2d 2d 2d 2d  |deo ULA.--------|
00000370  2d 2d 2d 2d 2d 0a 0a 46  75 6c 6c 79 20 65 6d 75  |-----..Fully emu|
00000380  6c 61 74 65 64 2c 20 65  78 63 65 70 74 20 66 6f  |lated, except fo|
00000390  72 20 22 6d 6f 64 65 20  38 22 0a 47 61 70 20 6d  |r "mode 8".Gap m|
000003a0  6f 64 65 73 20 61 72 65  20 64 69 73 70 6c 61 79  |odes are display|
000003b0  65 64 20 77 69 74 68 6f  75 74 20 67 61 70 73 0a  |ed without gaps.|
000003c0  0a 54 68 65 20 36 38 35  30 20 41 43 49 41 20 26  |.The 6850 ACIA &|
000003d0  20 53 65 72 69 61 6c 20  55 4c 41 0a 2d 2d 2d 2d  | Serial ULA.----|
000003e0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000003f0  2d 2d 2d 2d 2d 2d 0a 0a  4e 6f 74 20 45 6d 75 6c  |------..Not Emul|
00000400  61 74 65 64 0a 0a 54 68  65 20 50 61 67 65 64 20  |ated..The Paged |
00000410  52 4f 4d 20 53 65 6c 65  63 74 20 52 65 67 69 73  |ROM Select Regis|
00000420  74 65 72 20 28 52 4f 4d  53 45 4c 29 0a 2d 2d 2d  |ter (ROMSEL).---|
00000430  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
*
00000450  2d 2d 2d 0a 0a 46 75 6c  6c 79 20 45 6d 75 6c 61  |---..Fully Emula|
00000460  74 65 64 0a 53 75 70 70  6f 72 74 73 20 52 4f 4d  |ted.Supports ROM|
00000470  20 6f 72 20 52 41 4d 20  69 6e 20 61 6e 79 20 6f  | or RAM in any o|
00000480  66 20 74 68 65 20 31 36  20 62 61 6e 6b 73 0a 0a  |f the 16 banks..|
00000490  54 68 65 20 36 35 32 32  20 56 49 41 73 0a 2d 2d  |The 6522 VIAs.--|
000004a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 0a 54 68 65  |-----------..The|
000004b0  20 56 49 41 73 20 61 72  65 20 66 75 6c 6c 79 20  | VIAs are fully |
000004c0  65 6d 75 6c 61 74 65 64  20 65 78 63 65 70 74 20  |emulated except |
000004d0  66 6f 72 20 74 68 65 20  73 68 69 66 74 20 72 65  |for the shift re|
000004e0  67 69 73 74 65 72 0a 0a  54 68 65 20 53 79 73 74  |gister..The Syst|
000004f0  65 6d 20 56 49 41 0a 2d  2d 2d 2d 2d 2d 2d 2d 2d  |em VIA.---------|
00000500  2d 2d 2d 2d 2d 0a 0a 49  6e 74 65 72 72 75 70 74  |-----..Interrupt|
00000510  73 20 73 75 70 70 6f 72  74 65 64 20 66 72 6f 6d  |s supported from|
00000520  20 36 38 34 35 2c 20 6b  65 79 62 6f 61 72 64 20  | 6845, keyboard |
00000530  61 6e 64 20 74 68 65 20  74 77 6f 20 74 69 6d 65  |and the two time|
00000540  72 73 0a 49 6e 74 65 72  72 75 70 74 73 20 66 72  |rs.Interrupts fr|
00000550  6f 6d 20 37 30 30 32 20  41 44 43 20 61 6e 64 20  |om 7002 ADC and |
00000560  6c 69 67 68 74 20 70 65  6e 20 6e 6f 74 20 73 75  |light pen not su|
00000570  70 70 6f 72 74 65 64 0a  4b 65 79 62 6f 61 72 64  |pported.Keyboard|
00000580  2c 20 73 6f 75 6e 64 20  61 6e 64 20 74 68 65 20  |, sound and the |
00000590  73 63 72 65 65 6e 20 77  72 61 70 20 61 64 64 72  |screen wrap addr|
000005a0  65 73 73 20 73 75 70 70  6f 72 74 65 64 0a 43 61  |ess supported.Ca|
000005b0  70 73 20 4c 6f 63 6b 20  4c 45 44 20 65 6d 75 6c  |ps Lock LED emul|
000005c0  61 74 65 64 0a 53 68 69  66 74 20 4c 6f 63 6b 20  |ated.Shift Lock |
000005d0  4c 45 44 20 6e 6f 74 20  73 75 70 70 6f 72 74 65  |LED not supporte|
000005e0  64 0a 0a 54 68 65 20 55  73 65 72 20 56 69 61 0a  |d..The User Via.|
000005f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 0a 0a 49 6e  |------------..In|
00000600  74 65 72 72 75 70 74 73  20 73 75 70 70 6f 72 74  |terrupts support|
00000610  65 64 20 66 72 6f 6d 20  74 68 65 20 32 20 74 69  |ed from the 2 ti|
00000620  6d 65 72 73 20 61 6e 64  20 70 72 69 6e 74 65 72  |mers and printer|
00000630  2e 0a 55 73 65 72 20 70  6f 72 74 20 6e 6f 74 20  |..User port not |
00000640  73 75 70 70 6f 72 74 65  64 0a 0a 54 68 65 20 37  |supported..The 7|
00000650  30 30 32 20 41 44 43 0a  2d 2d 2d 2d 2d 2d 2d 2d  |002 ADC.--------|
00000660  2d 2d 2d 2d 0a 0a 52 65  74 75 72 6e 73 20 74 68  |----..Returns th|
00000670  65 20 6d 6f 75 73 65 27  73 20 70 6f 73 69 74 69  |e mouse's positi|
00000680  6f 6e 20 6f 6e 20 62 6f  74 68 20 63 68 61 6e 6e  |on on both chann|
00000690  65 6c 73 20 75 6e 6c 65  73 73 20 61 0a 6a 6f 79  |els unless a.joy|
000006a0  73 74 69 63 6b 20 6d 6f  64 75 6c 65 20 69 73 20  |stick module is |
000006b0  6c 6f 61 64 65 64 20 74  68 61 74 20 63 6f 6e 66  |loaded that conf|
000006c0  6f 72 6d 73 20 74 6f 20  41 63 6f 72 6e 27 73 0a  |orms to Acorn's.|
000006d0  4a 6f 79 73 74 69 63 6b  20 53 57 49 20 73 70 65  |Joystick SWI spe|
000006e0  63 69 66 69 63 61 74 69  6f 6e 73 2e 0a 0a 45 63  |cifications...Ec|
000006f0  6f 6e 65 74 20 26 20 44  69 73 63 20 48 61 72 64  |onet & Disc Hard|
00000700  77 61 72 65 0a 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ware.-----------|
00000710  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 0a 0a 4e 6f 74  |-----------..Not|
00000720  20 45 6d 75 6c 61 74 65  64 0a 0a 54 75 62 65 20  | Emulated..Tube |
00000730  48 61 72 64 77 61 72 65  0a 2d 2d 2d 2d 2d 2d 2d  |Hardware.-------|
00000740  2d 2d 2d 2d 2d 2d 0a 0a  4e 6f 74 20 45 6d 75 6c  |------..Not Emul|
00000750  61 74 65 64                                       |ated|
00000754