trunk/src/mess/drivers/fanucspmg.c
| r30642 | r30643 | |
| 2 | 2 | // copyright-holders:R. Belmont |
| 3 | 3 | /*************************************************************************** |
| 4 | 4 | |
| 5 | | Fanuc System P Model G |
| 5 | Fanuc System P-Model G |
| 6 | 6 | Fanuc 1983 |
| 7 | 7 | |
| 8 | 8 | 2014-03-22 Skeleton driver. |
| r30642 | r30643 | |
| 12 | 12 | Also known as Fanuc P-G System, this is a dedicated 8085+8086+8087-based computer |
| 13 | 13 | system running software for CNC Programming. |
| 14 | 14 | The system boots up from on-board EPROM and shows a big ASCII-art boot screen |
| 15 | | FANUC SYSTEM P MODEL G and the ROM software version in the lower right corner. |
| 15 | FANUC SYSTEM P and the ROM software version in the lower right corner. |
| 16 | 16 | To initiate booting from the floppy drive hold down the LOAD key for 3-5 seconds. |
| 17 | 17 | The system checks for a long LOAD key press so that it doesn't load software |
| 18 | 18 | if the LOAD key is accidentally pressed quickly while using the system, which would |
| r30642 | r30643 | |
| 41 | 41 | File (containing a 20MB HDD, two 8" floppy drives and two RS232 ports), Fanuc Cassette |
| 42 | 42 | Adapter, XY Plotter (A3 or A1), Fanuc Digitizing Tablet (A3 or A0) and Fanuc I/O Selector Box. |
| 43 | 43 | |
| 44 | | The P-G System has an internal 12" color monitor and dual 5 1/4" floppy drives. |
| 45 | | A later model was released in 1986 called the Mark II using dual 3 1/2" floppy |
| 46 | | drives. The previous version was SYSTEM P MODEL D. It had a 12" green monochrome |
| 47 | | monitor and booted from, and stored to, a cassette tape or floppy disk. |
| 44 | The P-G System has an internal 12" monitor and dual 5 1/4" floppy drives. |
| 45 | The first model had a 12" monochrome green monitor. In 1985 a color version was released. |
| 46 | In 1986 another model was released called the Mark II using dual 3 1/2" floppy drives. |
| 48 | 47 | |
| 49 | | The screen resolution is 512 x 384 pixels. |
| 50 | | It can display 64 characters x 24 lines. |
| 48 | The screen resolution is 512 x 384 pixels. It can display 64 characters x 24 lines. |
| 51 | 49 | |
| 52 | 50 | The floppy format is custom. Floppies are double sided double density and |
| 53 | 51 | regular PC DSDD 360k floppies can be used after they are formatted using the |
| r30642 | r30643 | |
| 57 | 55 | The floppy drives are typical PC-type 5 1/4" 360k drives and were manufactured |
| 58 | 56 | by Y-E DATA, model YD-580. |
| 59 | 57 | |
| 60 | | The floppy disks can be backed-up and imaged using a DOS program called ImageDisk |
| 58 | The 5 1/4" floppy disks can be backed-up and imaged using a DOS program called ImageDisk |
| 61 | 59 | which is available here..... |
| 62 | 60 | http://www.classiccmp.org/dunfield/img/index.htm |
| 63 | 61 | With a 5 1/4" HD floppy drive, in the GUI in settings change the number of |
| r30642 | r30643 | |
| 68 | 66 | |
| 69 | 67 | The following is a complete list of software titles available. |
| 70 | 68 | The info is taken from a glossy sales brochure printed in July 1985. |
| 71 | | Other versions did exist so this list is not final. |
| 69 | Other versions probably exist so this list is not final. |
| 72 | 70 | * denotes it is dumped. All other titles are not dumped and are needed. |
| 73 | 71 | |
| 74 | 72 | Language Input - |
| r30642 | r30643 | |
| 90 | 88 | |
| 91 | 89 | Title Part Number |
| 92 | 90 | -------------------------------------- |
| 93 | | *Symbolic FAPT TURN A08B-0033-J800#E +English |
| 91 | *Symbolic FAPT TURN A08B-0033-J800#E Edition B V02 L03 841116 |
| 94 | 92 | Symbolic FAPT MILL A08B-0033-J840#E |
| 95 | 93 | Symbolic FAPT DRILL A08B-0033-J860#E |
| 96 | 94 | Symbolic FAPT CUT A08B-0033-J820#E |
| 97 | 95 | FAPT DIGITIZER A08B-0033-J510#E |
| 98 | 96 | |
| 99 | 97 | + Symbolic FAPT TURN was available in English, German, French, Dutch, Finnish, |
| 100 | | and Swedish versions. |
| 98 | and Swedish versions. Currently only the English version is archived. |
| 101 | 99 | |
| 102 | 100 | |
| 103 | 101 | Support System - |
| 104 | 102 | |
| 105 | 103 | Title Part Number |
| 106 | 104 | ------------------------------- |
| 107 | | *FAPT TRACER A08B-0033-H620#E Edition B 85/1/16 |
| 108 | | *FAPT TEACHER A08B-0033-J610#E Edition B 85/1/12 |
| 109 | | *FAPT DOCTOR A08B-0033-J600#E Edition B 84/12/21 |
| 105 | *FAPT TRACER A08B-0033-H620#E Edition B V02 L02 841108 |
| 106 | *FAPT TEACHER A08B-0033-J610#E Edition B L02 V01 841101 |
| 107 | *FAPT DOCTOR A08B-0033-J600#E Edition B V01 L03 841108 |
| 110 | 108 | |
| 111 | 109 | |
| 110 | The software listed above with (*) have been tested on both mono and color versions and works fine. |
| 112 | 111 | Note: To initiate booting from the floppy drive hold down the LOAD key for 3-5 seconds. |
| 113 | 112 | |
| 114 | | The software for the Fanuc System P Model G is extremely rare now and very |
| 115 | | difficult to find. If you do have any of these wanted software titles or any manuals |
| 116 | | listed below and want to help please contact me (Guru) via http://mamedev.org/contact.html |
| 113 | The software for the Fanuc System P-Model G is extremely rare now and very difficult to find. |
| 114 | If you do have any of these wanted software titles or any manuals listed below and want to help |
| 115 | please contact me (Guru) via http://mamedev.org/contact.html |
| 117 | 116 | |
| 118 | 117 | The following is a complete list of manuals available for the first edition of the |
| 119 | | Fanuc System P Model G released in 1983. The info is taken from a glossy sales brochure |
| 118 | Fanuc System P-Model G released in 1983. The info is taken from a glossy sales brochure |
| 120 | 119 | printed in July 1985. There were other manuals released later for the Mark II and |
| 121 | 120 | updated manuals (each with a different part number). |
| 122 | 121 | The manuals were available in Japanese and English. The part numbers listed here |
| r30642 | r30643 | |
| 178 | 177 | |
| 179 | 178 | |
| 180 | 179 | The unit has it's own dedicated keyboard with many special keys. |
| 180 | The keyboard clips to the main box and is the top cover when the main box is transported. |
| 181 | 181 | The keyboard layout is shown below. |
| 182 | 182 | |
| 183 | 183 | |------------------------------------------------------------------------------| |
| r30642 | r30643 | |
| 257 | 257 | Box Layout (top view) |
| 258 | 258 | ---------- |
| 259 | 259 | |
| 260 | | A08B-0033-B001 |
| 260 | A08B-0033-B001 (Color Version from 1985) |
| 261 | A08B-0031-B001 (Mono Version from 1983) |
| 262 | A08B-0031-B002 (Mono Version from 1984) |
| 261 | 263 | |--------------------------------------------| |
| 262 | 264 | | ------------MAIN PCB---------------------- | |
| 263 | 265 | | -----------SUB-PCB----------- | | |
| 264 | 266 | | | | |
| 265 | 267 | | |-----------------------| | | |
| 266 | 268 | | | | | | |
| 267 | | | | | P | |
| 269 | | | FANUC 12" COLOR | P | |
| 268 | 270 | | | CRT UNIT | O | |
| 269 | | | | | W | |
| 271 | | | A61L-0001-0078 | W | |
| 270 | 272 | | | | E | |
| 271 | | | | 12" COLOR | |---------| R | |
| 272 | | | | | |FDD UNIT | | | |
| 273 | | | | SCREEN | |A87L-0001| P | |
| 274 | | | | | |-0026 | C | |
| 275 | | | | | | | B | |
| 276 | | | | | | | | | |
| 277 | | | | | |5 1/4" | | | |
| 278 | | | | | |FLOPPY | | |
| 273 | | | | |---------| R | |
| 274 | | | | |FANUC | | | |
| 275 | | | OR | |FDD UNIT | P | |
| 276 | | | | |A87l-0001| C | |
| 277 | | | | |-0026 | B | |
| 278 | | | FANUC 12" MONO | | | | | |
| 279 | | | CRT UNIT | |5 1/4" | | | |
| 280 | | | A61L-0001-0073 | |FLOPPY | | |
| 279 | 281 | | | | |DRIVES | | |
| 280 | 282 | | | | |x2 | | |
| 281 | 283 | | |-----------------------| |---------| | |
| 282 | 284 | |--------------------------------------------| |
| 285 | Notes: |
| 286 | The CRT tube in the color version is a Matsushita 320DHB22. Input voltage is 110V AC |
| 287 | The CRT tube in the mono version is a Hitachi 310KEB31. Input voltage is 24V DC and B+ is 11.0V |
| 288 | The mono version does not have a SUB PCB |
| 289 | The power PCB is identical for both color and mono versions |
| 283 | 290 | |
| 284 | 291 | |
| 285 | | Main PCB Layout |
| 292 | Main PCB Layout (for color version) |
| 286 | 293 | --------------- |
| 287 | 294 | |
| 288 | 295 | A20B-1000-0710/03B |
| r30642 | r30643 | |
| 301 | 308 | | CN7 CN6 CN5 CN4 CN3 | |
| 302 | 309 | |-------------------------------------------| |
| 303 | 310 | Notes: |
| 304 | | D8086 - Intel 8086 CPU. Clock input 5.000MHz [15/3] |
| 305 | | D8087 - Intel 8087 x87 Floating-Point Co-Processor. Clock input 5.000MHz [15/3] |
| 311 | D8086 - Intel 8086-2 CPU. Clock input 5.000MHz [15/3] |
| 312 | D8087 - Intel 8087-3 x87 Floating-Point Co-Processor. Clock input 5.000MHz [15/3] |
| 306 | 313 | XXXXXXX - Fujitsu MB8265-15 65536 x1-bit DRAM (72 chips total) |
| 307 | 314 | MB15541 - Fujitsu MB15541 Custom Chip |
| 308 | 315 | D765 - NEC D765 Single/Double Density Floppy-Disk Controller. Clock input 4.000MHz [16/4] |
| r30642 | r30643 | |
| 312 | 319 | D8259 - NEC D8259 Programmable Interrupt Controller |
| 313 | 320 | D8284 - Intel D8284 Clock Generator and Driver for 8086/8088 Processors |
| 314 | 321 | A40_00* - Fujitsu MBM2764 8k x8-bit EPROM |
| 315 | | VR1/VR2 - Potentiometer |
| 322 | VR1 - Potentiometer to adjust pulse width of floppy disk control unit |
| 323 | VR2 - Potentiometer to adjust screen brightness |
| 316 | 324 | ^ - 3 chips marked Y-E Data Fujitsu |
| 317 | 325 | MB4393 |
| 318 | 326 | MB14324 |
| r30642 | r30643 | |
| 322 | 330 | CNB - 50-pin flat cable joining to Sub PCB |
| 323 | 331 | CNC - 6-pin power cable joining to Sub PCB |
| 324 | 332 | CND - 34-pin flat cable joining to FDD Unit |
| 325 | | CNE - Fanuc Honda MR-50 50-pin female connector for expansion (not used) |
| 333 | CNE - Fanuc Honda MR-50 50-pin female connector for factory testing (not used) |
| 326 | 334 | CNF - Power input connector |
| 327 | 335 | CN1 - 25-pin Female D-type connector. (for RS232 external peripherals \ CNC Machine, |
| 328 | 336 | CN2 - 25-pin Female D-type connector. (for RS232 external peripherals | PPR Unit, X-Y Plotter, |
| r30642 | r30643 | |
| 330 | 338 | CN4 - 25-pin Female D-type connector. (for RS232 external peripherals / Cassette Adapter etc (connections in any order) |
| 331 | 339 | CN5 - Fanuc Honda MR-50 50-pin female connector (probably for external connection of the Fanuc Program File Unit) |
| 332 | 340 | CN6 - Fanuc Honda MR-20 20-pin female connector for the keyboard |
| 333 | | CN7 - Fanuc Honda MR-20 20-pin male. Specification says 'not used' but this appears to be a |
| 334 | | Facit 4070 Parallel Reader/Puncher connector |
| 335 | | Pinout: (pin 1 is top left, location key is on the opposite side) |
| 336 | | |---------------------------------------------------| |
| 337 | | | | |
| 338 | | | 1_PR 2_TE 3_ERR 4_TTY3 5_+6V 6_TTY2 7_TTY1 | |
| 339 | | | | |
| 340 | | | 8_SG 9_SD 10_0V 11_CH1 12_CH2 13_CH3 O |
| 341 | | | | |
| 342 | | | 14_CH4 15_CH5 16_CH6 17_CH7 18_CH8 19_CH9 20_PI | |
| 343 | | | | |
| 344 | | |---------------------------------------------------| |
| 345 | | JUMPERS - 15 2-pin jumpers labelled S1 to S15. S2, S3 & S4 are not shorted. All others are shorted. |
| 341 | CN7 - Fanuc Honda MR-20 20-pin male connector. Specification says 'not used'. Video signals are present on |
| 342 | the connector so it is probably used for an external monitor |
| 343 | JUMPERS - 15 2-pin jumpers labelled S1 to S15. S2, S3 & S4 are open and the others are shorted |
| 346 | 344 | |
| 347 | 345 | |
| 348 | | Sub PCB Layout |
| 346 | Sub PCB Layout (for color version) |
| 349 | 347 | -------------- |
| 350 | 348 | |
| 351 | 349 | A20B-1000-0720/02B |
| r30642 | r30643 | |
| 364 | 362 | | 6264 A41_020A.30B| |
| 365 | 363 | |--------------------------------| |
| 366 | 364 | Notes: |
| 367 | | D8085 - NEC D8085A-2 CPU. Clock input 8.000MHz [16/2]. |
| 365 | D8085 - NEC D8085A-2 CPU. Clock input 8.000MHz [16/2] |
| 368 | 366 | Note 8085 has internal /2 divider so actual clock speed is 4.000MHz |
| 369 | | HD6845S - Hitachi HD6845S / HD46505S CRT Controller. Clock input 2.000MHz [8/2] |
| 367 | HD6845S - Hitachi HD6845S / HD46505S CRT Controller. Clock input 2.000MHz [16/8] |
| 370 | 368 | 6264 - Hitachi HM6264P-15 8k x 8-bit SRAM |
| 371 | 369 | XXXXXXX - Fujitsu MB8265-15 65536 x1-bit DRAM (25 chips total) |
| 372 | 370 | MB15542 - Fujitsu MB15542 Custom Chip |
| r30642 | r30643 | |
| 376 | 374 | CNB - 50-pin flat cable joining to Main PCB |
| 377 | 375 | CNC - 6-pin power cable joining to Main PCB |
| 378 | 376 | CND - 20-pin flat cable joining to CRT Unit (video output) |
| 379 | | CNE - Fanuc Honda MR-50 50-pin male connector for expansion (not used) |
| 377 | CNE - Fanuc Honda MR-50 50-pin male connector for factory testing (not used) |
| 380 | 378 | HSync - 22.7273kHz |
| 381 | 379 | VSync - 54.6330Hz |
| 382 | 380 | |
| 383 | 381 | |
| 382 | Main PCB Layout (for mono version) |
| 383 | --------------- |
| 384 | |
| 385 | A20B-1000-0140/09F |
| 386 | |-------------------------------------------| |
| 387 | | CN10 CN9 VR1 CN8 | |
| 388 | | 6116 S3 ^ | |
| 389 | | A22_020B.5G % D765 XXXXXXXXX| |
| 390 | | 16MHz MB15542 MB15541 D8257 XXXXXXXXX| |
| 391 | | S4 15MHz D8284 XXXXXXXXX| |
| 392 | | 8085-2 HD6845S 8087 D8259 XXXXXXXXX| |
| 393 | | CN12 A21_010F.17D 8086 D8253 A25_001A.33E| |
| 394 | | CN11 S2 A25_002A.35E | |
| 395 | | S1 D8251 D8251 D39 | |
| 396 | | D8251 D8251 S5 S6 S7| |
| 397 | | YYYYYYYYY VR2 D8253 CN2 CN1 | |
| 398 | | CN7 CN6 CN5 CN4 CN3 | |
| 399 | |-------------------------------------------| |
| 400 | Notes: |
| 401 | D8086 - Intel 8086-2 CPU. Clock input 5.000MHz [15/3] |
| 402 | D8087 - Intel 8087-3 x87 Floating-Point Co-Processor. Clock input 5.000MHz [15/3] |
| 403 | D8085 - NEC D8085A-2 CPU. Clock input 8.000MHz [16/2] |
| 404 | Note 8085 has internal /2 divider so actual clock speed is 4.000MHz |
| 405 | HD6845S - Hitachi HD6845S / HD46505S CRT Controller. Clock input 2.000MHz [16/8] |
| 406 | XXXXXXX - Fujitsu MB8265-15 65536 x1-bit DRAM (36 chips total) |
| 407 | YYYYYYY - Fujitsu MB8265-15 65536 x1-bit DRAM (9 chips total) |
| 408 | 6116 - Hitachi HM6116P-3 2k x 8-bit SRAM |
| 409 | MB15541 - Fujitsu MB15541 Custom Chip |
| 410 | MB15542 - Fujitsu MB15542 Custom Chip |
| 411 | D765 - NEC D765 Single/Double Density Floppy-Disk Controller. Clock input 4.000MHz [16/4] |
| 412 | D8251 - Intel D8251 Programmable Communications Interface (USART) |
| 413 | D8253 - NEC D8253 Programmable Interval Timer. Clock input 1.25MHz [15/12] |
| 414 | D8257 - NEC D8257 Programmable DMA Controller. Clock input 3.000MHz [15/5] |
| 415 | D8259 - NEC D8259 Programmable Interrupt Controller |
| 416 | D8284 - Intel D8284 Clock Generator and Driver for 8086/8088 Processors |
| 417 | A2* - Hitachi HN482764G 8k x8-bit EPROM |
| 418 | VR1 - Potentiometer to adjust pulse width of floppy disk control unit |
| 419 | VR2 - Potentiometer to adjust screen brightness |
| 420 | ^ - 3 chips marked Y-E Data Fujitsu |
| 421 | MB4393 |
| 422 | MB14324 |
| 423 | MB14323 |
| 424 | % - Unknown 20-pin Ceramic DIP chip with heat-sink |
| 425 | CN1 - 25-pin Female D-type connector. (for RS232 external peripherals \ CNC Machine, |
| 426 | CN2 - 25-pin Female D-type connector. (for RS232 external peripherals | PPR Unit, X-Y Plotter, |
| 427 | CN3 - 25-pin Female D-type connector. (for RS232 external peripherals | Tablet, |
| 428 | CN4 - 25-pin Female D-type connector. (for RS232 external peripherals / Cassette Adapter etc (connections in any order) |
| 429 | CN5 - Fanuc Honda MR-50 50-pin female connector (probably for external connection of the Fanuc Program File Unit) |
| 430 | CN6 - Fanuc Honda MR-20 20-pin female connector for the keyboard |
| 431 | CN7 - Fanuc Honda MR-20 20-pin male. Specification says 'not used' and no signals are present on the connector |
| 432 | CN8 - 20-pin flat cable joining to CRT Unit (video output) |
| 433 | CN9 - 34-pin flat cable joining to FDD Unit |
| 434 | CN10 - Power input connector |
| 435 | CN11/12 - Fanuc Honda MR-50 50-pin female connector for factory testing (not used) |
| 436 | Sx - 7 2-pin jumpers (S1 to S7). S2, S3 & S4 are open and the others are shorted |
| 437 | D39 - Bank of 8 2-pin jumpers vertically orientated. 2 and 7 are shorted and the others are open |
| 438 | |
| 439 | |
| 384 | 440 | Block Diagram |
| 385 | 441 | ------------- |
| 386 | | Below is the block diagram shown in the Maintenance Manual. |
| 442 | Below is the block diagram shown in the System P-Model G Maintenance Manual, relating to the mono version. |
| 387 | 443 | The arrows denote direction of data flow. |
| 388 | 444 | |
| 389 | 445 | |-------| |--------| |----------------| |
| r30642 | r30643 | |
| 400 | 456 | | /-->| Graphic memory|------| | |
| 401 | 457 | | | |---------------| | | |----------------| |
| 402 | 458 | | | | |--------| |<--->|RS232C interface|---CN2 |
| 403 | | | | | | BOOT |<-------->| |----------------| |
| 459 | | | | | BOOT |<-------->| |----------------| |
| 404 | 460 | | | | | EPROM | | |
| 405 | 461 | | | |----------------| | |--------| | |----------------| |
| 406 | 462 | |<-----|-->|Character memory|--| | |<--->|RS232C interface|---CN3 |
| 407 | 463 | | |-->|----------------| | | |--------| | |----------------| |
| 408 | 464 | | | | | |Main RAM|<-------->| |
| 409 | 465 | | | | | |--------| | |----------------| |
| 410 | | | | | | |<--->|RS232C interface|---CN4 |
| 466 | | | | | |<--->|RS232C interface|---CN4 |
| 411 | 467 | | | | | | |----------------| |
| 412 | 468 | |---------| | | \/ \/ | |
| 413 | 469 | |Keyboard | \/ \---|---------------------------| | |-----------------| CN9 |--------| |
| r30642 | r30643 | |
| 422 | 478 | |Keyboard| | Screen | |
| 423 | 479 | |--------| |---------| |
| 424 | 480 | |
| 425 | | |
| 426 | 481 | TODO: |
| 427 | 482 | - Is the VRAM hookup anything like correct? |
| 428 | 483 | - Hookup enough keyboard to get it to boot a floppy, the FAPT DOCTOR |
| 429 | 484 | program will be invaluable to answering many questions. |
| 430 | 485 | - Shared RAM is 8k, but there are 2 6264s on the sub board. Is shared RAM |
| 431 | 486 | banked? |
| 432 | | - I/O is at F00xx: |
| 433 | | ':maincpu' (FC15A): unmapped program memory write to F0012 = 00CE & 00FF |
| 434 | | ':maincpu' (FC15D): unmapped program memory write to F0016 = 00CE & 00FF |
| 435 | | ':maincpu' (FC160): unmapped program memory write to F001A = 00CE & 00FF |
| 436 | | ':maincpu' (FC163): unmapped program memory write to F001E = 00CE & 00FF |
| 437 | | ':maincpu' (FC16D): unmapped program memory write to F000E = 0034 & 00FF |
| 438 | | ':maincpu' (FC172): unmapped program memory write to F0008 = 00D4 & 00FF |
| 439 | | ':maincpu' (FC177): unmapped program memory write to F0008 = 0030 & 00FF |
| 440 | | ':maincpu' (FC17C): unmapped program memory write to F000E = 0056 & 00FF |
| 441 | | ':maincpu' (FC181): unmapped program memory write to F000A = 0010 & 00FF |
| 442 | | ':maincpu' (FC186): unmapped program memory write to F000E = 0096 & 00FF |
| 443 | | ':maincpu' (FC18B): unmapped program memory write to F000C = 0010 & 00FF |
| 444 | | ':maincpu' (FC190): unmapped program memory write to F004E = 0034 & 00FF |
| 445 | | ':maincpu' (FC195): unmapped program memory write to F0048 = 0020 & 00FF |
| 446 | | ':maincpu' (FC19A): unmapped program memory write to F0048 = 004E & 00FF |
| 447 | | ':maincpu' (FC19F): unmapped program memory write to F004E = 0056 & 00FF |
| 448 | | ':maincpu' (FC1A4): unmapped program memory write to F004A = 0010 & 00FF |
| 449 | | ':maincpu' (FC1A9): unmapped program memory write to F004E = 0096 & 00FF |
| 450 | | ':maincpu' (FC1AE): unmapped program memory write to F004C = 0010 & 00FF |
| 451 | 487 | |
| 452 | | To boot a floppy put "bp fc5fa,1,{ip=c682;g}" and "bp fc6d7,1,{ip=c755;g}" |
| 453 | | into the debugger. |
| 488 | To boot a floppy put "bp fc5fa,1,{ip=c682;g}" and "bp fc6d7,1,{ip=c755;g}" |
| 489 | into the debugger. |
| 454 | 490 | |
| 491 | At NMI: f8008 must have bit 7 clear and bit 6 set (e008 on 8085) |
| 492 | f8009 must not equal 0x01 (e009 on 8085) |
| 493 | |
| 494 | 8085 sets f8008 to keyboard row 0 AND 0xf3 |
| 495 | " " f8009 to keyboard row 1 |
| 496 | |
| 455 | 497 | ****************************************************************************/ |
| 456 | 498 | |
| 457 | 499 | #include "emu.h" |
| r30642 | r30643 | |
| 543 | 585 | DECLARE_READ8_MEMBER(get_slave_ack); |
| 544 | 586 | DECLARE_WRITE8_MEMBER(dma_page_w); |
| 545 | 587 | |
| 588 | DECLARE_READ16_MEMBER(magic_r); |
| 589 | |
| 546 | 590 | DECLARE_WRITE_LINE_MEMBER(vsync_w); |
| 547 | 591 | DECLARE_WRITE_LINE_MEMBER(tc_w); |
| 548 | 592 | DECLARE_WRITE_LINE_MEMBER(hrq_w); |
| 549 | 593 | |
| 550 | 594 | MC6845_UPDATE_ROW(crtc_update_row); |
| 595 | MC6845_UPDATE_ROW(crtc_update_row_mono); |
| 551 | 596 | |
| 552 | 597 | DECLARE_DRIVER_INIT(fanucspmg); |
| 553 | 598 | |
| r30642 | r30643 | |
| 624 | 669 | m_dma_page = (data >> 2) & 0xf; |
| 625 | 670 | } |
| 626 | 671 | |
| 672 | READ16_MEMBER(fanucspmg_state::magic_r) |
| 673 | { |
| 674 | return 0x0041; // 31 = memory error |
| 675 | } |
| 676 | |
| 627 | 677 | static ADDRESS_MAP_START(maincpu_mem, AS_PROGRAM, 16, fanucspmg_state) |
| 628 | 678 | AM_RANGE(0x00000, 0x7ffff) AM_RAM // main RAM |
| 629 | | AM_RANGE(0x80000, 0x81fff) AM_RAM |
| 630 | 679 | |
| 631 | | // AM_RANGE(0x80000, 0x83fff) AM_READWRITE8(shared2_r, shared2_w, 0xffff) // Comms with HDD controller ? |
| 632 | | // AM_RANGE(0x88000, 0x88001) AM_READ(busy_r) |
| 633 | | // AM_RANGE(0x8c000, 0x8c001) AM_WRITE(signal_w) |
| 680 | AM_RANGE(0x80000, 0x81fff) AM_RAM // believed to be shared RAM with a CPU inside the Program File |
| 681 | AM_RANGE(0x88000, 0x88001) AM_NOP // Program File "ready" bit |
| 634 | 682 | |
| 635 | 683 | AM_RANGE(0xf0000, 0xf0003) AM_DEVREADWRITE8(PIC0_TAG, pic8259_device, read, write, 0x00ff) |
| 636 | 684 | AM_RANGE(0xf0004, 0xf0007) AM_DEVICE8(FDC_TAG, upd765a_device, map, 0x00ff) |
| r30642 | r30643 | |
| 644 | 692 | AM_RANGE(0xf001c, 0xf001d) AM_DEVREADWRITE8(USART3_TAG, i8251_device, data_r, data_w, 0x00ff) |
| 645 | 693 | AM_RANGE(0xf001e, 0xf001f) AM_DEVREADWRITE8(USART3_TAG, i8251_device, status_r, control_w, 0x00ff) |
| 646 | 694 | AM_RANGE(0xf0020, 0xf0029) AM_DEVREADWRITE8(DMAC_TAG, i8257_device, read, write, 0xffff) |
| 695 | AM_RANGE(0xf0042, 0xf0043) AM_READ(magic_r) |
| 647 | 696 | AM_RANGE(0xf0046, 0xf0047) AM_WRITE8(dma_page_w, 0x00ff) |
| 648 | 697 | AM_RANGE(0xf0048, 0xf004f) AM_DEVREADWRITE8(PIT1_TAG, pit8253_device, read, write, 0x00ff) |
| 649 | 698 | AM_RANGE(0xf2000, 0xf2003) AM_DEVREADWRITE8(PIC1_TAG, pic8259_device, read, write, 0x00ff) |
| r30642 | r30643 | |
| 700 | 749 | return 0xff; |
| 701 | 750 | } |
| 702 | 751 | |
| 703 | | // bit 1 seems to route to bit 7 of f0004 on the 8086 (signals the "LOAD" key pressed?) |
| 752 | // bit 1 is unknown |
| 704 | 753 | // bit 3 appears to enable vblank IRQs |
| 705 | 754 | WRITE8_MEMBER(fanucspmg_state::vbl_ctrl_w) |
| 706 | 755 | { |
| 707 | 756 | m_vbl_ctrl = data; |
| 708 | 757 | } |
| 709 | 758 | |
| 759 | // row 2: raising a bit toggles the corresponding bit at 500a |
| 760 | // row 3: raising a bit toggles the corresponding bit at 500b |
| 710 | 761 | WRITE8_MEMBER(fanucspmg_state::keyboard_row_w) |
| 711 | 762 | { |
| 712 | 763 | m_keyboard_row = data; |
| r30642 | r30643 | |
| 734 | 785 | AM_RANGE(0x5001, 0x5001) AM_DEVREADWRITE(CRTC_TAG, mc6845_device, register_r, register_w) |
| 735 | 786 | AM_RANGE(0x5008, 0x5008) AM_WRITE(keyboard_row_w) |
| 736 | 787 | AM_RANGE(0x5009, 0x5009) AM_READ(keyboard_r) |
| 737 | | AM_RANGE(0x500a, 0x500b) AM_WRITENOP // probably keyboard related, not sure how though |
| 788 | AM_RANGE(0x500a, 0x500b) AM_WRITENOP // keyboard rows 2 and 3 control what's written here. dip switches? |
| 738 | 789 | AM_RANGE(0x500c, 0x500c) AM_WRITE(vbl_ctrl_w) |
| 739 | 790 | AM_RANGE(0x500d, 0x500d) AM_WRITE(vram_bank_w) |
| 740 | 791 | AM_RANGE(0x500e, 0x500e) AM_READ(vblank_ack_r) |
| r30642 | r30643 | |
| 815 | 866 | } |
| 816 | 867 | } |
| 817 | 868 | |
| 869 | MC6845_UPDATE_ROW( fanucspmg_state::crtc_update_row_mono ) |
| 870 | { |
| 871 | UINT32 *p = &bitmap.pix32(y); |
| 872 | int i; |
| 873 | UINT8 *chargen = m_chargen->base(); |
| 874 | |
| 875 | for ( i = 0; i < x_count; i++ ) |
| 876 | { |
| 877 | UINT16 offset = ( ma + i ); |
| 878 | |
| 879 | if (m_video_ctrl & 0x02) |
| 880 | { |
| 881 | if (offset <= 0x5ff) |
| 882 | { |
| 883 | UINT8 chr = m_vram[offset + 0x600]; |
| 884 | UINT8 attr = m_vram[offset]; |
| 885 | UINT8 data = chargen[ chr + (ra * 256) ]; |
| 886 | UINT32 fg = 0xff00; |
| 887 | UINT32 bg = 0; |
| 888 | |
| 889 | *p++ = ( data & 0x01 ) ? fg : bg; |
| 890 | *p++ = ( data & 0x02 ) ? fg : bg; |
| 891 | *p++ = ( data & 0x04 ) ? fg : bg; |
| 892 | *p++ = ( data & 0x08 ) ? fg : bg; |
| 893 | *p++ = ( data & 0x10 ) ? fg : bg; |
| 894 | *p++ = ( data & 0x20 ) ? fg : bg; |
| 895 | *p++ = ( data & 0x40 ) ? fg : bg; |
| 896 | *p++ = ( data & 0x80 ) ? fg : bg; |
| 897 | } |
| 898 | } |
| 899 | else |
| 900 | { |
| 901 | *p++ = 0; |
| 902 | *p++ = 0; |
| 903 | *p++ = 0; |
| 904 | *p++ = 0; |
| 905 | *p++ = 0; |
| 906 | *p++ = 0; |
| 907 | *p++ = 0; |
| 908 | *p++ = 0; |
| 909 | } |
| 910 | } |
| 911 | } |
| 912 | |
| 818 | 913 | static SLOT_INTERFACE_START( fanuc_floppies ) |
| 819 | 914 | SLOT_INTERFACE( "525dd", FLOPPY_525_DD ) |
| 820 | 915 | SLOT_INTERFACE_END |
| r30642 | r30643 | |
| 875 | 970 | MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(fanucspmg_state, vsync_w)) |
| 876 | 971 | MACHINE_CONFIG_END |
| 877 | 972 | |
| 973 | static MACHINE_CONFIG_DERIVED( fanucspmgm, fanucspmg ) |
| 974 | MCFG_DEVICE_REMOVE( CRTC_TAG ) |
| 975 | |
| 976 | MCFG_MC6845_ADD( CRTC_TAG, HD6845, SCREEN_TAG, XTAL_8MHz/2) |
| 977 | MCFG_MC6845_SHOW_BORDER_AREA(false) |
| 978 | MCFG_MC6845_CHAR_WIDTH(8) |
| 979 | MCFG_MC6845_UPDATE_ROW_CB(fanucspmg_state, crtc_update_row_mono) |
| 980 | MCFG_MC6845_OUT_VSYNC_CB(WRITELINE(fanucspmg_state, vsync_w)) |
| 981 | MACHINE_CONFIG_END |
| 982 | |
| 878 | 983 | /* ROM definition */ |
| 879 | 984 | ROM_START( fanucspg ) |
| 880 | 985 | ROM_REGION(0x4000, MAINCPU_TAG, 0) |
| r30642 | r30643 | |
| 888 | 993 | ROM_LOAD( "a42_020a.30b", 0x000000, 0x008000, CRC(33eb5962) SHA1(1157a72089ff77e8db9a9a8fcd0f6c32a1374f56) ) |
| 889 | 994 | ROM_END |
| 890 | 995 | |
| 996 | ROM_START( fanucspgm ) |
| 997 | ROM_REGION(0x4000, MAINCPU_TAG, 0) |
| 998 | ROM_LOAD16_BYTE( "a25_001a.33e", 0x000000, 0x002000, CRC(81159267) SHA1(f5d53cc6e929f57e8c3747f80fc74d4b1643222d) ) |
| 999 | ROM_LOAD16_BYTE( "a25_002a.35e", 0x000001, 0x002000, CRC(4fb82c4d) SHA1(eb75e9a2d3c8e4ad56a74624ee8c52c785bd0da6) ) |
| 1000 | |
| 1001 | ROM_REGION(0x4000, SUBCPU_TAG, 0) |
| 1002 | ROM_LOAD( "a21_010f.17d", 0x000000, 0x002000, CRC(ef192717) SHA1(7fb3f7ca290d2437ae5956700f88c801018ce1cc) ) |
| 1003 | |
| 1004 | ROM_REGION(0x8000, CHARGEN_TAG, 0) |
| 1005 | ROM_LOAD( "a22_020b.5g", 0x000000, 0x002000, CRC(7b5f8e20) SHA1(9de607e541d8aad2d1ea56321270bb8466b16e3d) ) |
| 1006 | ROM_END |
| 1007 | |
| 891 | 1008 | /* Driver */ |
| 892 | | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 893 | | COMP( 1983, fanucspg, 0, 0, fanucspmg, fanucspmg, fanucspmg_state, fanucspmg, "Fanuc", "System P Model G", GAME_NOT_WORKING | GAME_NO_SOUND) |
| 1009 | /* YEAR NAME PARENT COMPAT MACHINE INPUT CLASS INIT COMPANY FULLNAME FLAGS */ |
| 1010 | COMP( 1983, fanucspg, 0, 0, fanucspmg, fanucspmg, fanucspmg_state, fanucspmg, "Fanuc", "System P Model G", GAME_NOT_WORKING | GAME_NO_SOUND) |
| 1011 | COMP( 1983, fanucspgm, fanucspg, 0, fanucspmgm, fanucspmg, fanucspmg_state, fanucspmg, "Fanuc", "System P Model G (monochrome)", GAME_NOT_WORKING | GAME_NO_SOUND) |