src/mess/machine/atom.c
| r3616 | r3617 | |
| 6 | 6 | interrupts, I/O ports) |
| 7 | 7 | |
| 8 | 8 | Many thanks to Kees van Oss for: |
| 9 | | 1. Tape input/output circuit diagram. It describes in great detail how the 2.4khz |
| 10 | | tone, 2.4khz tone enable, tape output and tape input are connected. |
| 9 | 1. Tape input/output circuit diagram. It describes in great detail how the 2.4 kHz |
| 10 | tone, 2.4 kHz tone enable, tape output and tape input are connected. |
| 11 | 11 | 2. The DOS rom for the Atom so I could complete the floppy disc emulation. |
| 12 | 12 | 3. Details of the eprom expansion board for the Atom. |
| 13 | 13 | 4. His demo programs which I used to test the driver. |
| r3616 | r3617 | |
| 37 | 37 | /* printer data written */ |
| 38 | 38 | static char atom_printer_data = 0x07f; |
| 39 | 39 | |
| 40 | | /* I am not sure if this is correct, the atom appears to have a 2.4Khz timer used for reading tapes?? */ |
| 40 | /* I am not sure if this is correct, the atom appears to have a 2.4 kHz timer used for reading tapes?? */ |
| 41 | 41 | static int timer_state = 0; |
| 42 | 42 | |
| 43 | 43 | static void atom_via_irq_func(running_machine *machine, int state) |
| r3616 | r3617 | |
| 198 | 198 | /* change timer state */ |
| 199 | 199 | timer_state^=1; |
| 200 | 200 | |
| 201 | | /* the 2.4khz signal is notted (A), and nand'ed with the 2.4kz enable, resulting |
| 201 | /* the 2.4 kHz signal is notted (A), and nand'ed with the 2.4kz enable, resulting |
| 202 | 202 | in B. The final cassette output is the result of tape output nand'ed with B */ |
| 203 | 203 | |
| 204 | 204 | |
| r3616 | r3617 | |
| 207 | 207 | unsigned char B; |
| 208 | 208 | unsigned char result; |
| 209 | 209 | |
| 210 | | /* 2.4khz signal - notted */ |
| 210 | /* 2.4 kHz signal - notted */ |
| 211 | 211 | A = (~timer_state); |
| 212 | | /* 2.4khz signal notted, and anded with 2.4khz enable */ |
| 212 | /* 2.4 kHz signal notted, and anded with 2.4 kHz enable */ |
| 213 | 213 | B = (~(A & (atom_8255_portc>>1))) & 0x01; |
| 214 | 214 | |
| 215 | 215 | result = (~(B & atom_8255_portc)) & 0x01; |
| r3616 | r3617 | |
| 375 | 375 | atom_8255_portc |= (1<<5); |
| 376 | 376 | } |
| 377 | 377 | |
| 378 | | /* 2.4khz input */ |
| 378 | /* 2.4 kHz input */ |
| 379 | 379 | if (timer_state) |
| 380 | 380 | { |
| 381 | 381 | atom_8255_portc |= (1<<4); |
src/mess/machine/bbc.c
| r3616 | r3617 | |
| 328 | 328 | |
| 329 | 329 | b7 IRR 1=Causes an IRQ to the processor |
| 330 | 330 | b6 TST 1=Selects &FC00-&FEFF read from OS-ROM |
| 331 | | b5 IFJ 1=Internal 1Mhz bus |
| 332 | | 0=External 1Mhz bus |
| 331 | b5 IFJ 1=Internal 1 MHz bus |
| 332 | 0=External 1MHz bus |
| 333 | 333 | b4 ITU 1=Internal Tube |
| 334 | 334 | 0=External Tube |
| 335 | 335 | b3 Y 1=Read/Write HAZEL &C000-&DFFF RAM |
| r3616 | r3617 | |
| 559 | 559 | &30-&33 ROMSEL - ROM Select 4 ( 1 byte x 4 ) |
| 560 | 560 | &34-&37 ACCCON ACCCON select reg. ACCCON select reg 4 ( 1 byte x 4 ) |
| 561 | 561 | &38-&3F NC - - |
| 562 | | &40-&5F 6522 VIA SYSTEM VIA SYSTEM VIA 32 (16 bytes x 2 ) 1Mhz |
| 563 | | &60-&7F 6522 VIA USER VIA USER VIA 32 (16 bytes x 2 ) 1Mhz |
| 562 | &40-&5F 6522 VIA SYSTEM VIA SYSTEM VIA 32 (16 bytes x 2 ) 1MHz |
| 563 | &60-&7F 6522 VIA USER VIA USER VIA 32 (16 bytes x 2 ) 1MHz |
| 564 | 564 | &80-&9F Int. Modem Int. Modem Int Modem |
| 565 | | &A0-&BF 68B54 ADLC ECONET controller ECONET controller 32 ( 4 bytes x 8 ) 2Mhz |
| 565 | &A0-&BF 68B54 ADLC ECONET controller ECONET controller 32 ( 4 bytes x 8 ) 2MHz |
| 566 | 566 | &C0-&DF NC - - |
| 567 | | &E0-&FF Tube ULA Tube system interface Tube system interface 32 (32 bytes x 1 ) 2Mhz |
| 567 | &E0-&FF Tube ULA Tube system interface Tube system interface 32 (32 bytes x 1 ) 2MHz |
| 568 | 568 | ******************************************************************************/ |
| 569 | 569 | |
| 570 | 570 | READ8_HANDLER ( bbcm_r ) |
| r3616 | r3617 | |
| 2038 | 2038 | break; |
| 2039 | 2039 | /* case 6 is the Opus challenger interface */ |
| 2040 | 2040 | case 6: |
| 2041 | | /* not connected here, opus drive is connected via the 1Mhz Bus */ |
| 2041 | /* not connected here, opus drive is connected via the 1MHz Bus */ |
| 2042 | 2042 | break; |
| 2043 | 2043 | /* case 7 in no disc controller */ |
| 2044 | 2044 | case 7: |
| r3616 | r3617 | |
| 2064 | 2064 | break; |
| 2065 | 2065 | /* case 6 is the Opus challenger interface */ |
| 2066 | 2066 | case 6: |
| 2067 | | /* not connected here, opus drive is connected via the 1Mhz Bus */ |
| 2067 | /* not connected here, opus drive is connected via the 1MHz Bus */ |
| 2068 | 2068 | break; |
| 2069 | 2069 | /* case 7 in no disc controller */ |
| 2070 | 2070 | case 7: |
src/mess/machine/kc.c
| r3616 | r3617 | |
| 124 | 124 | /******************/ |
| 125 | 125 | /* used by KC85/2, KC85/3 and KC85/4 */ |
| 126 | 126 | /* floppy disc interface has: |
| 127 | | - Z80 at 4Mhz |
| 127 | - Z80 at 4 MHz |
| 128 | 128 | - Z80 CTC |
| 129 | 129 | - 1k ram |
| 130 | 130 | - NEC765 floppy disc controller |
| r3616 | r3617 | |
| 904 | 904 | /* head and tail of list is at beginning */ |
| 905 | 905 | keyboard_data.head = (keyboard_data.tail = 0); |
| 906 | 906 | |
| 907 | | /* 50hz is just a arbitrary value - used to put scan-codes into the queue for transmitting */ |
| 907 | /* 50 Hz is just a arbitrary value - used to put scan-codes into the queue for transmitting */ |
| 908 | 908 | timer_pulse(ATTOTIME_IN_HZ(50), NULL, 0, kc_keyboard_update); |
| 909 | 909 | |
| 910 | 910 | /* timer to transmit pulses to kc base unit */ |
| r3616 | r3617 | |
| 1839 | 1839 | kc_cassette_init(); |
| 1840 | 1840 | kc_keyboard_init(machine); |
| 1841 | 1841 | |
| 1842 | | /* kc85 has a 50hz input to the ctc channel 2 and 3 */ |
| 1842 | /* kc85 has a 50 Hz input to the ctc channel 2 and 3 */ |
| 1843 | 1843 | /* channel 2 this controls the video colour flash */ |
| 1844 | | /* kc85 has a 15khz (?) input to the ctc channel 0 and 1 */ |
| 1844 | /* kc85 has a 15 kHz (?) input to the ctc channel 0 and 1 */ |
| 1845 | 1845 | /* channel 0 and channel 1 are used for cassette write */ |
| 1846 | 1846 | kc85_50hz_state = 0; |
| 1847 | 1847 | kc85_15khz_state = 0; |
src/mess/drivers/adam.c
| r3616 | r3617 | |
| 621 | 621 | |
| 622 | 622 | static MACHINE_DRIVER_START( adam ) |
| 623 | 623 | /* Machine hardware */ |
| 624 | | MDRV_CPU_ADD("main", Z80, 3579545) /* 3.579545 Mhz */ |
| 624 | MDRV_CPU_ADD("main", Z80, 3579545) /* 3.579545 MHz */ |
| 625 | 625 | MDRV_CPU_PROGRAM_MAP(adam_mem, 0) |
| 626 | 626 | MDRV_CPU_IO_MAP(adam_io, 0) |
| 627 | 627 | |
| 628 | 628 | /* Master M6801 AdamNet controller */ |
| 629 | | //MDRV_CPU_ADD("adamnet", M6800, 4000000) /* 4.0 Mhz */ |
| 629 | //MDRV_CPU_ADD("adamnet", M6800, 4000000) /* 4.0 MHz */ |
| 630 | 630 | //MDRV_CPU_PROGRAM_MAP(master6801_mem, 0) |
| 631 | 631 | |
| 632 | 632 | MDRV_CPU_VBLANK_INT("main", adam_interrupt) |
src/mess/drivers/arcadia.c
| r3616 | r3617 | |
| 11 | 11 | |
| 12 | 12 | 1. General |
| 13 | 13 | SYSTEM |
| 14 | | - Signetics 2650 CPU at 3.58/4 Mhz(for NTSC) or at 4,433/5 (for PAL) |
| 14 | - Signetics 2650 CPU at 3.58/4 MHz(for NTSC) or at 4,433/5 (for PAL) |
| 15 | 15 | - 1k x 8 of RAM (physically present but only 512 byte available) |
| 16 | 16 | - 2 x 2 axis Analogue Joysticks |
| 17 | 17 | - 2 x 12 button Controllers |
| r3616 | r3617 | |
| 443 | 443 | |
| 444 | 444 | static MACHINE_DRIVER_START( arcadia ) |
| 445 | 445 | /* basic machine hardware */ |
| 446 | | MDRV_CPU_ADD("main", S2650, 3580000/4) /* 0.895 Mhz */ |
| 446 | MDRV_CPU_ADD("main", S2650, 3580000/4) /* 0.895 MHz */ |
| 447 | 447 | MDRV_CPU_PROGRAM_MAP(arcadia_mem, 0) |
| 448 | 448 | MDRV_CPU_IO_MAP(arcadia_io, 0) |
| 449 | 449 | MDRV_CPU_PERIODIC_INT(arcadia_video_line, 262*60) |
src/mess/drivers/lisa.c
| r3616 | r3617 | |
| 87 | 87 | /* Lisa1 and Lisa 2 machine */ |
| 88 | 88 | static MACHINE_DRIVER_START( lisa ) |
| 89 | 89 | /* basic machine hardware */ |
| 90 | | MDRV_CPU_ADD("main", M68000, 5093760) /* 20.37504 Mhz / 4 */ |
| 90 | MDRV_CPU_ADD("main", M68000, 5093760) /* 20.37504 MHz / 4 */ |
| 91 | 91 | MDRV_CPU_PROGRAM_MAP(lisa_map, 0) |
| 92 | 92 | MDRV_CPU_VBLANK_INT("main", lisa_interrupt) |
| 93 | 93 | |
| 94 | | MDRV_CPU_ADD("fdc", M6502, 2000000) /* 16.000 Mhz / 8 in when DIS asserted, 16.000 Mhz / 9 otherwise (?) */ |
| 94 | MDRV_CPU_ADD("fdc", M6502, 2000000) /* 16.000 MHz / 8 in when DIS asserted, 16.000 MHz / 9 otherwise (?) */ |
| 95 | 95 | MDRV_CPU_PROGRAM_MAP(lisa_fdc_map, 0) |
| 96 | 96 | |
| 97 | 97 | MDRV_INTERLEAVE(1) |
src/mess/drivers/apf.c
| r3616 | r3617 | |
| 635 | 635 | |
| 636 | 636 | static MACHINE_DRIVER_START( apf_imagination ) |
| 637 | 637 | /* basic machine hardware */ |
| 638 | | // MDRV_CPU_ADD("main", M6800, 3750000) /* 7.8336 Mhz, only 6800p type used 1mhz max*/ |
| 638 | // MDRV_CPU_ADD("main", M6800, 3750000) /* 7.8336 MHz, only 6800p type used 1 MHz max*/ |
| 639 | 639 | MDRV_CPU_ADD("main", M6800, 1000000 ) /* backgammon uses timing from vertical interrupt to switch between video modes during frame */ |
| 640 | 640 | MDRV_CPU_PROGRAM_MAP(apf_imagination_map, 0) |
| 641 | 641 | MDRV_SCREEN_ADD("main", RASTER) |
src/mess/drivers/snes.c
| r3616 | r3617 | |
| 19 | 19 | - Add horizontal mosaic, hi-res. interlaced etc to video emulation. |
| 20 | 20 | - Fix support for Mode 7. (In Progress) |
| 21 | 21 | - Handle interleaved roms (maybe even multi-part roms, but how?) |
| 22 | | - Add support for running at 3.58Mhz at the appropriate time. |
| 22 | - Add support for running at 3.58 MHz at the appropriate time. |
| 23 | 23 | - I'm sure there's lots more ... |
| 24 | 24 | |
| 25 | 25 | ***************************************************************************/ |
| r3616 | r3617 | |
| 193 | 193 | |
| 194 | 194 | static MACHINE_DRIVER_START( snes ) |
| 195 | 195 | /* basic machine hardware */ |
| 196 | | MDRV_CPU_ADD("main", G65816, MCLK_NTSC/6) /* 2.68Mhz, also 3.58Mhz */ |
| 196 | MDRV_CPU_ADD("main", G65816, MCLK_NTSC/6) /* 2.68 MHz, also 3.58 MHz */ |
| 197 | 197 | MDRV_CPU_PROGRAM_MAP(snes_map, 0) |
| 198 | 198 | |
| 199 | | MDRV_CPU_ADD("sound", SPC700, 1024000) /* 1.024 Mhz */ |
| 199 | MDRV_CPU_ADD("sound", SPC700, 1024000) /* 1.024 MHz */ |
| 200 | 200 | MDRV_CPU_PROGRAM_MAP(spc_map, 0) |
| 201 | 201 | MDRV_CPU_VBLANK_INT_HACK(NULL, 0) |
| 202 | 202 | |
src/mess/drivers/electron.c
| r3616 | r3617 | |
| 11 | 11 | Incomplete: |
| 12 | 12 | - Sound (sound is too high?) |
| 13 | 13 | - Graphics (seems to be wrong for several games) |
| 14 | | - 1MHz bus is not emulated |
| 14 | - 1 MHz bus is not emulated |
| 15 | 15 | - Bus claiming by ULA is not implemented |
| 16 | 16 | |
| 17 | 17 | Missing: |
| r3616 | r3617 | |
| 50 | 50 | AM_RANGE(0x8000, 0xbfff) AM_ROMBANK(2) /* Banked ROM pages */ |
| 51 | 51 | AM_RANGE(0xc000, 0xfbff) AM_ROM AM_REGION("user1", 0x40000) /* OS ROM */ |
| 52 | 52 | AM_RANGE(0xfc00, 0xfcff) AM_READWRITE( electron_jim_r, electron_jim_w ) /* JIM pages */ |
| 53 | | AM_RANGE(0xfd00, 0xfdff) AM_READWRITE( electron_1mhz_r, electron_1mhz_w ) /* 1MHz bus */ |
| 53 | AM_RANGE(0xfd00, 0xfdff) AM_READWRITE( electron_1mhz_r, electron_1mhz_w ) /* 1 MHz bus */ |
| 54 | 54 | AM_RANGE(0xfe00, 0xfeff) AM_READWRITE( electron_ula_r, electron_ula_w ) /* Electron ULA */ |
| 55 | 55 | AM_RANGE(0xff00, 0xffff) AM_ROM AM_REGION("user1", 0x43f00) /* OS ROM continued */ |
| 56 | 56 | ADDRESS_MAP_END |
src/mess/drivers/a7800.c
| r3616 | r3617 | |
| 262 | 262 | |
| 263 | 263 | static MACHINE_DRIVER_START( a7800 ) |
| 264 | 264 | /* basic machine hardware */ |
| 265 | | MDRV_CPU_ADD("main", M6502, CLK_NTSC) /* 1.79Mhz (note: The clock switches to 1.19Mhz |
| 265 | MDRV_CPU_ADD("main", M6502, CLK_NTSC) /* 1.79 MHz (note: The clock switches to 1.19 MHz |
| 266 | 266 | * when the TIA or RIOT are accessed) */ |
| 267 | 267 | MDRV_CPU_PROGRAM_MAP(a7800_mem, 0) |
| 268 | 268 | MDRV_CPU_VBLANK_INT_HACK(a7800_interrupt, 262) |
| r3616 | r3617 | |
| 310 | 310 | MDRV_RIOT6532_ADD("riot", 3546894/3, r6532_interface_pal) |
| 311 | 311 | |
| 312 | 312 | /* basic machine hardware */ |
| 313 | | MDRV_CPU_REPLACE("main", M6502, CLK_PAL) /* 1.79Mhz (note: The clock switches to 1.19Mhz |
| 313 | MDRV_CPU_REPLACE("main", M6502, CLK_PAL) /* 1.79 MHz (note: The clock switches to 1.19 MHz |
| 314 | 314 | * when the TIA or RIOT are accessed) */ |
| 315 | 315 | MDRV_CPU_VBLANK_INT_HACK(a7800_interrupt, 312) |
| 316 | 316 | |
src/mess/drivers/vtech1.c
| r3616 | r3617 | |
| 310 | 310 | |
| 311 | 311 | static MACHINE_DRIVER_START(laser110) |
| 312 | 312 | /* basic machine hardware */ |
| 313 | | MDRV_CPU_ADD("main", Z80, VTECH1_CLK) /* 3.57950 Mhz */ |
| 313 | MDRV_CPU_ADD("main", Z80, VTECH1_CLK) /* 3.57950 MHz */ |
| 314 | 314 | MDRV_CPU_PROGRAM_MAP(laser110_mem, 0) |
| 315 | 315 | MDRV_CPU_IO_MAP(vtech1_io, 0) |
| 316 | 316 | MDRV_SCREEN_ADD("main", RASTER) |
| r3616 | r3617 | |
| 360 | 360 | |
| 361 | 361 | static MACHINE_DRIVER_START(laser310) |
| 362 | 362 | MDRV_IMPORT_FROM( laser200 ) |
| 363 | | MDRV_CPU_REPLACE( "main", Z80, VZ300_XTAL1_CLK/5) /* 3.546894 Mhz */ |
| 363 | MDRV_CPU_REPLACE( "main", Z80, VZ300_XTAL1_CLK/5) /* 3.546894 MHz */ |
| 364 | 364 | MDRV_CPU_PROGRAM_MAP(laser310_mem, 0) |
| 365 | 365 | |
| 366 | 366 | MDRV_MACHINE_START(laser310) |
src/mess/drivers/amstrad.c
| r3616 | r3617 | |
| 10 | 10 | - 6845 (either HD6845S, UM6845R or M6845) crtc graphics display |
| 11 | 11 | controller |
| 12 | 12 | - NEC765 floppy disc controller (CPC664,CPC6128) |
| 13 | | - Z80 CPU running at 4Mhz (slowed by wait states on memory |
| 13 | - Z80 CPU running at 4 MHz (slowed by wait states on memory |
| 14 | 14 | access) |
| 15 | 15 | - custom ASIC "Gate Array" controlling rom paging, ram paging, |
| 16 | 16 | current display mode and colour palette |
| r3616 | r3617 | |
| 303 | 303 | 7 Cassette read data |
| 304 | 304 | 6 Parallel/Printer port ready signal ("1" = not ready, "0" = Ready) |
| 305 | 305 | 5 /EXP signal on expansion port (note 6) |
| 306 | | 4 50/60hz (link on PCB. For this MESS driver I have used the dipswitch feature) (note 5) |
| 306 | 4 50/60 Hz (link on PCB. For this MESS driver I have used the dipswitch feature) (note 5) |
| 307 | 307 | 3 | PCB links to define manufacturer name. For this MESS driver I have used the dipswitch feature. (note 1) (note 4) |
| 308 | 308 | 2 | (note 2) |
| 309 | 309 | 1 | (note 3) |
| r3616 | r3617 | |
| 315 | 315 | 2 On CPC464,CPC664,CPC6128 and GX4000 this is LK2 on the PCB. On the CPC464+ and CPC6128+ this is LK102 on the PCB. On the KC compact this is "0". |
| 316 | 316 | 3 On CPC464,CPC664,CPC6128 and GX4000 this is LK1 on the PCB. On the CPC464+ and CPC6128+ this is LK101 on the PCB. On the KC compact this is /TEST signal from the expansion port. |
| 317 | 317 | 4 On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bits 3,2 and 1 define the manufacturer name. See below to see the options available. The manufacturer name is defined on the PCB and cannot be changed through software. |
| 318 | | 5 On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bit 4 defines the Screen refresh frequency. "1" = 50Hz, "0" = 60Hz. This is defined on the PCB and cannot be changed with software. On the KC compact bit 4 is "1" |
| 318 | 5 On the CPC464,CPC664,CPC6128,CPC464+,CPC6128+ and GX4000 bit 4 defines the Screen refresh frequency. "1" = 50 Hz, "0" = 60 Hz. This is defined on the PCB and cannot be changed with software. On the KC compact bit 4 is "1" |
| 319 | 319 | 6 This bit is connected to /EXP signal on the expansion port. |
| 320 | 320 | On the KC Compact this bit is used to define bit 7 of the printer data. |
| 321 | 321 | On the CPC, it is possible to use this bit to define bit 7 of the printer data, so a 8-bit printer port is made, with a hardware modification, |
| r3616 | r3617 | |
| 339 | 339 | data |= (1<<6); |
| 340 | 340 | } |
| 341 | 341 | } |
| 342 | | /* Set b4-b1 50hz/60hz state and manufacturer name defined by links on PCB */ |
| 342 | /* Set b4-b1 50Hz/60Hz state and manufacturer name defined by links on PCB */ |
| 343 | 343 | data |= (ppi_port_inputs[amstrad_ppi_PortB] & 0x1e); |
| 344 | 344 | |
| 345 | 345 | /* Set b0 with VSync state from the CRTC */ |
| r3616 | r3617 | |
| 2911 | 2911 | * |
| 2912 | 2912 | *************************************/ |
| 2913 | 2913 | |
| 2914 | | /* actual clock to CPU is 4Mhz, but it is slowed by memory |
| 2914 | /* actual clock to CPU is 4 MHz, but it is slowed by memory |
| 2915 | 2915 | accessess. A HALT is used for every memory access by the CPU. |
| 2916 | 2916 | This stretches the timing for opcodes, and gives an effective |
| 2917 | | speed of 3.8Mhz */ |
| 2917 | speed of 3.8 MHz */ |
| 2918 | 2918 | |
| 2919 | 2919 | /* Info about structures below: |
| 2920 | 2920 | |
| 2921 | | The Amstrad has a CPU running at 4Mhz, slowed with wait states. |
| 2921 | The Amstrad has a CPU running at 4 MHz, slowed with wait states. |
| 2922 | 2922 | I have measured 19968 NOP instructions per frame, which gives, |
| 2923 | 2923 | 50.08 fps as the tv refresh rate. |
| 2924 | 2924 | |