Home » Archimedes archive » Archimedes World » AW-1996-08.adf » !6502DEm_6502Dem » Docs/Technical

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 » Archimedes World » AW-1996-08.adf » !6502DEm_6502Dem
Filename: Docs/Technical
Read OK:
File size: 070E 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

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
User & Printer ports 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 0a  4e 42 20 22 55 6e 75 73  |ulator..NB "Unus|
00000250  65 64 22 20 4f 70 63 6f  64 65 73 20 61 72 65 20  |ed" Opcodes are |
00000260  64 65 66 69 6e 65 64 20  74 6f 20 62 65 20 4e 4f  |defined to be NO|
00000270  50 73 0a 20 20 20 54 68  65 20 65 78 74 72 61 20  |Ps.   The extra |
00000280  52 6f 63 6b 77 65 6c 6c  20 6f 70 63 6f 64 65 73  |Rockwell opcodes|
00000290  20 61 72 65 20 6e 6f 74  20 73 75 70 70 6f 72 74  | are not support|
000002a0  65 64 0a 0a 54 68 65 20  36 38 34 35 20 43 52 54  |ed..The 6845 CRT|
000002b0  43 0a 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0a  |C.-------------.|
000002c0  0a 52 65 67 69 73 74 65  72 73 20 31 2c 36 2c 31  |.Registers 1,6,1|
000002d0  30 2c 31 31 2c 31 32 2c  31 33 2c 31 34 2c 31 35  |0,11,12,13,14,15|
000002e0  20 61 72 65 20 66 75 6c  6c 79 20 65 6d 75 6c 61  | are fully emula|
000002f0  74 65 64 0a 52 65 67 69  73 74 65 72 20 39 20 69  |ted.Register 9 i|
00000300  73 20 70 61 72 74 69 61  6c 6c 79 20 65 6d 75 6c  |s partially emul|
00000310  61 74 65 64 0a 0a 54 68  65 20 56 69 64 65 6f 20  |ated..The Video |
00000320  55 4c 41 0a 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |ULA.------------|
00000330  2d 0a 0a 46 75 6c 6c 79  20 65 6d 75 6c 61 74 65  |-..Fully emulate|
00000340  64 2c 20 65 78 63 65 70  74 20 66 6f 72 20 22 6d  |d, except for "m|
00000350  6f 64 65 20 38 22 0a 47  61 70 20 6d 6f 64 65 73  |ode 8".Gap modes|
00000360  20 61 72 65 20 64 69 73  70 6c 61 79 65 64 20 77  | are displayed w|
00000370  69 74 68 6f 75 74 20 67  61 70 73 0a 0a 54 68 65  |ithout gaps..The|
00000380  20 36 38 35 30 20 41 43  49 41 20 26 20 53 65 72  | 6850 ACIA & Ser|
00000390  69 61 6c 20 55 4c 41 0a  2d 2d 2d 2d 2d 2d 2d 2d  |ial ULA.--------|
000003a0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000003b0  2d 2d 0a 0a 4e 6f 74 20  45 6d 75 6c 61 74 65 64  |--..Not Emulated|
000003c0  0a 0a 54 68 65 20 50 61  67 65 64 20 52 4f 4d 20  |..The Paged ROM |
000003d0  53 65 6c 65 63 74 20 52  65 67 69 73 74 65 72 20  |Select Register |
000003e0  28 52 4f 4d 53 45 4c 29  0a 2d 2d 2d 2d 2d 2d 2d  |(ROMSEL).-------|
000003f0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
00000400  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 0a  |---------------.|
00000410  0a 46 75 6c 6c 79 20 45  6d 75 6c 61 74 65 64 0a  |.Fully Emulated.|
00000420  53 75 70 70 6f 72 74 73  20 52 4f 4d 20 6f 72 20  |Supports ROM or |
00000430  52 41 4d 20 69 6e 20 61  6e 79 20 6f 66 20 74 68  |RAM in any of th|
00000440  65 20 31 36 20 62 61 6e  6b 73 0a 0a 54 68 65 20  |e 16 banks..The |
00000450  36 35 32 32 20 56 49 41  73 0a 2d 2d 2d 2d 2d 2d  |6522 VIAs.------|
00000460  2d 2d 2d 2d 2d 2d 2d 0a  0a 54 68 65 20 56 49 41  |-------..The VIA|
00000470  73 20 61 72 65 20 66 75  6c 6c 79 20 65 6d 75 6c  |s are fully emul|
00000480  61 74 65 64 20 65 78 63  65 70 74 20 66 6f 72 20  |ated except for |
00000490  74 68 65 20 73 68 69 66  74 20 72 65 67 69 73 74  |the shift regist|
000004a0  65 72 0a 0a 54 68 65 20  53 79 73 74 65 6d 20 56  |er..The System V|
000004b0  49 41 0a 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |IA.-------------|
000004c0  2d 0a 0a 49 6e 74 65 72  72 75 70 74 73 20 73 75  |-..Interrupts su|
000004d0  70 70 6f 72 74 65 64 20  66 72 6f 6d 20 36 38 34  |pported from 684|
000004e0  35 2c 20 6b 65 79 62 6f  61 72 64 20 61 6e 64 20  |5, keyboard and |
000004f0  74 68 65 20 74 77 6f 20  74 69 6d 65 72 73 0a 49  |the two timers.I|
00000500  6e 74 65 72 72 75 70 74  73 20 66 72 6f 6d 20 37  |nterrupts from 7|
00000510  30 30 32 20 41 44 43 20  61 6e 64 20 6c 69 67 68  |002 ADC and ligh|
00000520  74 20 70 65 6e 20 6e 6f  74 20 73 75 70 70 6f 72  |t pen not suppor|
00000530  74 65 64 0a 4b 65 79 62  6f 61 72 64 2c 20 73 6f  |ted.Keyboard, so|
00000540  75 6e 64 20 61 6e 64 20  74 68 65 20 73 63 72 65  |und and the scre|
00000550  65 6e 20 77 72 61 70 20  61 64 64 72 65 73 73 20  |en wrap address |
00000560  73 75 70 70 6f 72 74 65  64 0a 43 61 70 73 20 4c  |supported.Caps L|
00000570  6f 63 6b 20 4c 45 44 20  65 6d 75 6c 61 74 65 64  |ock LED emulated|
00000580  0a 53 68 69 66 74 20 4c  6f 63 6b 20 4c 45 44 20  |.Shift Lock LED |
00000590  6e 6f 74 20 73 75 70 70  6f 72 74 65 64 0a 0a 54  |not supported..T|
000005a0  68 65 20 55 73 65 72 20  56 69 61 0a 2d 2d 2d 2d  |he User Via.----|
000005b0  2d 2d 2d 2d 2d 2d 2d 2d  0a 0a 49 6e 74 65 72 72  |--------..Interr|
000005c0  75 70 74 73 20 73 75 70  70 6f 72 74 65 64 20 66  |upts supported f|
000005d0  72 6f 6d 20 74 68 65 20  32 20 74 69 6d 65 72 73  |rom the 2 timers|
000005e0  0a 55 73 65 72 20 26 20  50 72 69 6e 74 65 72 20  |.User & Printer |
000005f0  70 6f 72 74 73 20 6e 6f  74 20 73 75 70 70 6f 72  |ports not suppor|
00000600  74 65 64 0a 0a 54 68 65  20 37 30 30 32 20 41 44  |ted..The 7002 AD|
00000610  43 0a 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 0a 0a  |C.------------..|
00000620  52 65 74 75 72 6e 73 20  74 68 65 20 6d 6f 75 73  |Returns the mous|
00000630  65 27 73 20 70 6f 73 69  74 69 6f 6e 20 6f 6e 20  |e's position on |
00000640  62 6f 74 68 20 63 68 61  6e 6e 65 6c 73 20 75 6e  |both channels un|
00000650  6c 65 73 73 20 61 0a 6a  6f 79 73 74 69 63 6b 20  |less a.joystick |
00000660  6d 6f 64 75 6c 65 20 69  73 20 6c 6f 61 64 65 64  |module is loaded|
00000670  20 74 68 61 74 20 63 6f  6e 66 6f 72 6d 73 20 74  | that conforms t|
00000680  6f 20 41 63 6f 72 6e 27  73 0a 4a 6f 79 73 74 69  |o Acorn's.Joysti|
00000690  63 6b 20 53 57 49 20 73  70 65 63 69 66 69 63 61  |ck SWI specifica|
000006a0  74 69 6f 6e 73 2e 0a 0a  45 63 6f 6e 65 74 20 26  |tions...Econet &|
000006b0  20 44 69 73 63 20 48 61  72 64 77 61 72 65 0a 2d  | Disc Hardware.-|
000006c0  2d 2d 2d 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |----------------|
000006d0  2d 2d 2d 2d 2d 0a 0a 4e  6f 74 20 45 6d 75 6c 61  |-----..Not Emula|
000006e0  74 65 64 0a 0a 54 75 62  65 20 48 61 72 64 77 61  |ted..Tube Hardwa|
000006f0  72 65 0a 2d 2d 2d 2d 2d  2d 2d 2d 2d 2d 2d 2d 2d  |re.-------------|
00000700  0a 0a 4e 6f 74 20 45 6d  75 6c 61 74 65 64        |..Not Emulated|
0000070e