| Previous | 15994 Revisions | Next |
| r8991 Wednesday 1st September, 2010 at 10:13:18 UTC by Miodrag Milanović |
|---|
| Source code cleanup |
| [src/mess] | messdriv.c |
| [src/mess/devices] | cartslot.h cassette.c chd_cd.c coco_fdc.c flopdrv.c flopdrv.h |
| [src/mess/drivers] | 3do.c a2600.c a310.c a6809.c a7000.c abc80x.c ami1200.c apple2gs.c atari.c atm.c avigo.c bebox.c bmjr.c bml3.c c10.c c128.c c64.c casloopy.c cc10.c cgc7900.c cosmicos.c crvision.c czk80.c elwro800.c fmtowns.c gba.c jr100.c jr200.c k8915.c mac.c mccpm.c mes.c multi8.c mycom.c mz2500.c mz700.c nes.c ng_aes.c p112.c palm.c pasopia.c pc.c pc6001.c pcw.c pentagon.c phc25.c pocketc.c prestige.c psion.c psx.c pv2000.c px8.c pyl601.c radio86.c rex6000.c rt1715.c rx78.c samcoupe.c scorpion.c selz80.c smc777.c sord.c spectrum.c supracan.c systec.c tandy2k.c tk80bs.c trs80m2.c tutor.c v1050.c vectrex.c vic20.c vii.c x1.c zexall.c |
| [src/mess/formats] | d88_dsk.c timex_dck.c |
| [src/mess/includes] | einstein.h fmtowns.h nes.h spectrum.h x1.h |
| [src/mess/machine] | 3do.c amstrad.c apple1.c apple2gs.c apple3.c ataricrt.c b2m.c bebox.c c128.c c64.c cdic.h gamecom.c jupiter.c lisa.c lviv.c mac.c msx.c nes.c nes_ines.c nes_mmc.c nes_mmc.h nes_pcb.c osborne1.c pc.c pk8020.c pmd85.c rmnimbus.c sms.c special.c tf20.c vectrex.c wd17xx.c z80ne.c zx.c |
| [src/mess/osd/winui] | messui.c softwarelist.c |
| [src/mess/tools/imgtool/modules] | psion.c |
| [src/mess/tools/imgtool/windows] | attrdlg.c |
| [src/mess/tools/messtest] | testmess.c |
| [src/mess/video] | kc.c vic6567.c x68k.c |
| [src/osd/winui] | mui_opts.h mui_util.h properties.h resource.h splitters.h |
| [src/osd/winui/help] | reshelp.h |
| r8990 | r8991 | |
|---|---|---|
| 23 | 23 | void InitPropertyPage(HINSTANCE hInst, HWND hWnd, HICON hIcon, OPTIONS_TYPE opt_type, int folder_id, int game_num); |
| 24 | 24 | |
| 25 | 25 | #define PROPERTIES_PAGE 0 |
| 26 | #define AUDIT_PAGE 1 | |
| 26 | #define AUDIT_PAGE 1 | |
| 27 | 27 | |
| 28 | 28 | void InitPropertyPageToPage(HINSTANCE hInst, HWND hWnd, HICON hIcon, OPTIONS_TYPE opt_type, int folder_id, int game_num, int start_page); |
| 29 | 29 | void InitDefaultPropertyPage(HINSTANCE hInst, HWND hWnd); |
| r8990 | r8991 | |
|---|---|---|
| 410 | 410 | #define IDC_STATIC -1 |
| 411 | 411 | |
| 412 | 412 | // Next default values for new objects |
| 413 | // | |
| 413 | // | |
| 414 | 414 | #ifdef APSTUDIO_INVOKED |
| 415 | 415 | #ifndef APSTUDIO_READONLY_SYMBOLS |
| 416 | 416 | #define _APS_NO_MFC 1 |
| r8990 | r8991 | |
|---|---|---|
| 53 | 53 | |
| 54 | 54 | extern int *nSplitterOffset; |
| 55 | 55 | |
| 56 | typedef struct | |
| 56 | typedef struct | |
| 57 | 57 | { |
| 58 | 58 | double dPosition; |
| 59 | 59 | int nSplitterWindow; |
| r8990 | r8991 | |
|---|---|---|
| 36 | 36 | } OPTIONS_TYPE; |
| 37 | 37 | |
| 38 | 38 | |
| 39 | enum | |
| 39 | enum | |
| 40 | 40 | { |
| 41 | 41 | COLUMN_GAMES = 0, |
| 42 | 42 | COLUMN_ORIENTATION, |
| r8990 | r8991 | |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | 64 | /* Default input */ |
| 65 | enum | |
| 65 | enum | |
| 66 | 66 | { |
| 67 | 67 | INPUT_LAYOUT_STD, |
| 68 | 68 | INPUT_LAYOUT_HR, |
| r8990 | r8991 | |
| 105 | 105 | int x, y, width, height; |
| 106 | 106 | } AREA; |
| 107 | 107 | |
| 108 | typedef struct | |
| 108 | typedef struct | |
| 109 | 109 | { |
| 110 | 110 | char* screen; |
| 111 | 111 | char* aspect; |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | // Include the Microsoft Developer Studio generated Help ID include file. |
| 2 | 2 | // |
| 3 | 3 | #include "..\resource.hm" |
| 4 | #include "mame32.hm" | |
| No newline at end of file | ||
| 4 | #include "mame32.hm" |
| r8990 | r8991 | |
|---|---|---|
| 69 | 69 | |
| 70 | 70 | HICON win_extract_icon_utf8(HINSTANCE inst, const char* exefilename, UINT iconindex); |
| 71 | 71 | TCHAR* win_tstring_strdup(LPCTSTR str); |
| 72 | HANDLE win_create_file_utf8(const char* filename, DWORD desiredmode, DWORD sharemode, | |
| 73 | LPSECURITY_ATTRIBUTES securityattributes, DWORD creationdisposition, | |
| 74 | DWORD flagsandattributes, HANDLE templatehandle); | |
| 72 | HANDLE win_create_file_utf8(const char* filename, DWORD desiredmode, DWORD sharemode, | |
| 73 | LPSECURITY_ATTRIBUTES securityattributes, DWORD creationdisposition, | |
| 74 | DWORD flagsandattributes, HANDLE templatehandle); | |
| 75 | 75 | DWORD win_get_current_directory_utf8(DWORD bufferlength, char* buffer); |
| 76 | 76 | HANDLE win_find_first_file_utf8(const char* filename, LPWIN32_FIND_DATA findfiledata); |
| 77 | 77 |
| r8990 | r8991 | |
|---|---|---|
| 445 | 445 | { |
| 446 | 446 | strcpy(info->s, ((cassette_config *)device->static_config())->interface ); |
| 447 | 447 | } |
| 448 | break; | |
| 448 | break; | |
| 449 | 449 | } |
| 450 | 450 | } |
| 451 | 451 |
| r8990 | r8991 | |
|---|---|---|
| 382 | 382 | //devcb_call_write_line(&flopimg->out_dskchg_func, flopimg->dskchg); |
| 383 | 383 | |
| 384 | 384 | /* inform disk image of step operation so it can cache information */ |
| 385 | if (image->exists()) | |
| 385 | if (image->exists()) | |
| 386 | 386 | pDrive->track = pDrive->current_track; |
| 387 | 387 | |
| 388 | 388 | pDrive->id_index = 0; |
| r8990 | r8991 | |
|---|---|---|
| 13 | 13 | #define FLOPPY_TYPE_SONY 2 |
| 14 | 14 | |
| 15 | 15 | #define FLOPPY_DRIVE_2_8_INCH 1 |
| 16 | #define FLOPPY_DRIVE_3_INCH | |
| 16 | #define FLOPPY_DRIVE_3_INCH | |
| 17 | 17 | #define FLOPPY_DRIVE_3_5_INCH 3 |
| 18 | 18 | #define FLOPPY_DRIVE_5_25_INCH 4 |
| 19 | 19 | #define FLOPPY_DRIVE_8_INCH 5 |
| r8990 | r8991 | |
|---|---|---|
| 228 | 228 | static DEVICE_START(fdc) |
| 229 | 229 | { |
| 230 | 230 | fdc_t *fdc = get_token(device); |
| 231 | const fdc_hardware_type *hwtype = (const fdc_hardware_type *)downcast<const legacy_cart_slot_device_config_base *>(&device->baseconfig())->get_config_ptr(FDCINFO_PTR_HWTYPE); | |
| 231 | const fdc_hardware_type *hwtype = (const fdc_hardware_type *)downcast<const legacy_cart_slot_device_config_base *>(&device->baseconfig())->get_config_ptr(FDCINFO_PTR_HWTYPE); | |
| 232 | 232 | |
| 233 | 233 | /* initialize variables */ |
| 234 | 234 | memset(fdc, 0, sizeof(*fdc)); |
| r8990 | r8991 | |
| 631 | 631 | static MACHINE_CONFIG_FRAGMENT(dragon_fdc) |
| 632 | 632 | MDRV_WD179X_ADD(WD_TAG, coco_wd17xx_interface) |
| 633 | 633 | MACHINE_CONFIG_END |
| 634 | ||
| 634 | ||
| 635 | 635 | DEVICE_GET_INFO(coco_cartridge_pcb_fdc_dragon) |
| 636 | 636 | { |
| 637 | 637 | static const fdc_hardware_type hwtype = |
| r8990 | r8991 | |
|---|---|---|
| 160 | 160 | public: |
| 161 | 161 | INT64 get_config_int(UINT32 state) const { return get_legacy_config_int(state); } |
| 162 | 162 | genf *get_config_fct(UINT32 state) const { return get_legacy_config_fct(state); } |
| 163 | void *get_config_ptr(UINT32 state) const { return get_legacy_config_ptr(state); } | |
| 163 | void *get_config_ptr(UINT32 state) const { return get_legacy_config_ptr(state); } | |
| 164 | 164 | }; |
| 165 | 165 | |
| 166 | 166 |
| r8990 | r8991 | |
|---|---|---|
| 184 | 184 | strcpy(info->s, get_config_dev(device)->interface ); |
| 185 | 185 | } |
| 186 | 186 | break; |
| 187 | ||
| 187 | ||
| 188 | 188 | } |
| 189 | 189 | } |
| 190 | 190 |
| r8990 | r8991 | |
|---|---|---|
| 587 | 587 | { |
| 588 | 588 | const device_config_image_interface *dev; |
| 589 | 589 | for (bool gotone = s_config->mconfig->m_devicelist.first(dev); gotone; gotone = dev->next(dev)) |
| 590 | { | |
| 590 | { | |
| 591 | 591 | s = GetSelectedSoftware(drvindex, s_config->mconfig, dev); |
| 592 | 592 | if ((s != NULL) && !mame_stricmp(s, pszFilename)) { |
| 593 | 593 | device = dev; |
| r8990 | r8991 | |
| 610 | 610 | { |
| 611 | 611 | const device_config_image_interface *dev; |
| 612 | 612 | for (bool gotone = s_config->mconfig->m_devicelist.first(dev); gotone; gotone = dev->next(dev)) |
| 613 | { | |
| 613 | { | |
| 614 | 614 | s = GetSelectedSoftware(drvindex, s_config->mconfig, dev); |
| 615 | 615 | if (is_null_or_empty(s) && dev->uses_file_extension(file_extension)) { |
| 616 | 616 | device = dev; |
| r8990 | r8991 | |
|---|---|---|
| 44 | 44 | char publisher[MAX_PATH]; |
| 45 | 45 | char year[10]; |
| 46 | 46 | char full_name[MAX_PATH*2]; |
| 47 | ||
| 47 | ||
| 48 | 48 | char device[MAX_PATH]; |
| 49 | 49 | }; |
| 50 | 50 | |
| r8990 | r8991 | |
| 159 | 159 | strcpy(pInfo->year, pszYear); |
| 160 | 160 | strcpy(pInfo->device, pszDevice); |
| 161 | 161 | sprintf(pInfo->full_name,"%s:%s", pszListname,pszName); |
| 162 | ||
| 163 | 162 | |
| 163 | ||
| 164 | 164 | ppNewIndex = (file_info**)malloc((pPickerInfo->file_index_length + 1) * sizeof(*pPickerInfo->file_index)); |
| 165 | 165 | memcpy(ppNewIndex,pPickerInfo->file_index,pPickerInfo->file_index_length * sizeof(*pPickerInfo->file_index)); |
| 166 | 166 | if (pPickerInfo->file_index) free(pPickerInfo->file_index); |
| r8990 | r8991 | |
|---|---|---|
| 356 | 356 | /* get the path */ |
| 357 | 357 | fullpath = assemble_software_path(astring_alloc(), driver, current_command->u.image_args.filename); |
| 358 | 358 | |
| 359 | /* get the option name */ | |
| 359 | /* get the option name */ | |
| 360 | 360 | device_opt = device_config_image_interface::device_typename(current_command->u.image_args.device_ident.type); |
| 361 | 361 | |
| 362 | 362 | /* set the option */ |
| r8990 | r8991 | |
| 435 | 435 | |
| 436 | 436 | |
| 437 | 437 | void osd_init(running_machine *machine) |
| 438 | { | |
| 438 | { | |
| 439 | 439 | machine->add_notifier(MACHINE_NOTIFY_EXIT, testmess_exit); |
| 440 | 440 | target = render_target_alloc(machine, NULL, 0); |
| 441 | 441 | render_target_set_orientation(target, 0); |
| r8990 | r8991 | |
|---|---|---|
| 1 | #define WIN32_LEAN_AND_MEAN | |
| 1 | #define WIN32_LEAN_AND_MEAN | |
| 2 | 2 | #include <windows.h> |
| 3 | 3 | #include <windowsx.h> |
| 4 | 4 | #include <commctrl.h> |
| r8990 | r8991 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Psion Organiser II Datapack |
| 4 | 4 | |
| 5 | ||
| 5 | 08/18/2010 Sandro Ronco | |
| 6 | 6 | |
| 7 | 7 | Known file types: |
| 8 | 8 | 0x00 invalid record |
| r8990 | r8991 | |
|---|---|---|
| 296 | 296 | } |
| 297 | 297 | } |
| 298 | 298 | logerror("%s loaded cartridge '%s' size %dK\n", |
| 299 | image.device().machine->gamedrv->name, image.filename() , size/1024); | |
| 299 | image.device().machine->gamedrv->name, image.filename() , size/1024); | |
| 300 | 300 | return IMAGE_INIT_PASS; |
| 301 | 301 | } |
| 302 | 302 | |
| r8990 | r8991 | |
| 328 | 328 | address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 329 | 329 | UINT8 *cart = memory_region(space->machine, "user1"); |
| 330 | 330 | UINT8 *cpu = memory_region(space->machine, "maincpu"); |
| 331 | ||
| 331 | ||
| 332 | 332 | atari_machine_start(machine); |
| 333 | 333 | memory_install_write8_handler(space, 0xd500, 0xd5ff, 0, 0, xegs_bankswitch); |
| 334 | 334 | |
| r8990 | r8991 | |
| 349 | 349 | { |
| 350 | 350 | UINT32 size; |
| 351 | 351 | UINT8 *ptr = memory_region(image.device().machine, "user1"); |
| 352 | ||
| 352 | ||
| 353 | 353 | if (image.software_entry() == NULL) |
| 354 | 354 | { |
| 355 | 355 | // skip the header |
| r8990 | r8991 | |
|---|---|---|
| 724 | 724 | via_1_irq = 0; |
| 725 | 725 | apple3_update_memory(machine); |
| 726 | 726 | |
| 727 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(apple3_opbase, *machine)); | |
| 727 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(apple3_opbase, *machine)); | |
| 728 | 728 | } |
| r8990 | r8991 | |
|---|---|---|
| 232 | 232 | During booting the following things get written/read: |
| 233 | 233 | - write 03180000 to 03180000 (init reading sequence) |
| 234 | 234 | - 4 read actions from 03180000 bit#0, if lower bit is 1 0 1 0 then (expect to read 0x0a) |
| 235 | - read from 03180000 (init writing sequence) | |
| 236 | - write 0x0100 to shift register bit#0 | |
| 237 | - reset PON bit in CSTATBITS | |
| 235 | - read from 03180000 (init writing sequence) | |
| 236 | - write 0x0100 to shift register bit#0 | |
| 237 | - reset PON bit in CSTATBITS | |
| 238 | 238 | - wait a little while |
| 239 | 239 | - read from 03180000 |
| 240 | - write 0x0200 to shift register bit#0 | |
| 241 | - write 0x0002 to shift register bit#1 | |
| 242 | - dummy write to 03180000 | |
| 243 | - read from shift register bits #0 and #1. | |
| 244 | - check if data read equals 0x44696167 (=Diag) If so, jump 302196c in default bios | |
| 245 | - dummy read from shift register | |
| 246 | - write 0x0300 to shift register bit #0 | |
| 247 | - dummy write to shift register | |
| 240 | - write 0x0200 to shift register bit#0 | |
| 241 | - write 0x0002 to shift register bit#1 | |
| 242 | - dummy write to 03180000 | |
| 243 | - read from shift register bits #0 and #1. | |
| 244 | - check if data read equals 0x44696167 (=Diag) If so, jump 302196c in default bios | |
| 245 | - dummy read from shift register | |
| 246 | - write 0x0300 to shift register bit #0 | |
| 247 | - dummy write to shift register | |
| 248 | 248 | - read data from shift register bit #0. |
| 249 | 249 | - xor that data with 0x07ff |
| 250 | ||
| 250 | - write that data & 0x00ff | 0x4000 to the shift register | |
| 251 | 251 | 3022630 |
| 252 | 252 | */ |
| 253 | 253 |
| r8990 | r8991 | |
|---|---|---|
| 670 | 670 | |
| 671 | 671 | cartridge2 = memory_region(image.device().machine, "cart2"); |
| 672 | 672 | |
| 673 | // | |
| 673 | // if (image.software_entry() == NULL) | |
| 674 | 674 | filesize = image.length(); |
| 675 | // else | |
| 676 | // filesize = image.get_software_region_length("rom"); | |
| 675 | // else | |
| 676 | // filesize = image.get_software_region_length("rom"); | |
| 677 | 677 | |
| 678 | 678 | switch(filesize) |
| 679 | 679 | { |
| r8990 | r8991 | |
| 689 | 689 | return IMAGE_INIT_FAIL; |
| 690 | 690 | } |
| 691 | 691 | |
| 692 | // | |
| 692 | // if (image.software_entry() == NULL) | |
| 693 | 693 | { |
| 694 | 694 | if (image.fread( cartridge2 + load_offset, filesize) != filesize) |
| 695 | 695 | { |
| r8990 | r8991 | |
| 697 | 697 | return IMAGE_INIT_FAIL; |
| 698 | 698 | } |
| 699 | 699 | } |
| 700 | // else | |
| 701 | // memcpy(cartridge2 + load_offset, image.get_software_region("rom"), filesize); | |
| 700 | // else | |
| 701 | // memcpy(cartridge2 + load_offset, image.get_software_region("rom"), filesize); | |
| 702 | 702 | |
| 703 | 703 | if (filesize < 0x010000) { memcpy(cartridge2 + 0x008000, cartridge2, 0x008000); } /* ->64KB */ |
| 704 | 704 | if (filesize < 0x020000) { memcpy(cartridge2 + 0x010000, cartridge2, 0x010000); } /* ->128KB */ |
| r8990 | r8991 | |
|---|---|---|
| 216 | 216 | |
| 217 | 217 | if (state->b2m_drive!=drive) { |
| 218 | 218 | wd17xx_set_drive(state->fdc,drive); |
| 219 | floppy_mon_w(floppy_get_device(device->machine, 0), 0); | |
| 219 | floppy_mon_w(floppy_get_device(device->machine, 0), 0); | |
| 220 | 220 | floppy_drive_set_ready_state(floppy_get_device(device->machine, 0), 1, 1); |
| 221 | 221 | state->b2m_drive = drive; |
| 222 | 222 | } |
| r8990 | r8991 | |
|---|---|---|
| 945 | 945 | |
| 946 | 946 | timer_set(machine, attotime_zero, NULL, 0, setup_machine_state); |
| 947 | 947 | |
| 948 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(pmd85_opbaseoverride, *machine)); | |
| 948 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(pmd85_opbaseoverride, *machine)); | |
| 949 | 949 | } |
| r8990 | r8991 | |
|---|---|---|
| 1108 | 1108 | |
| 1109 | 1109 | c64_memory[0x000] = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM)->read_byte(0); |
| 1110 | 1110 | c64_memory[0x001] = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM)->read_byte(1); |
| 1111 | ||
| 1111 | ||
| 1112 | 1112 | } |
| 1113 | 1113 | |
| 1114 | 1114 | UINT8 c128_m6510_port_read( running_device *device, UINT8 direction ) |
| r8990 | r8991 | |
|---|---|---|
| 467 | 467 | floppy_install_load_proc(floppy_get_device(machine, drive), osborne1_load_proc); |
| 468 | 468 | } |
| 469 | 469 | |
| 470 | space->set_direct_update_handler(direct_update_delegate_create_static(osborne1_opbase, *machine)); | |
| 470 | space->set_direct_update_handler(direct_update_delegate_create_static(osborne1_opbase, *machine)); | |
| 471 | 471 | } |
| 472 | 472 | |
| 473 | 473 |
| r8990 | r8991 | |
|---|---|---|
| 1205 | 1205 | multiface_flags &= ~(MULTIFACE_VISIBLE|MULTIFACE_STOP_BUTTON_PRESSED); |
| 1206 | 1206 | |
| 1207 | 1207 | /* clear op base override */ |
| 1208 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(amstrad_default, *machine)); | |
| 1208 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(amstrad_default, *machine)); | |
| 1209 | 1209 | } |
| 1210 | 1210 | |
| 1211 | 1211 | return pc; |
| r8990 | r8991 | |
|---|---|---|
| 523 | 523 | else |
| 524 | 524 | { |
| 525 | 525 | /* Delay the INTRQ 3 byte times because we need to read two CRC bytes and |
| 526 | ||
| 526 | compare them with a calculated CRC */ | |
| 527 | 527 | wd17xx_complete_command(device, DELAY_DATADONE); |
| 528 | 528 | |
| 529 | 529 | if (VERBOSE) |
| r8990 | r8991 | |
|---|---|---|
| 29 | 29 | UINT8 *BIOS; |
| 30 | 30 | UINT8 *mapper_ram; |
| 31 | 31 | UINT8 mapper[4]; |
| 32 | // we are going to use 1-6, same as bank numbers. Notice, though, that most mappers | |
| 33 | // only work on 16K banks and, hence, banks 4-6 are not always directly set | |
| 32 | // we are going to use 1-6, same as bank numbers. Notice, though, that most mappers | |
| 33 | // only work on 16K banks and, hence, banks 4-6 are not always directly set | |
| 34 | 34 | // (they often use bank3 + 0x2000 and bank5 + 0x2000) |
| 35 | UINT8 *banking_bios[7]; | |
| 35 | UINT8 *banking_bios[7]; | |
| 36 | 36 | UINT8 *banking_cart[7]; |
| 37 | 37 | UINT8 *banking_none[7]; |
| 38 | 38 | UINT8 gg_sio[5]; |
| r8990 | r8991 | |
| 770 | 770 | { |
| 771 | 771 | UINT8 rom_page_count = sms_state.cartridge[sms_state.current_cartridge].size / 0x2000; |
| 772 | 772 | int page = (rom_page_count > 0) ? data % rom_page_count : 0; |
| 773 | ||
| 773 | ||
| 774 | 774 | if (!sms_state.cartridge[sms_state.current_cartridge].ROM) |
| 775 | 775 | return; |
| 776 | ||
| 776 | ||
| 777 | 777 | switch (offset & 3) |
| 778 | 778 | { |
| 779 | 779 | case 0: |
| r8990 | r8991 | |
| 833 | 833 | |
| 834 | 834 | static READ8_HANDLER( sms_kor_nobank_r ) |
| 835 | 835 | { |
| 836 | // | |
| 836 | // printf("read %x\n", offset); | |
| 837 | 837 | return space->read_byte(0xdffc + offset); |
| 838 | 838 | } |
| 839 | 839 | |
| r8990 | r8991 | |
| 841 | 841 | { |
| 842 | 842 | UINT8 *SOURCE_BIOS; |
| 843 | 843 | UINT8 *SOURCE = NULL; |
| 844 | ||
| 844 | ||
| 845 | 845 | space->write_byte(0xdffc + offset, data); |
| 846 | 846 | sms_state.mapper[offset] = data; |
| 847 | 847 | |
| r8990 | r8991 | |
| 851 | 851 | SOURCE_BIOS = sms_state.BIOS + ((sms_state.bios_page_count > 0) ? data % sms_state.bios_page_count : 0) * 0x4000; |
| 852 | 852 | else |
| 853 | 853 | SOURCE_BIOS = sms_state.banking_none[1]; |
| 854 | ||
| 854 | ||
| 855 | 855 | if (sms_state.bios_port & IO_BIOS_ROM || (sms_state.is_gamegear && sms_state.BIOS == NULL)) |
| 856 | 856 | return; |
| 857 | 857 | else |
| r8990 | r8991 | |
| 861 | 861 | SOURCE = SOURCE_BIOS; |
| 862 | 862 | } |
| 863 | 863 | |
| 864 | // | |
| 864 | // printf("write %x, %x\n", offset, data); | |
| 865 | 865 | |
| 866 | 866 | switch (offset) |
| 867 | 867 | { |
| r8990 | r8991 | |
| 876 | 876 | } |
| 877 | 877 | } |
| 878 | 878 | break; |
| 879 | ||
| 879 | ||
| 880 | 880 | case 1: /* Select 16k ROM bank for 0400-3FFF */ |
| 881 | 881 | sms_state.banking_bios[2] = SOURCE_BIOS + 0x0400; |
| 882 | 882 | memory_set_bankptr(space->machine, "bank2", SOURCE + 0x0400); |
| 883 | 883 | break; |
| 884 | ||
| 884 | ||
| 885 | 885 | case 2: /* Select 16k ROM bank for 4000-7FFF */ |
| 886 | 886 | sms_state.banking_bios[3] = SOURCE_BIOS; |
| 887 | 887 | memory_set_bankptr(space->machine, "bank3", SOURCE); |
| 888 | 888 | memory_set_bankptr(space->machine, "bank4", SOURCE + 0x2000); |
| 889 | 889 | break; |
| 890 | ||
| 890 | ||
| 891 | 891 | case 3: /* Select 16k ROM bank for 8000-BFFF */ |
| 892 | 892 | sms_state.banking_bios[5] = SOURCE_BIOS; |
| 893 | 893 | if (!(sms_state.mapper[0] & 0x08)) /* is RAM disabled? */ |
| r8990 | r8991 | |
| 1179 | 1179 | } |
| 1180 | 1180 | |
| 1181 | 1181 | #ifdef UNUSED_FUNCTION |
| 1182 | // For the moment we switch to a different detection routine which allows to detect | |
| 1183 | // in a single run Codemasters mapper, Korean mapper (including Jang Pung 3 which | |
| 1182 | // For the moment we switch to a different detection routine which allows to detect | |
| 1183 | // in a single run Codemasters mapper, Korean mapper (including Jang Pung 3 which | |
| 1184 | 1184 | // uses a diff signature then the one below here) and Zemina mapper (used by Wonsiin, etc.). |
| 1185 | 1185 | // I leave these here to document alt. detection routines and in the case these functions |
| 1186 | 1186 | // can be updated |
| r8990 | r8991 | |
| 1460 | 1460 | { i += 2; cA000++; continue; } |
| 1461 | 1461 | } |
| 1462 | 1462 | } |
| 1463 | ||
| 1463 | ||
| 1464 | 1464 | LOG(("Mapper test: c002 = %d, c8000 = %d, cA000 = %d, cFFFF = %d\n", c0002, c8000, cA000, cFFFF)); |
| 1465 | ||
| 1465 | ||
| 1466 | 1466 | // 2 is a security measure, although tests on existing ROM showed it was not needed |
| 1467 | 1467 | if (c0002 > cFFFF + 2 || (c0002 > 0 && cFFFF == 0)) |
| 1468 | 1468 | sms_state.cartridge[index].features |= CF_KOREAN_ZEMINA_MAPPER; |
| r8990 | r8991 | |
| 1470 | 1470 | sms_state.cartridge[index].features |= CF_CODEMASTERS_MAPPER; |
| 1471 | 1471 | else if (cA000 > cFFFF + 2 || (cA000 > 0 && cFFFF == 0)) |
| 1472 | 1472 | sms_state.cartridge[index].features |= CF_KOREAN_MAPPER; |
| 1473 | ||
| 1473 | ||
| 1474 | 1474 | } |
| 1475 | ||
| 1475 | ||
| 1476 | 1476 | /* Check for special SMS Compatibility mode gamegear cartridges */ |
| 1477 | 1477 | if (sms_state.is_gamegear && image.software_entry() == NULL) // not sure about how to handle this with softlists |
| 1478 | 1478 | { |
| r8990 | r8991 | |
| 1510 | 1510 | address_space *program = cputag_get_address_space(image.device().machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 1511 | 1511 | memory_install_readwrite8_handler(program, 0xfffc, 0xffff, 0, 0, &sms_kor_nobank_r, &sms_kor_nobank_w); |
| 1512 | 1512 | } |
| 1513 | ||
| 1513 | ||
| 1514 | 1514 | LOG(("Cart Features: %x\n", sms_state.cartridge[index].features)); |
| 1515 | 1515 | |
| 1516 | 1516 | /* Load battery backed RAM, if available */ |
| r8990 | r8991 | |
| 1609 | 1609 | |
| 1610 | 1610 | if (sms_state.cartridge[sms_state.current_cartridge].features & CF_KOREAN_ZEMINA_MAPPER) |
| 1611 | 1611 | memory_install_write8_handler(space, 0x0000, 0x0003, 0, 0, sms_korean_zemina_banksw_w); |
| 1612 | ||
| 1612 | ||
| 1613 | 1613 | if (sms_state.cartridge[sms_state.current_cartridge].features & CF_GG_SMS_MODE) |
| 1614 | 1614 | sms_vdp_set_ggsmsmode(smsvdp, 1); |
| 1615 | 1615 |
| r8990 | r8991 | |
|---|---|---|
| 621 | 621 | int nes_get_pcb_id( running_machine *machine, const char *feature ) |
| 622 | 622 | { |
| 623 | 623 | const nes_pcb *pcb = nes_pcb_lookup(feature); |
| 624 | ||
| 624 | ||
| 625 | 625 | if (pcb == NULL) |
| 626 | 626 | fatalerror("Unimplemented PCB type %s\n", feature); |
| 627 | ||
| 627 | ||
| 628 | 628 | return pcb->pcb_id; |
| 629 | 629 | } |
| 630 | 630 | |
| r8990 | r8991 | |
| 668 | 668 | } |
| 669 | 669 | |
| 670 | 670 | /************************************************************* |
| 671 | ||
| 671 | ||
| 672 | 672 | NROM board emulation |
| 673 | ||
| 673 | ||
| 674 | 674 | Games: Mario Bros., Super Mario Bros., Tennis and most of |
| 675 | 675 | the first generation games |
| 676 | ||
| 676 | ||
| 677 | 677 | iNES: mapper 0 |
| 678 | ||
| 678 | ||
| 679 | 679 | In MESS: Supported, no need of specific handlers or IRQ |
| 680 | ||
| 680 | ||
| 681 | 681 | *************************************************************/ |
| 682 | 682 | |
| 683 | 683 | /************************************************************* |
| 684 | 684 | |
| 685 | 685 | UxROM board emulation |
| 686 | ||
| 687 | Games: Castlevania, Dragon Quest II, Duck Tales, MegaMan, | |
| 686 | ||
| 687 | Games: Castlevania, Dragon Quest II, Duck Tales, MegaMan, | |
| 688 | 688 | Metal Gear |
| 689 | 689 | |
| 690 | 690 | writes to 0x8000-0xffff change PRG 16K lower banks |
| r8990 | r8991 | |
| 753 | 753 | /************************************************************* |
| 754 | 754 | |
| 755 | 755 | CNROM board emulation |
| 756 | ||
| 756 | ||
| 757 | 757 | Games: B-Wings, Mighty Bomb Jack, Seicross, Spy vs. Spy, |
| 758 | 758 | Adventure Island, Flipull, Friday 13th, GeGeGe no |
| 759 | 759 | Kitarou, Ghostbusters, Gradius, Hokuto no Ken, Milon's |
| r8990 | r8991 | |
| 763 | 763 | |
| 764 | 764 | missing BC? |
| 765 | 765 | |
| 766 | iNES: mappers 3 & 185 (the latter for games using Pins as | |
| 766 | iNES: mappers 3 & 185 (the latter for games using Pins as | |
| 767 | 767 | protection) |
| 768 | 768 | |
| 769 | 769 | Notice that BANDAI_PT554 board (Aerobics Studio) uses very |
| r8990 | r8991 | |
| 1449 | 1449 | iNES: mapper 118 |
| 1450 | 1450 | |
| 1451 | 1451 | In MESS: Supported. It also uses mmc3_irq. |
| 1452 | ||
| 1452 | ||
| 1453 | 1453 | *************************************************************/ |
| 1454 | 1454 | |
| 1455 | 1455 | static void txsrom_set_mirror( running_machine *machine ) |
| r8990 | r8991 | |
| 1480 | 1480 | static WRITE8_HANDLER( txsrom_w ) |
| 1481 | 1481 | { |
| 1482 | 1482 | LOG_MMC(("txsrom_w, offset: %04x, data: %02x\n", offset, data)); |
| 1483 | ||
| 1483 | ||
| 1484 | 1484 | switch (offset & 0x6001) |
| 1485 | 1485 | { |
| 1486 | 1486 | case 0x2000: |
| 1487 | 1487 | break; |
| 1488 | ||
| 1488 | ||
| 1489 | 1489 | default: |
| 1490 | 1490 | txrom_w(space, offset, data); |
| 1491 | 1491 | break; |
| r8990 | r8991 | |
| 1497 | 1497 | TQROM (MMC3 based) board emulation |
| 1498 | 1498 | |
| 1499 | 1499 | Games: Pin Bot, High Speed |
| 1500 | ||
| 1500 | ||
| 1501 | 1501 | iNES: mapper 119 |
| 1502 | 1502 | |
| 1503 | 1503 | In MESS: Supported. It also uses mmc3_irq. |
| 1504 | ||
| 1504 | ||
| 1505 | 1505 | *************************************************************/ |
| 1506 | 1506 | |
| 1507 | 1507 | static void tqrom_set_chr( running_machine *machine ) |
| r8990 | r8991 | |
| 1636 | 1636 | case 0: // 8k banks |
| 1637 | 1637 | chr8(machine, state->mmc5_vrom_regA[7] & 0xff, CHRROM); |
| 1638 | 1638 | break; |
| 1639 | ||
| 1639 | ||
| 1640 | 1640 | case 1: // 4k banks |
| 1641 | 1641 | chr4_0(machine, state->mmc5_vrom_regA[3] & 0xff, CHRROM); |
| 1642 | 1642 | chr4_4(machine, state->mmc5_vrom_regA[7] & 0xff, CHRROM); |
| 1643 | 1643 | break; |
| 1644 | ||
| 1644 | ||
| 1645 | 1645 | case 2: // 2k banks |
| 1646 | 1646 | chr2_0(machine, state->mmc5_vrom_regA[1], CHRROM); |
| 1647 | 1647 | chr2_2(machine, state->mmc5_vrom_regA[3], CHRROM); |
| 1648 | 1648 | chr2_4(machine, state->mmc5_vrom_regA[5], CHRROM); |
| 1649 | 1649 | chr2_6(machine, state->mmc5_vrom_regA[7], CHRROM); |
| 1650 | 1650 | break; |
| 1651 | ||
| 1651 | ||
| 1652 | 1652 | case 3: // 1k banks |
| 1653 | 1653 | chr1_0(machine, state->mmc5_vrom_regA[0], CHRROM); |
| 1654 | 1654 | chr1_1(machine, state->mmc5_vrom_regA[1], CHRROM); |
| r8990 | r8991 | |
| 1670 | 1670 | case 0: // 8k banks |
| 1671 | 1671 | chr8(machine, state->mmc5_vrom_regB[3] & 0xff, CHRROM); |
| 1672 | 1672 | break; |
| 1673 | ||
| 1673 | ||
| 1674 | 1674 | case 1: // 4k banks |
| 1675 | 1675 | chr4_0(machine, state->mmc5_vrom_regB[3] & 0xff, CHRROM); |
| 1676 | 1676 | chr4_4(machine, state->mmc5_vrom_regB[3] & 0xff, CHRROM); |
| 1677 | 1677 | break; |
| 1678 | ||
| 1678 | ||
| 1679 | 1679 | case 2: // 2k banks |
| 1680 | 1680 | chr2_0(machine, state->mmc5_vrom_regB[1], CHRROM); |
| 1681 | 1681 | chr2_2(machine, state->mmc5_vrom_regB[3], CHRROM); |
| 1682 | 1682 | chr2_4(machine, state->mmc5_vrom_regB[1], CHRROM); |
| 1683 | 1683 | chr2_6(machine, state->mmc5_vrom_regB[3], CHRROM); |
| 1684 | 1684 | break; |
| 1685 | ||
| 1685 | ||
| 1686 | 1686 | case 3: // 1k banks |
| 1687 | 1687 | chr1_0(machine, state->mmc5_vrom_regB[0], CHRROM); |
| 1688 | 1688 | chr1_1(machine, state->mmc5_vrom_regB[1], CHRROM); |
| r8990 | r8991 | |
| 1701 | 1701 | { |
| 1702 | 1702 | nes_state *state = machine->driver_data<nes_state>(); |
| 1703 | 1703 | int bank1, bank2, bank3; |
| 1704 | ||
| 1704 | ||
| 1705 | 1705 | switch (state->mmc5_prg_mode) |
| 1706 | 1706 | { |
| 1707 | 1707 | case 0: // 32k banks |
| 1708 | 1708 | prg32(machine, state->mmc5_prg_regs[3] >> 2); |
| 1709 | 1709 | break; |
| 1710 | ||
| 1710 | ||
| 1711 | 1711 | case 1: // 16k banks |
| 1712 | 1712 | // printf("problema 1: %x\n", state->mmc5_prg_regs[1]); |
| 1713 | 1713 | bank1 = state->mmc5_prg_regs[1]; |
| 1714 | ||
| 1714 | ||
| 1715 | 1715 | if (!BIT(bank1, 7)) |
| 1716 | 1716 | { |
| 1717 | 1717 | state->prg_bank[0] = state->prg_chunks + (bank1 & 0x06); |
| r8990 | r8991 | |
| 1721 | 1721 | } |
| 1722 | 1722 | else |
| 1723 | 1723 | prg16_89ab(machine, bank1 >> 1); |
| 1724 | ||
| 1724 | ||
| 1725 | 1725 | prg16_cdef(machine, state->mmc5_prg_regs[3] >> 1); |
| 1726 | 1726 | break; |
| 1727 | ||
| 1727 | ||
| 1728 | 1728 | case 2: // 16k-8k banks |
| 1729 | 1729 | // printf("problema 2: %x %x\n", state->mmc5_prg_regs[1], state->mmc5_prg_regs[2]); |
| 1730 | 1730 | bank1 = state->mmc5_prg_regs[1]; |
| 1731 | 1731 | bank3 = state->mmc5_prg_regs[2]; |
| 1732 | ||
| 1732 | ||
| 1733 | 1733 | if (!BIT(bank1, 7)) |
| 1734 | 1734 | { |
| 1735 | 1735 | state->prg_bank[0] = state->prg_chunks + (bank1 & 0x06); |
| r8990 | r8991 | |
| 1739 | 1739 | } |
| 1740 | 1740 | else |
| 1741 | 1741 | prg16_89ab(machine, (bank1 & 0x7f) >> 1); |
| 1742 | ||
| 1742 | ||
| 1743 | 1743 | if (!BIT(bank3, 7)) |
| 1744 | 1744 | { |
| 1745 | 1745 | state->prg_bank[2] = state->prg_chunks + (bank3 & 0x07); |
| r8990 | r8991 | |
| 1747 | 1747 | } |
| 1748 | 1748 | else |
| 1749 | 1749 | prg8_cd(machine, bank3 & 0x7f); |
| 1750 | ||
| 1750 | ||
| 1751 | 1751 | prg8_ef(machine, state->mmc5_prg_regs[3]); |
| 1752 | 1752 | break; |
| 1753 | ||
| 1753 | ||
| 1754 | 1754 | case 3: // 8k banks |
| 1755 | 1755 | // printf("problema 3: %x %x %x\n", state->mmc5_prg_regs[0], state->mmc5_prg_regs[1], state->mmc5_prg_regs[2]); |
| 1756 | 1756 | bank1 = state->mmc5_prg_regs[0]; |
| 1757 | 1757 | bank2 = state->mmc5_prg_regs[1]; |
| 1758 | 1758 | bank3 = state->mmc5_prg_regs[2]; |
| 1759 | ||
| 1759 | ||
| 1760 | 1760 | if (!BIT(bank1, 7)) |
| 1761 | 1761 | { |
| 1762 | 1762 | state->prg_bank[0] = state->prg_chunks + (bank1 & 0x07); |
| r8990 | r8991 | |
| 1764 | 1764 | } |
| 1765 | 1765 | else |
| 1766 | 1766 | prg8_89(machine, bank1 & 0x7f); |
| 1767 | ||
| 1767 | ||
| 1768 | 1768 | if (!BIT(bank2, 7)) |
| 1769 | 1769 | { |
| 1770 | 1770 | state->prg_bank[1] = state->prg_chunks + (bank2 & 0x07); |
| r8990 | r8991 | |
| 1772 | 1772 | } |
| 1773 | 1773 | else |
| 1774 | 1774 | prg8_ab(machine, bank2 & 0x7f); |
| 1775 | ||
| 1775 | ||
| 1776 | 1776 | if (!BIT(bank3, 7)) |
| 1777 | 1777 | { |
| 1778 | 1778 | state->prg_bank[2] = state->prg_chunks + (bank3 & 0x07); |
| r8990 | r8991 | |
| 1780 | 1780 | } |
| 1781 | 1781 | else |
| 1782 | 1782 | prg8_cd(machine, bank3 & 0x7f); |
| 1783 | ||
| 1783 | ||
| 1784 | 1784 | prg8_ef(machine, state->mmc5_prg_regs[3]); |
| 1785 | 1785 | break; |
| 1786 | 1786 | } |
| r8990 | r8991 | |
| 1793 | 1793 | static void mmc5_irq( running_device *device, int scanline, int vblank, int blanked ) |
| 1794 | 1794 | { |
| 1795 | 1795 | nes_state *state = device->machine->driver_data<nes_state>(); |
| 1796 | ||
| 1796 | ||
| 1797 | 1797 | #if 1 |
| 1798 | 1798 | if (scanline == 0) |
| 1799 | 1799 | state->IRQ_status |= 0x40; |
| 1800 | 1800 | else if (scanline > PPU_BOTTOM_VISIBLE_SCANLINE) |
| 1801 | 1801 | state->IRQ_status &= ~0x40; |
| 1802 | 1802 | #endif |
| 1803 | ||
| 1803 | ||
| 1804 | 1804 | if (scanline == state->IRQ_count) |
| 1805 | 1805 | { |
| 1806 | 1806 | if (state->IRQ_enable) |
| 1807 | 1807 | cpu_set_input_line(state->maincpu, M6502_IRQ_LINE, HOLD_LINE); |
| 1808 | ||
| 1808 | ||
| 1809 | 1809 | state->IRQ_status = 0xff; |
| 1810 | 1810 | } |
| 1811 | ||
| 1811 | ||
| 1812 | 1812 | /* FIXME: this is ok, but then we would need to update them again when we have the BG Hblank |
| 1813 | 1813 | I leave it commented out until the PPU is updated for this */ |
| 1814 | 1814 | // if (ppu2c0x_is_sprite_8x16(state->ppu) || state->mmc5_last_chr_a) |
| r8990 | r8991 | |
| 1843 | 1843 | { |
| 1844 | 1844 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 1845 | 1845 | int retVal; |
| 1846 | ||
| 1846 | ||
| 1847 | 1847 | /* $5c00 - $5fff: extended videoram attributes */ |
| 1848 | 1848 | if ((offset >= 0x1b00) && (offset <= 0x1eff)) |
| 1849 | 1849 | { |
| 1850 | 1850 | return state->mapper_ram[offset - 0x1b00]; |
| 1851 | 1851 | } |
| 1852 | ||
| 1852 | ||
| 1853 | 1853 | switch (offset) |
| 1854 | 1854 | { |
| 1855 | 1855 | case 0x1104: /* $5204 */ |
| r8990 | r8991 | |
| 1863 | 1863 | state->IRQ_status &= ~0x80; |
| 1864 | 1864 | return retVal; |
| 1865 | 1865 | #endif |
| 1866 | ||
| 1866 | ||
| 1867 | 1867 | case 0x1105: /* $5205 */ |
| 1868 | 1868 | return (state->mult1 * state->mult2) & 0xff; |
| 1869 | 1869 | case 0x1106: /* $5206 */ |
| 1870 | 1870 | return ((state->mult1 * state->mult2) & 0xff00) >> 8; |
| 1871 | ||
| 1871 | ||
| 1872 | 1872 | default: |
| 1873 | 1873 | logerror("** MMC5 uncaught read, offset: %04x\n", offset + 0x4100); |
| 1874 | 1874 | return 0x00; |
| r8990 | r8991 | |
| 1879 | 1879 | static WRITE8_HANDLER( exrom_l_w ) |
| 1880 | 1880 | { |
| 1881 | 1881 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 1882 | ||
| 1882 | ||
| 1883 | 1883 | // LOG_MMC(("Mapper 5 write, offset: %04x, data: %02x\n", offset + 0x4100, data)); |
| 1884 | 1884 | /* Send $5000-$5015 to the sound chip */ |
| 1885 | 1885 | if ((offset >= 0xf00) && (offset <= 0xf15)) |
| r8990 | r8991 | |
| 1887 | 1887 | nes_psg_w(state->sound, offset & 0x1f, data); |
| 1888 | 1888 | return; |
| 1889 | 1889 | } |
| 1890 | ||
| 1890 | ||
| 1891 | 1891 | /* $5c00 - $5fff: extended videoram attributes */ |
| 1892 | 1892 | if ((offset >= 0x1b00) && (offset <= 0x1eff)) |
| 1893 | 1893 | { |
| r8990 | r8991 | |
| 1895 | 1895 | state->mapper_ram[offset - 0x1b00] = data; |
| 1896 | 1896 | return; |
| 1897 | 1897 | } |
| 1898 | ||
| 1898 | ||
| 1899 | 1899 | switch (offset) |
| 1900 | 1900 | { |
| 1901 | 1901 | case 0x1000: /* $5100 */ |
| r8990 | r8991 | |
| 1903 | 1903 | // mmc5_update_prg(space->machine); |
| 1904 | 1904 | LOG_MMC(("MMC5 rom bank mode: %02x\n", data)); |
| 1905 | 1905 | break; |
| 1906 | ||
| 1906 | ||
| 1907 | 1907 | case 0x1001: /* $5101 */ |
| 1908 | 1908 | state->mmc5_chr_mode = data & 0x03; |
| 1909 | 1909 | // update chr |
| 1910 | 1910 | LOG_MMC(("MMC5 vrom bank mode: %02x\n", data)); |
| 1911 | 1911 | break; |
| 1912 | ||
| 1912 | ||
| 1913 | 1913 | case 0x1002: /* $5102 */ |
| 1914 | 1914 | if (data == 0x02) |
| 1915 | 1915 | state->MMC5_vram_protect |= 1; |
| r8990 | r8991 | |
| 1924 | 1924 | state->MMC5_vram_protect = 0; |
| 1925 | 1925 | LOG_MMC(("MMC5 vram protect 2: %02x\n", data)); |
| 1926 | 1926 | break; |
| 1927 | ||
| 1927 | ||
| 1928 | 1928 | case 0x1004: /* $5104 - Extra VRAM (EXRAM) control */ |
| 1929 | 1929 | state->mmc5_vram_control = data & 0x03; |
| 1930 | 1930 | // update render |
| 1931 | 1931 | mmc5_update_render_mode(space->machine); |
| 1932 | 1932 | LOG_MMC(("MMC5 exram control: %02x\n", data)); |
| 1933 | 1933 | break; |
| 1934 | ||
| 1934 | ||
| 1935 | 1935 | case 0x1005: /* $5105 */ |
| 1936 | 1936 | mmc5_ppu_mirror(space->machine, 0, data & 0x03); |
| 1937 | 1937 | mmc5_ppu_mirror(space->machine, 1, (data & 0x0c) >> 2); |
| r8990 | r8991 | |
| 1940 | 1940 | // update render |
| 1941 | 1941 | mmc5_update_render_mode(space->machine); |
| 1942 | 1942 | break; |
| 1943 | ||
| 1943 | ||
| 1944 | 1944 | /* tile data for MMC5 flood-fill NT mode */ |
| 1945 | 1945 | case 0x1006: |
| 1946 | 1946 | state->MMC5_floodtile = data; |
| 1947 | 1947 | break; |
| 1948 | ||
| 1948 | ||
| 1949 | 1949 | /* attr data for MMC5 flood-fill NT mode */ |
| 1950 | 1950 | case 0x1007: |
| 1951 | 1951 | switch (data & 3) |
| r8990 | r8991 | |
| 1957 | 1957 | case 3: state->MMC5_floodattr = 0xff; break; |
| 1958 | 1958 | } |
| 1959 | 1959 | break; |
| 1960 | ||
| 1960 | ||
| 1961 | 1961 | case 0x1013: /* $5113 */ |
| 1962 | 1962 | LOG_MMC(("MMC5 mid RAM bank select: %02x\n", data & 0x07)); |
| 1963 | 1963 | // FIXME: a few Koei games have both WRAM & BWRAM but here we don't support this (yet) |
| r8990 | r8991 | |
| 1966 | 1966 | else |
| 1967 | 1967 | wram_bank(space->machine, data, NES_WRAM); |
| 1968 | 1968 | break; |
| 1969 | ||
| 1970 | ||
| 1969 | ||
| 1970 | ||
| 1971 | 1971 | case 0x1014: /* $5114 */ |
| 1972 | 1972 | case 0x1015: /* $5115 */ |
| 1973 | 1973 | case 0x1016: /* $5116 */ |
| r8990 | r8991 | |
| 1975 | 1975 | state->mmc5_prg_regs[offset & 3] = data; |
| 1976 | 1976 | mmc5_update_prg(space->machine); |
| 1977 | 1977 | break; |
| 1978 | ||
| 1978 | ||
| 1979 | 1979 | #if 0 |
| 1980 | 1980 | // these do not work as expected... I guess we definitely need the bank update at proper times (with BG vs. sprite timing) |
| 1981 | 1981 | case 0x1020: /* $5120 */ |
| r8990 | r8991 | |
| 1995 | 1995 | mmc5_update_chr_a(space->machine); |
| 1996 | 1996 | } |
| 1997 | 1997 | break; |
| 1998 | ||
| 1999 | ||
| 1998 | ||
| 1999 | ||
| 2000 | 2000 | case 0x1028: /* $5128 */ |
| 2001 | 2001 | case 0x1029: /* $5129 */ |
| 2002 | 2002 | case 0x102a: /* $512a */ |
| r8990 | r8991 | |
| 2016 | 2016 | // is to be used for all background tiles on the screen. |
| 2017 | 2017 | } |
| 2018 | 2018 | break; |
| 2019 | ||
| 2019 | ||
| 2020 | 2020 | #endif |
| 2021 | ||
| 2021 | ||
| 2022 | 2022 | case 0x1020: /* $5120 */ |
| 2023 | 2023 | LOG_MMC(("MMC5 $5120 vrom select: %02x (mode: %d)\n", data, state->mmc5_chr_mode)); |
| 2024 | 2024 | switch (state->mmc5_chr_mode) |
| r8990 | r8991 | |
| 2275 | 2275 | break; |
| 2276 | 2276 | } |
| 2277 | 2277 | break; |
| 2278 | ||
| 2278 | ||
| 2279 | 2279 | case 0x1030: /* $5130 */ |
| 2280 | 2280 | state->mmc5_high_chr = data & 0x03; |
| 2281 | 2281 | if (state->mmc5_vram_control == 1) |
| r8990 | r8991 | |
| 2284 | 2284 | // is to be used for all background tiles on the screen. |
| 2285 | 2285 | } |
| 2286 | 2286 | break; |
| 2287 | ||
| 2288 | ||
| 2287 | ||
| 2288 | ||
| 2289 | 2289 | case 0x1100: /* $5200 */ |
| 2290 | 2290 | state->mmc5_split_scr = data; |
| 2291 | 2291 | // in EX2 and EX3 modes, no split screen |
| r8990 | r8991 | |
| 2293 | 2293 | state->mmc5_split_scr &= 0x7f; |
| 2294 | 2294 | state->mmc5_split_ctrl = data; |
| 2295 | 2295 | break; |
| 2296 | ||
| 2296 | ||
| 2297 | 2297 | case 0x1101: /* $5201 */ |
| 2298 | 2298 | state->mmc5_split_yst = (data >= 240) ? data - 16 : data; |
| 2299 | 2299 | break; |
| 2300 | ||
| 2300 | ||
| 2301 | 2301 | case 0x1102: /* $5202 */ |
| 2302 | 2302 | state->mmc5_split_bank = data; |
| 2303 | 2303 | break; |
| 2304 | ||
| 2304 | ||
| 2305 | 2305 | case 0x1103: /* $5203 */ |
| 2306 | 2306 | state->IRQ_count = data; |
| 2307 | 2307 | state->MMC5_scanline = data; |
| r8990 | r8991 | |
| 2317 | 2317 | case 0x1106: /* $5206 */ |
| 2318 | 2318 | state->mult2 = data; |
| 2319 | 2319 | break; |
| 2320 | ||
| 2320 | ||
| 2321 | 2321 | default: |
| 2322 | 2322 | logerror("** MMC5 uncaught write, offset: %04x, data: %02x\n", offset + 0x4100, data); |
| 2323 | 2323 | break; |
| r8990 | r8991 | |
| 2585 | 2585 | Namcot 3453 board emulation |
| 2586 | 2586 | |
| 2587 | 2587 | Games: Devil Man |
| 2588 | ||
| 2588 | ||
| 2589 | 2589 | These are the same as Namcot 34x3, but with additional mirroring |
| 2590 | 2590 | control |
| 2591 | 2591 | |
| r8990 | r8991 | |
| 2712 | 2712 | iNES: mapper 11 |
| 2713 | 2713 | |
| 2714 | 2714 | In MESS: Supported |
| 2715 | ||
| 2715 | ||
| 2716 | 2716 | *************************************************************/ |
| 2717 | 2717 | |
| 2718 | 2718 | static WRITE8_HANDLER( dis_74x377_w ) |
| r8990 | r8991 | |
| 2784 | 2784 | |
| 2785 | 2785 | Bandai LZ93D50 boards emulation |
| 2786 | 2786 | |
| 2787 | There are several variants: plain board with or without SRAM, | |
| 2788 | board + 24C01 EEPROM, board + 24C02 EEPROM, board + Barcode | |
| 2787 | There are several variants: plain board with or without SRAM, | |
| 2788 | board + 24C01 EEPROM, board + 24C02 EEPROM, board + Barcode | |
| 2789 | 2789 | Reader (DATACH). |
| 2790 | 2790 | We currently only emulate the base hardware. |
| 2791 | 2791 | |
| 2792 | 2792 | Games: Crayon Shin-Chan - Ora to Poi Poi, Dragon Ball Z Gaiden, |
| 2793 | 2793 | Dragon Ball Z II & III, Rokudenashi Blues, SD Gundam |
| 2794 | Gaiden - KGM2, Dragon Ball Z, Magical Taruruuto-kun, SD Gundam | |
| 2795 | Gaiden [with EEPROM], Dragon Ball, Dragon Ball 3, Famicom Jump, | |
| 2794 | Gaiden - KGM2, Dragon Ball Z, Magical Taruruuto-kun, SD Gundam | |
| 2795 | Gaiden [with EEPROM], Dragon Ball, Dragon Ball 3, Famicom Jump, | |
| 2796 | 2796 | Famicom Jump II [no EEPROM], Datach Games |
| 2797 | 2797 | |
| 2798 | 2798 | At the moment, we don't support EEPROM I/O |
| r8990 | r8991 | |
| 2800 | 2800 | iNES: mappers 16, 153, 157 & 159 |
| 2801 | 2801 | |
| 2802 | 2802 | In MESS: Supported |
| 2803 | ||
| 2803 | ||
| 2804 | 2804 | *************************************************************/ |
| 2805 | 2805 | |
| 2806 | 2806 | /* Here, IRQ counter decrements every CPU cycle. Since we update it every scanline, |
| r8990 | r8991 | |
| 2914 | 2914 | Bandai Karaoke Studio board emulation |
| 2915 | 2915 | |
| 2916 | 2916 | Games: Karaoke Studio |
| 2917 | ||
| 2917 | ||
| 2918 | 2918 | Note: we currently do not emulate the mic |
| 2919 | 2919 | |
| 2920 | 2920 | iNES: mapper 188 |
| r8990 | r8991 | |
| 2938 | 2938 | iNES: mapper 96 |
| 2939 | 2939 | |
| 2940 | 2940 | In MESS: Preliminary Support. |
| 2941 | ||
| 2941 | ||
| 2942 | 2942 | *************************************************************/ |
| 2943 | 2943 | |
| 2944 | 2944 | static WRITE8_HANDLER( bandai_ok_w ) |
| r8990 | r8991 | |
| 2999 | 2999 | iNES: mapper 97 |
| 3000 | 3000 | |
| 3001 | 3001 | In MESS: Supported. |
| 3002 | ||
| 3002 | ||
| 3003 | 3003 | *************************************************************/ |
| 3004 | 3004 | |
| 3005 | 3005 | static WRITE8_HANDLER( tam_s1_w ) |
| r8990 | r8991 | |
| 3132 | 3132 | |
| 3133 | 3133 | Jaleco SS88006 board emulation, aka JF-27, JF-29, JF-30, ..., |
| 3134 | 3134 | JF-38, JF-40, JF-41 |
| 3135 | ||
| 3135 | ||
| 3136 | 3136 | Games: Lord of King, Magic John, Moe Pro '90, Ninja Jajamaru, |
| 3137 | 3137 | Pizza Pop, Plasma Ball |
| 3138 | 3138 | |
| 3139 | 3139 | iNES: mapper 18 |
| 3140 | 3140 | |
| 3141 | 3141 | In MESS: Supported |
| 3142 | ||
| 3142 | ||
| 3143 | 3143 | *************************************************************/ |
| 3144 | 3144 | |
| 3145 | 3145 | /* Here, IRQ counter decrements every CPU cycle. Since we update it every scanline, |
| r8990 | r8991 | |
| 3287 | 3287 | iNES: mapper 140 |
| 3288 | 3288 | |
| 3289 | 3289 | In MESS: Supported. |
| 3290 | ||
| 3290 | ||
| 3291 | 3291 | *************************************************************/ |
| 3292 | 3292 | |
| 3293 | 3293 | static WRITE8_HANDLER( jf11_m_w ) |
| r8990 | r8991 | |
| 3387 | 3387 | iNES: mapper 92 |
| 3388 | 3388 | |
| 3389 | 3389 | In MESS: Supported (no samples). |
| 3390 | ||
| 3390 | ||
| 3391 | 3391 | *************************************************************/ |
| 3392 | 3392 | |
| 3393 | 3393 | static WRITE8_HANDLER( jf19_w ) |
| r8990 | r8991 | |
| 4075 | 4075 | Sengoku Fuuunji |
| 4076 | 4076 | |
| 4077 | 4077 | iNES: mapper 33 |
| 4078 | ||
| 4078 | ||
| 4079 | 4079 | In MESS: Supported. |
| 4080 | 4080 | |
| 4081 | 4081 | *************************************************************/ |
| r8990 | r8991 | |
| 4120 | 4120 | |
| 4121 | 4121 | Games: Bakushou!! Jinsei Gekijou 3, Bubble Bobble 2, |
| 4122 | 4122 | Captain Saver, Don Doko Don 2, Flintstones, Jetsons |
| 4123 | ||
| 4123 | ||
| 4124 | 4124 | This is basically Mapper 33 + IRQ. Notably, IRQ works the |
| 4125 | 4125 | same as MMC3 irq, BUT latch values are "inverted" (XOR'ed |
| 4126 | 4126 | with 0xff) and there is a little delay (not implemented yet) |
| 4127 | 4127 | We simply use MMC3 IRQ and XOR the value written in the |
| 4128 | 4128 | register 0xc000 below |
| 4129 | ||
| 4129 | ||
| 4130 | 4130 | iNES: mapper 48 |
| 4131 | 4131 | |
| 4132 | 4132 | In MESS: Supported. |
| 4133 | ||
| 4133 | ||
| 4134 | 4134 | *************************************************************/ |
| 4135 | 4135 | |
| 4136 | 4136 | static WRITE8_HANDLER( tc0190fmc_p16_w ) |
| r8990 | r8991 | |
| 4289 | 4289 | iNES: mapper 82 |
| 4290 | 4290 | |
| 4291 | 4291 | In MESS: Supported. |
| 4292 | ||
| 4292 | ||
| 4293 | 4293 | *************************************************************/ |
| 4294 | 4294 | |
| 4295 | 4295 | static void x1017_set_chr( running_machine *machine ) |
| r8990 | r8991 | |
| 4903 | 4903 | } |
| 4904 | 4904 | |
| 4905 | 4905 | /************************************************************* |
| 4906 | ||
| 4906 | ||
| 4907 | 4907 | Bootleg Board by Fukutake |
| 4908 | ||
| 4908 | ||
| 4909 | 4909 | Games: Study Box |
| 4910 | ||
| 4910 | ||
| 4911 | 4911 | iNES: mapper 186 |
| 4912 | ||
| 4912 | ||
| 4913 | 4913 | In MESS: Unsupported. |
| 4914 | ||
| 4915 | ||
| 4914 | ||
| 4915 | ||
| 4916 | 4916 | *************************************************************/ |
| 4917 | 4917 | |
| 4918 | 4918 | static WRITE8_HANDLER( fukutake_l_w ) |
| r8990 | r8991 | |
| 4920 | 4920 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 4921 | 4921 | LOG_MMC(("fukutake_l_w offset: %04x, data: %02x\n", offset, data)); |
| 4922 | 4922 | offset += 0x100; |
| 4923 | ||
| 4923 | ||
| 4924 | 4924 | if (offset >= 0x200 && offset < 0x400) |
| 4925 | 4925 | { |
| 4926 | 4926 | if (offset & 1) |
| 4927 | 4927 | prg16_89ab(space->machine, data); |
| 4928 | 4928 | else |
| 4929 | wram_bank(space->machine, data >> 6, NES_WRAM); | |
| 4929 | wram_bank(space->machine, data >> 6, NES_WRAM); | |
| 4930 | 4930 | } |
| 4931 | 4931 | else if (offset >= 0x400 && offset < 0xf00) |
| 4932 | 4932 | state->mapper_ram[offset - 0x400] = data; |
| r8990 | r8991 | |
| 4937 | 4937 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 4938 | 4938 | LOG_MMC(("fukutake_l_r offset: %04x\n", offset)); |
| 4939 | 4939 | offset += 0x100; |
| 4940 | ||
| 4940 | ||
| 4941 | 4941 | if (offset >= 0x200 && offset < 0x400) |
| 4942 | 4942 | { |
| 4943 | 4943 | if (offset == 0x200 || offset == 0x201 || offset == 0x203) |
| r8990 | r8991 | |
| 5285 | 5285 | } |
| 5286 | 5286 | |
| 5287 | 5287 | /************************************************************* |
| 5288 | ||
| 5288 | ||
| 5289 | 5289 | Kaiser Board KS7022 |
| 5290 | ||
| 5290 | ||
| 5291 | 5291 | Games: 15 in 1 |
| 5292 | ||
| 5292 | ||
| 5293 | 5293 | iNES: mapper 175 |
| 5294 | ||
| 5294 | ||
| 5295 | 5295 | In MESS: Supported? |
| 5296 | ||
| 5296 | ||
| 5297 | 5297 | *************************************************************/ |
| 5298 | 5298 | |
| 5299 | 5299 | static WRITE8_HANDLER( ks7022_w ) |
| r8990 | r8991 | |
| 5312 | 5312 | { |
| 5313 | 5313 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 5314 | 5314 | LOG_MMC(("ks7022_r, offset: %04x\n", offset)); |
| 5315 | ||
| 5315 | ||
| 5316 | 5316 | if (offset == 0x7ffc) |
| 5317 | 5317 | { |
| 5318 | 5318 | chr8(space->machine, state->mmc_latch1, CHRROM); |
| r8990 | r8991 | |
| 5324 | 5324 | } |
| 5325 | 5325 | |
| 5326 | 5326 | /************************************************************* |
| 5327 | ||
| 5327 | ||
| 5328 | 5328 | Kaiser Board KS7032 |
| 5329 | ||
| 5330 | Games: | |
| 5331 | ||
| 5332 | iNES: | |
| 5333 | ||
| 5334 | In MESS: | |
| 5335 | ||
| 5329 | ||
| 5330 | Games: | |
| 5331 | ||
| 5332 | iNES: | |
| 5333 | ||
| 5334 | In MESS: | |
| 5335 | ||
| 5336 | 5336 | *************************************************************/ |
| 5337 | 5337 | |
| 5338 | 5338 | static void ks7032_prg_update( running_machine *machine ) |
| r8990 | r8991 | |
| 5348 | 5348 | static void ks7032_irq( running_device *device, int scanline, int vblank, int blanked ) |
| 5349 | 5349 | { |
| 5350 | 5350 | nes_state *state = device->machine->driver_data<nes_state>(); |
| 5351 | ||
| 5351 | ||
| 5352 | 5352 | if (state->IRQ_enable) |
| 5353 | 5353 | { |
| 5354 | 5354 | if (state->IRQ_count >= (0xffff - 114)) |
| r8990 | r8991 | |
| 5366 | 5366 | { |
| 5367 | 5367 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 5368 | 5368 | LOG_MMC(("ks7032_w, offset: %04x, data: %02x\n", offset, data)); |
| 5369 | ||
| 5369 | ||
| 5370 | 5370 | switch (offset & 0x7000) |
| 5371 | 5371 | { |
| 5372 | 5372 | case 0x0000: |
| r8990 | r8991 | |
| 5395 | 5395 | } |
| 5396 | 5396 | |
| 5397 | 5397 | /************************************************************* |
| 5398 | ||
| 5398 | ||
| 5399 | 5399 | Kaiser Board KS202 |
| 5400 | ||
| 5401 | Games: | |
| 5402 | ||
| 5403 | iNES: | |
| 5404 | ||
| 5400 | ||
| 5401 | Games: | |
| 5402 | ||
| 5403 | iNES: | |
| 5404 | ||
| 5405 | 5405 | In MESS: Supported? |
| 5406 | ||
| 5406 | ||
| 5407 | 5407 | *************************************************************/ |
| 5408 | 5408 | |
| 5409 | 5409 | |
| r8990 | r8991 | |
| 5411 | 5411 | { |
| 5412 | 5412 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 5413 | 5413 | LOG_MMC(("ks202_w, offset: %04x, data: %02x\n", offset, data)); |
| 5414 | ||
| 5414 | ||
| 5415 | 5415 | switch (offset & 0x7000) |
| 5416 | 5416 | { |
| 5417 | 5417 | case 0x0000: |
| r8990 | r8991 | |
| 5449 | 5449 | } |
| 5450 | 5450 | |
| 5451 | 5451 | /************************************************************* |
| 5452 | ||
| 5452 | ||
| 5453 | 5453 | Kaiser Board KS7017 |
| 5454 | ||
| 5455 | Games: | |
| 5456 | ||
| 5457 | iNES: | |
| 5458 | ||
| 5454 | ||
| 5455 | Games: | |
| 5456 | ||
| 5457 | iNES: | |
| 5458 | ||
| 5459 | 5459 | In MESS: Not working |
| 5460 | ||
| 5460 | ||
| 5461 | 5461 | *************************************************************/ |
| 5462 | 5462 | |
| 5463 | 5463 | static void mmc_fds_irq( running_device *device, int scanline, int vblank, int blanked ) |
| 5464 | 5464 | { |
| 5465 | 5465 | nes_state *state = device->machine->driver_data<nes_state>(); |
| 5466 | ||
| 5466 | ||
| 5467 | 5467 | if (state->IRQ_enable) |
| 5468 | 5468 | { |
| 5469 | 5469 | if (state->IRQ_count <= 114) |
| r8990 | r8991 | |
| 5481 | 5481 | { |
| 5482 | 5482 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 5483 | 5483 | LOG_MMC(("ks7022_w, offset: %04x, data: %02x\n", offset, data)); |
| 5484 | ||
| 5484 | ||
| 5485 | 5485 | offset += 0x100; |
| 5486 | 5486 | |
| 5487 | 5487 | if (offset >= 0xa00 && offset < 0xb00) |
| 5488 | 5488 | state->mmc_latch1 = ((offset >> 2) & 0x03) | ((offset >> 4) & 0x04); |
| 5489 | ||
| 5489 | ||
| 5490 | 5490 | if (offset >= 0x1000 && offset < 0x1100) |
| 5491 | 5491 | prg16_89ab(space->machine, state->mmc_latch1); |
| 5492 | 5492 | } |
| r8990 | r8991 | |
| 5495 | 5495 | { |
| 5496 | 5496 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 5497 | 5497 | LOG_MMC(("ks7017_extra_w, offset: %04x, data: %02x\n", offset, data)); |
| 5498 | ||
| 5498 | ||
| 5499 | 5499 | offset += 0x20; |
| 5500 | 5500 | |
| 5501 | 5501 | if (offset == 0x0020) /* 0x4020 */ |
| 5502 | 5502 | state->IRQ_count = (state->IRQ_count & 0xff00) | data; |
| 5503 | ||
| 5503 | ||
| 5504 | 5504 | if (offset == 0x0021) /* 0x4021 */ |
| 5505 | 5505 | state->IRQ_count = (state->IRQ_count & 0x00ff) | (data << 8); |
| 5506 | 5506 | |
| r8990 | r8991 | |
| 5512 | 5512 | { |
| 5513 | 5513 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 5514 | 5514 | LOG_MMC(("ks7017_extra_r, offset: %04x\n", offset)); |
| 5515 | ||
| 5515 | ||
| 5516 | 5516 | state->IRQ_status &= ~0x01; |
| 5517 | 5517 | return state->IRQ_status; |
| 5518 | 5518 | } |
| r8990 | r8991 | |
| 5571 | 5571 | static void kay_pp_update_regs( running_machine *machine ) |
| 5572 | 5572 | { |
| 5573 | 5573 | nes_state *state = machine->driver_data<nes_state>(); |
| 5574 | ||
| 5574 | ||
| 5575 | 5575 | switch (state->mmc_reg[5] & 0x3f) |
| 5576 | 5576 | { |
| 5577 | 5577 | case 0x20: |
| r8990 | r8991 | |
| 5590 | 5590 | if (state->mmc_reg[6]) |
| 5591 | 5591 | state->mmc_reg[1] = state->mmc_reg[6]; |
| 5592 | 5592 | break; |
| 5593 | ||
| 5593 | ||
| 5594 | 5594 | case 0x28: |
| 5595 | 5595 | state->mmc_reg[7] = 0; |
| 5596 | 5596 | state->mmc_reg[2] = state->mmc_reg[6]; |
| 5597 | 5597 | break; |
| 5598 | ||
| 5598 | ||
| 5599 | 5599 | case 0x2a: |
| 5600 | 5600 | state->mmc_reg[7] = 0; |
| 5601 | 5601 | state->mmc_reg[3] = state->mmc_reg[6]; |
| 5602 | 5602 | break; |
| 5603 | ||
| 5603 | ||
| 5604 | 5604 | case 0x2f: |
| 5605 | 5605 | break; |
| 5606 | ||
| 5606 | ||
| 5607 | 5607 | default: |
| 5608 | 5608 | state->mmc_reg[5] = 0; |
| 5609 | 5609 | break; |
| r8990 | r8991 | |
| 5613 | 5613 | static void kay_pp_prg_cb( running_machine *machine, int start, int bank ) |
| 5614 | 5614 | { |
| 5615 | 5615 | nes_state *state = machine->driver_data<nes_state>(); |
| 5616 | ||
| 5616 | ||
| 5617 | 5617 | if (state->mmc_reg[5] & 0x3f) |
| 5618 | 5618 | { |
| 5619 | 5619 | prg8_x(machine, start, bank & 0x3f); |
| r8990 | r8991 | |
| 5629 | 5629 | { |
| 5630 | 5630 | nes_state *state = machine->driver_data<nes_state>(); |
| 5631 | 5631 | UINT8 chr_page = (state->mmc3_latch & 0x80) >> 5; |
| 5632 | ||
| 5632 | ||
| 5633 | 5633 | if ((start & 0x04) == chr_page) |
| 5634 | 5634 | bank |= 0x100; |
| 5635 | ||
| 5635 | ||
| 5636 | 5636 | chr1_x(machine, start, bank, source); |
| 5637 | 5637 | } |
| 5638 | 5638 | |
| r8990 | r8991 | |
| 5640 | 5640 | { |
| 5641 | 5641 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 5642 | 5642 | LOG_MMC(("kay_pp_w, offset: %04x, data: %02x\n", offset, data)); |
| 5643 | ||
| 5643 | ||
| 5644 | 5644 | switch (offset & 0x6003) |
| 5645 | 5645 | { |
| 5646 | 5646 | case 0x0000: |
| 5647 | 5647 | txrom_w(space, offset, data); |
| 5648 | 5648 | mmc3_set_prg(space->machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 5649 | 5649 | break; |
| 5650 | ||
| 5650 | ||
| 5651 | 5651 | case 0x0001: |
| 5652 | 5652 | state->mmc_reg[6] = (BIT(data, 0) << 5) | (BIT(data, 1) << 4) | (BIT(data, 2) << 3) |
| 5653 | 5653 | | (BIT(data, 3) << 2) | (BIT(data, 4) << 1) | BIT(data, 5); |
| r8990 | r8991 | |
| 5656 | 5656 | txrom_w(space, offset, data); |
| 5657 | 5657 | mmc3_set_prg(space->machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 5658 | 5658 | break; |
| 5659 | ||
| 5659 | ||
| 5660 | 5660 | case 0x0003: |
| 5661 | 5661 | state->mmc_reg[5] = data; |
| 5662 | 5662 | kay_pp_update_regs(space->machine); |
| r8990 | r8991 | |
| 5693 | 5693 | else |
| 5694 | 5694 | prg8_x(machine, start, bank); |
| 5695 | 5695 | } |
| 5696 | ||
| 5696 | ||
| 5697 | 5697 | static WRITE8_HANDLER( kasing_m_w ) |
| 5698 | 5698 | { |
| 5699 | 5699 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 5700 | 5700 | LOG_MMC(("kasing_m_w, offset: %04x, data: %02x\n", offset, data)); |
| 5701 | ||
| 5701 | ||
| 5702 | 5702 | switch (offset & 0x01) |
| 5703 | 5703 | { |
| 5704 | 5704 | case 0x00: |
| r8990 | r8991 | |
| 6305 | 6305 | |
| 6306 | 6306 | Games: Chess Academy, Chinese Checkers Jpn, Mahjong Academy, |
| 6307 | 6307 | Olympic IQ, Poker II, Tasac [150], Poker III [243] |
| 6308 | ||
| 6308 | ||
| 6309 | 6309 | iNES: mappers 150 & 243 |
| 6310 | 6310 | |
| 6311 | 6311 | *************************************************************/ |
| r8990 | r8991 | |
| 6510 | 6510 | |
| 6511 | 6511 | |
| 6512 | 6512 | /************************************************************* |
| 6513 | ||
| 6513 | ||
| 6514 | 6514 | Sachen SA009 bootleg boards |
| 6515 | ||
| 6515 | ||
| 6516 | 6516 | Games: Pipe 5 |
| 6517 | ||
| 6517 | ||
| 6518 | 6518 | iNES: mapper 160 |
| 6519 | ||
| 6519 | ||
| 6520 | 6520 | In MESS: Supported. |
| 6521 | ||
| 6521 | ||
| 6522 | 6522 | *************************************************************/ |
| 6523 | 6523 | |
| 6524 | 6524 | static WRITE8_HANDLER( sa009_l_w ) |
| 6525 | 6525 | { |
| 6526 | 6526 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 6527 | 6527 | LOG_MMC(("sa009_l_w, offset: %04x, data: %02x\n", offset, data)); |
| 6528 | ||
| 6528 | ||
| 6529 | 6529 | chr8(space->machine, data, state->mmc_chr_source); |
| 6530 | 6530 | } |
| 6531 | 6531 | |
| r8990 | r8991 | |
| 6534 | 6534 | Sachen SA0036 bootleg boards |
| 6535 | 6535 | |
| 6536 | 6536 | Games: Taiwan Mahjong 16 |
| 6537 | ||
| 6537 | ||
| 6538 | 6538 | iNES: mapper 149 |
| 6539 | 6539 | |
| 6540 | 6540 | In MESS: Supported. |
| 6541 | ||
| 6541 | ||
| 6542 | 6542 | *************************************************************/ |
| 6543 | 6543 | |
| 6544 | 6544 | static WRITE8_HANDLER( sa0036_w ) |
| r8990 | r8991 | |
| 6553 | 6553 | Sachen SA0037 bootleg boards |
| 6554 | 6554 | |
| 6555 | 6555 | Games: Mahjong World, Shisen Mahjong |
| 6556 | ||
| 6556 | ||
| 6557 | 6557 | iNES: mapper 148 |
| 6558 | 6558 | |
| 6559 | 6559 | In MESS: Supported. |
| 6560 | ||
| 6560 | ||
| 6561 | 6561 | *************************************************************/ |
| 6562 | 6562 | |
| 6563 | 6563 | static WRITE8_HANDLER( sa0037_w ) |
| r8990 | r8991 | |
| 6573 | 6573 | Sachen SA72007 bootleg boards |
| 6574 | 6574 | |
| 6575 | 6575 | Games: Sidewinder |
| 6576 | ||
| 6576 | ||
| 6577 | 6577 | iNES: mapper 145 |
| 6578 | 6578 | |
| 6579 | 6579 | In MESS: Supported. |
| 6580 | ||
| 6580 | ||
| 6581 | 6581 | *************************************************************/ |
| 6582 | 6582 | |
| 6583 | 6583 | static WRITE8_HANDLER( sa72007_l_w ) |
| r8990 | r8991 | |
| 6594 | 6594 | Sachen SA72008 bootleg boards |
| 6595 | 6595 | |
| 6596 | 6596 | Games: Jovial Race, Qi Wang |
| 6597 | ||
| 6597 | ||
| 6598 | 6598 | iNES: mapper 133 |
| 6599 | 6599 | |
| 6600 | 6600 | In MESS: Supported. |
| r8990 | r8991 | |
| 6637 | 6637 | Sachen TCU-01 bootleg boards |
| 6638 | 6638 | |
| 6639 | 6639 | Games: Challenge of the Dragon, Chinese Kungfu |
| 6640 | ||
| 6640 | ||
| 6641 | 6641 | iNES: mapper 147 |
| 6642 | 6642 | |
| 6643 | 6643 | In MESS: Supported. |
| r8990 | r8991 | |
| 6815 | 6815 | static void sgame_boog_chr_cb( running_machine *machine, int start, int bank, int source ) |
| 6816 | 6816 | { |
| 6817 | 6817 | nes_state *state = machine->driver_data<nes_state>(); |
| 6818 | ||
| 6818 | ||
| 6819 | 6819 | if ((state->mmc_reg[1] & 0x04)) |
| 6820 | 6820 | bank |= 0x100; |
| 6821 | 6821 | else |
| 6822 | 6822 | bank = (bank & 0x7f) | ((state->mmc_reg[1] & 0x10) << 3); |
| 6823 | ||
| 6823 | ||
| 6824 | 6824 | chr1_x(machine, start, bank, source); |
| 6825 | 6825 | } |
| 6826 | 6826 | |
| r8990 | r8991 | |
| 6865 | 6865 | { |
| 6866 | 6866 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 6867 | 6867 | LOG_MMC(("sgame_boog_m_w, offset: %04x, data: %02x\n", offset, data)); |
| 6868 | ||
| 6868 | ||
| 6869 | 6869 | if (offset == 0x0000) |
| 6870 | 6870 | { |
| 6871 | 6871 | state->mmc_reg[0] = data; |
| r8990 | r8991 | |
| 6897 | 6897 | if (!state->mmc_reg[2]) |
| 6898 | 6898 | txrom_w(space, 0x0000, data); |
| 6899 | 6899 | break; |
| 6900 | ||
| 6900 | ||
| 6901 | 6901 | case 0x0001: |
| 6902 | 6902 | if (!state->mmc_reg[2]) |
| 6903 | 6903 | txrom_w(space, 0x0001, data); |
| r8990 | r8991 | |
| 6907 | 6907 | txrom_w(space, 0x0001, data); |
| 6908 | 6908 | } |
| 6909 | 6909 | break; |
| 6910 | ||
| 6910 | ||
| 6911 | 6911 | case 0x2000: |
| 6912 | 6912 | if (!state->mmc_reg[2]) |
| 6913 | 6913 | txrom_w(space, 0x2000, data); |
| r8990 | r8991 | |
| 6923 | 6923 | case 0x4000: |
| 6924 | 6924 | if (!state->mmc_reg[2]) |
| 6925 | 6925 | txrom_w(space, 0x4000, data); |
| 6926 | else | |
| 6926 | else | |
| 6927 | 6927 | set_nt_mirroring(space->machine, ((data >> 7) | data) & 0x01 ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); |
| 6928 | 6928 | break; |
| 6929 | 6929 | |
| 6930 | 6930 | case 0x4001: |
| 6931 | 6931 | if (!state->mmc_reg[2]) |
| 6932 | 6932 | txrom_w(space, 0x4001, data); |
| 6933 | else | |
| 6933 | else | |
| 6934 | 6934 | txrom_w(space, 0x6001, data); |
| 6935 | 6935 | break; |
| 6936 | 6936 | |
| 6937 | 6937 | case 0x6001: |
| 6938 | 6938 | if (!state->mmc_reg[2]) |
| 6939 | 6939 | txrom_w(space, 0x6001, data); |
| 6940 | else | |
| 6940 | else | |
| 6941 | 6941 | { |
| 6942 | 6942 | txrom_w(space, 0x4000, data); |
| 6943 | 6943 | txrom_w(space, 0x4001, data); |
| 6944 | 6944 | } |
| 6945 | 6945 | break; |
| 6946 | ||
| 6946 | ||
| 6947 | 6947 | default: |
| 6948 | 6948 | txrom_w(space, offset, data); |
| 6949 | 6949 | break; |
| r8990 | r8991 | |
| 7528 | 7528 | /* Luo Ke Ren X only works with this */ |
| 7529 | 7529 | static void waixing_a_chr_cb( running_machine *machine, int start, int bank, int source ) |
| 7530 | 7530 | { |
| 7531 | int chr_src = (bank <= 9) ? CHRRAM : CHRROM; | |
| 7531 | int chr_src = (bank <= 9) ? CHRRAM : CHRROM; | |
| 7532 | 7532 | chr1_x(machine, start, bank, chr_src); |
| 7533 | 7533 | } |
| 7534 | 7534 | |
| r8990 | r8991 | |
| 7576 | 7576 | |
| 7577 | 7577 | static void waixing_b_chr_cb( running_machine *machine, int start, int bank, int source ) |
| 7578 | 7578 | { |
| 7579 | int chr_src = BIT(bank, 7) ? CHRRAM : CHRROM; | |
| 7579 | int chr_src = BIT(bank, 7) ? CHRRAM : CHRROM; | |
| 7580 | 7580 | chr1_x(machine, start, bank, chr_src); |
| 7581 | 7581 | } |
| 7582 | 7582 | |
| r8990 | r8991 | |
| 7727 | 7727 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 7728 | 7728 | UINT8 MMC3_helper, cmd; |
| 7729 | 7729 | LOG_MMC(("waixing_g_w, offset: %04x, data: %02x\n", offset, data)); |
| 7730 | ||
| 7730 | ||
| 7731 | 7731 | switch (offset & 0x6001) |
| 7732 | 7732 | { |
| 7733 | 7733 | case 0x0000: |
| 7734 | 7734 | MMC3_helper = state->mmc_latch1 ^ data; |
| 7735 | 7735 | state->mmc_latch1 = data; |
| 7736 | ||
| 7736 | ||
| 7737 | 7737 | /* Has PRG Mode changed? */ |
| 7738 | 7738 | if (MMC3_helper & 0x40) |
| 7739 | 7739 | mmc3_set_prg(space->machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 7740 | ||
| 7740 | ||
| 7741 | 7741 | /* Has CHR Mode changed? */ |
| 7742 | 7742 | if (MMC3_helper & 0x80) |
| 7743 | 7743 | waixing_g_set_chr(space->machine, state->mmc_chr_base, state->mmc_chr_mask); |
| 7744 | 7744 | break; |
| 7745 | ||
| 7745 | ||
| 7746 | 7746 | case 0x0001: |
| 7747 | 7747 | cmd = state->mmc_latch1 & 0x0f; |
| 7748 | 7748 | switch (cmd) |
| r8990 | r8991 | |
| 8094 | 8094 | static void waixing_sec_prg_cb( running_machine *machine, int start, int bank ) |
| 8095 | 8095 | { |
| 8096 | 8096 | nes_state *state = machine->driver_data<nes_state>(); |
| 8097 | ||
| 8097 | ||
| 8098 | 8098 | if (state->mmc_reg[0]) |
| 8099 | 8099 | bank = ((bank & 0x01)) | ((bank >> 3) & 0x02) | ((bank >> 1) & 0x04) | ((bank << 2) & 0x18); |
| 8100 | 8100 | |
| r8990 | r8991 | |
| 8106 | 8106 | nes_state *state = machine->driver_data<nes_state>(); |
| 8107 | 8107 | |
| 8108 | 8108 | if (state->mmc_reg[0]) |
| 8109 | bank = ((bank & 0x03)) | ((bank >> 1) & 0x04) | ((bank >> 4) & 0x08) | | |
| 8109 | bank = ((bank & 0x03)) | ((bank >> 1) & 0x04) | ((bank >> 4) & 0x08) | | |
| 8110 | 8110 | ((bank >> 2) & 0x10) | ((bank << 3) & 0x20) | ((bank << 2) & 0xc0); |
| 8111 | ||
| 8111 | ||
| 8112 | 8112 | chr1_x(machine, start, bank, source); |
| 8113 | 8113 | } |
| 8114 | 8114 | |
| r8990 | r8991 | |
| 8128 | 8128 | } |
| 8129 | 8129 | |
| 8130 | 8130 | /************************************************************* |
| 8131 | ||
| 8131 | ||
| 8132 | 8132 | Waixing SH2 Board |
| 8133 | ||
| 8133 | ||
| 8134 | 8134 | Games: Fire Emblem (C) and Fire Emblem Gaiden (C) |
| 8135 | ||
| 8135 | ||
| 8136 | 8136 | MMC3 clone with different access to CHR |
| 8137 | ||
| 8137 | ||
| 8138 | 8138 | iNES: mapper 165 |
| 8139 | ||
| 8139 | ||
| 8140 | 8140 | In MESS: Partially Supported. |
| 8141 | ||
| 8141 | ||
| 8142 | 8142 | *************************************************************/ |
| 8143 | 8143 | |
| 8144 | 8144 | static void waixing_sh2_chr_cb( running_machine *machine, int start, int bank, int source ) |
| 8145 | 8145 | { |
| 8146 | 8146 | nes_state *state = machine->driver_data<nes_state>(); |
| 8147 | ||
| 8147 | ||
| 8148 | 8148 | chr4_0(machine, state->mmc_reg[0], state->mmc_reg[0] ? CHRRAM : CHRROM); |
| 8149 | 8149 | chr4_4(machine, state->mmc_reg[1], state->mmc_reg[1] ? CHRRAM : CHRROM); |
| 8150 | 8150 | } |
| r8990 | r8991 | |
| 8162 | 8162 | case 0xfe8: chr_helper = (bank & 0x4) | 0x2; break; |
| 8163 | 8163 | default: return val; |
| 8164 | 8164 | } |
| 8165 | ||
| 8165 | ||
| 8166 | 8166 | state->mmc_reg[offset >> 12] = chr_helper; |
| 8167 | 8167 | if (offset & 0x1000) |
| 8168 | 8168 | chr4_4(space->machine, state->mmc_reg[1], state->mmc_reg[1] ? CHRRAM : CHRROM); |
| 8169 | 8169 | else |
| 8170 | 8170 | chr4_0(space->machine, state->mmc_reg[0], state->mmc_reg[0] ? CHRRAM : CHRROM); |
| 8171 | ||
| 8172 | return val; | |
| 8171 | ||
| 8172 | return val; | |
| 8173 | 8173 | } |
| 8174 | 8174 | |
| 8175 | 8175 | /************************************************************* |
| r8990 | r8991 | |
| 8187 | 8187 | static void unl_8237_prg_cb( running_machine *machine, int start, int bank ) |
| 8188 | 8188 | { |
| 8189 | 8189 | nes_state *state = machine->driver_data<nes_state>(); |
| 8190 | ||
| 8190 | ||
| 8191 | 8191 | if (!(state->mmc_reg[0] & 0x80)) |
| 8192 | 8192 | prg8_x(machine, start, bank); |
| 8193 | 8193 | } |
| r8990 | r8991 | |
| 8242 | 8242 | case 0x1000: |
| 8243 | 8243 | set_nt_mirroring(space->machine, (data | (data >> 7)) & 0x01 ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); |
| 8244 | 8244 | break; |
| 8245 | ||
| 8245 | ||
| 8246 | 8246 | case 0x2000: |
| 8247 | 8247 | case 0x3000: |
| 8248 | 8248 | state->mmc_reg[2] = 1; |
| r8990 | r8991 | |
| 8417 | 8417 | case 0x2001: |
| 8418 | 8418 | data = unl_kof97_unscramble(data); |
| 8419 | 8419 | txrom_w(space, offset, data); |
| 8420 | break; | |
| 8420 | break; | |
| 8421 | 8421 | } |
| 8422 | 8422 | } |
| 8423 | 8423 | } |
| r8990 | r8991 | |
| 8583 | 8583 | state->mmc_reg[1] = 0x00; |
| 8584 | 8584 | break; |
| 8585 | 8585 | } |
| 8586 | ||
| 8586 | ||
| 8587 | 8587 | } |
| 8588 | ||
| 8588 | ||
| 8589 | 8589 | if (!state->mmc_reg[3] && offset > 0x1000) |
| 8590 | 8590 | { |
| 8591 | 8591 | state->mmc_reg[3] = 1; |
| r8990 | r8991 | |
| 8950 | 8950 | MMC3 clone |
| 8951 | 8951 | |
| 8952 | 8952 | iNES: mapper 197 |
| 8953 | ||
| 8953 | ||
| 8954 | 8954 | In MESS: Supported. |
| 8955 | 8955 | |
| 8956 | 8956 | *************************************************************/ |
| r8990 | r8991 | |
| 9187 | 9187 | } |
| 9188 | 9188 | |
| 9189 | 9189 | /************************************************************* |
| 9190 | ||
| 9190 | ||
| 9191 | 9191 | WHIRLWIND-2706 |
| 9192 | ||
| 9192 | ||
| 9193 | 9193 | Games: Meikyuu Jiin Dababa (FDS conversion) |
| 9194 | ||
| 9194 | ||
| 9195 | 9195 | iNES: mapper 108 |
| 9196 | ||
| 9196 | ||
| 9197 | 9197 | In MESS: Supported. |
| 9198 | ||
| 9198 | ||
| 9199 | 9199 | *************************************************************/ |
| 9200 | 9200 | |
| 9201 | 9201 | static WRITE8_HANDLER( whirl2706_w ) |
| r8990 | r8991 | |
| 9205 | 9205 | } |
| 9206 | 9206 | |
| 9207 | 9207 | /************************************************************* |
| 9208 | ||
| 9208 | ||
| 9209 | 9209 | Bootleg Board used for FDS conversion |
| 9210 | ||
| 9210 | ||
| 9211 | 9211 | Games: Tobidase Daisakusen (FDS conversion) |
| 9212 | ||
| 9212 | ||
| 9213 | 9213 | iNES: mapper 120 |
| 9214 | ||
| 9214 | ||
| 9215 | 9215 | In MESS: Partially Supported. |
| 9216 | ||
| 9216 | ||
| 9217 | 9217 | *************************************************************/ |
| 9218 | 9218 | |
| 9219 | 9219 | static WRITE8_HANDLER( btl_tobi_l_w ) |
| r8990 | r8991 | |
| 9363 | 9363 | } |
| 9364 | 9364 | |
| 9365 | 9365 | /************************************************************* |
| 9366 | ||
| 9366 | ||
| 9367 | 9367 | BTL-PIKACHUY2K |
| 9368 | ||
| 9368 | ||
| 9369 | 9369 | Games: Pikachu Y2k |
| 9370 | ||
| 9370 | ||
| 9371 | 9371 | iNES: mapper 254 |
| 9372 | ||
| 9373 | In MESS: | |
| 9374 | ||
| 9372 | ||
| 9373 | In MESS: | |
| 9374 | ||
| 9375 | 9375 | *************************************************************/ |
| 9376 | 9376 | |
| 9377 | 9377 | static WRITE8_HANDLER( btl_pika_y2k_w ) |
| r8990 | r8991 | |
| 9406 | 9406 | { |
| 9407 | 9407 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 9408 | 9408 | LOG_MMC(("btl_pika_y2k_m_r, offset: %04x\n", offset)); |
| 9409 | ||
| 9410 | return state->wram[offset] ^ (state->mmc_latch2 & state->mmc_reg[0]); | |
| 9409 | ||
| 9410 | return state->wram[offset] ^ (state->mmc_latch2 & state->mmc_reg[0]); | |
| 9411 | 9411 | } |
| 9412 | 9412 | |
| 9413 | 9413 | /************************************************************* |
| r8990 | r8991 | |
| 9417 | 9417 | *************************************************************/ |
| 9418 | 9418 | |
| 9419 | 9419 | /************************************************************* |
| 9420 | ||
| 9420 | ||
| 9421 | 9421 | Board BMC-FK23C |
| 9422 | ||
| 9422 | ||
| 9423 | 9423 | In MESS: partially supported (still to sort initial banking |
| 9424 | 9424 | for many games) |
| 9425 | ||
| 9425 | ||
| 9426 | 9426 | *************************************************************/ |
| 9427 | 9427 | |
| 9428 | 9428 | #if 0 |
| 9429 | 9429 | static void fk23c_prg_cb( running_machine *machine, int start, int bank ) |
| 9430 | 9430 | { |
| 9431 | 9431 | nes_state *state = machine->driver_data<nes_state>(); |
| 9432 | ||
| 9432 | ||
| 9433 | 9433 | if (((state->mmc_reg[0] & 0x07) - 3) > 1 && (!(state->mmc_reg[3] & 0x02) || start < 2)) |
| 9434 | 9434 | { |
| 9435 | 9435 | if (state->mmc_reg[0] & 0x03) |
| 9436 | 9436 | bank = (bank & (0x3f >> (state->mmc_reg[0] & 0x03))) | (state->mmc_reg[1] << 1); |
| 9437 | ||
| 9437 | ||
| 9438 | 9438 | prg8_x(machine, start, bank); |
| 9439 | 9439 | } |
| 9440 | 9440 | } |
| r8990 | r8991 | |
| 9442 | 9442 | static void fk23c_chr_cb( running_machine *machine, int start, int bank, int source ) |
| 9443 | 9443 | { |
| 9444 | 9444 | nes_state *state = machine->driver_data<nes_state>(); |
| 9445 | ||
| 9445 | ||
| 9446 | 9446 | if (!(state->mmc_reg[0] & 0x40) && (!(state->mmc_reg[3] & 0x02) || (start != 1 && start != 3))) |
| 9447 | 9447 | chr1_x(machine, start, ((state->mmc_reg[2] & 0x7f) << 3) | bank, source); |
| 9448 | 9448 | } |
| r8990 | r8991 | |
| 9453 | 9453 | { |
| 9454 | 9454 | nes_state *state = machine->driver_data<nes_state>(); |
| 9455 | 9455 | UINT8 mask = (0x3f >> (state->mmc_reg[0] & 0x03)); |
| 9456 | ||
| 9456 | ||
| 9457 | 9457 | if ((state->mmc_reg[0] & 0x07) < 3) |
| 9458 | 9458 | { |
| 9459 | 9459 | if (!(state->mmc_reg[0] & 0x03)) |
| r8990 | r8991 | |
| 9489 | 9489 | prg8_cd(machine, state->mmc_reg[4]); |
| 9490 | 9490 | prg8_ef(machine, state->mmc_reg[5]); |
| 9491 | 9491 | } |
| 9492 | ||
| 9492 | ||
| 9493 | 9493 | mmc3_set_prg(machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 9494 | 9494 | } |
| 9495 | 9495 | } |
| r8990 | r8991 | |
| 9524 | 9524 | if (offset & (1 << 4)) // here it should be (4 + state->mmc_dipsetting) |
| 9525 | 9525 | { |
| 9526 | 9526 | state->mmc_reg[offset & 0x03] = data; |
| 9527 | ||
| 9527 | ||
| 9528 | 9528 | fk23c_set_prg(space->machine); |
| 9529 | 9529 | fk23c_set_chr(space->machine); |
| 9530 | 9530 | } |
| r8990 | r8991 | |
| 9535 | 9535 | { |
| 9536 | 9536 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 9537 | 9537 | LOG_MMC(("fk23c_w, offset: %04x, data: %02x\n", offset, data)); |
| 9538 | ||
| 9538 | ||
| 9539 | 9539 | if (state->mmc_reg[0] & 0x40) |
| 9540 | 9540 | { |
| 9541 | 9541 | if (state->mmc_reg[0] & 0x30) |
| r8990 | r8991 | |
| 9560 | 9560 | else |
| 9561 | 9561 | txrom_w(space, offset, data); |
| 9562 | 9562 | break; |
| 9563 | ||
| 9563 | ||
| 9564 | 9564 | case 0x2000: |
| 9565 | 9565 | set_nt_mirroring(space->machine, data ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); |
| 9566 | 9566 | break; |
| 9567 | ||
| 9567 | ||
| 9568 | 9568 | default: |
| 9569 | 9569 | txrom_w(space, offset, data); |
| 9570 | 9570 | break; |
| 9571 | } | |
| 9571 | } | |
| 9572 | 9572 | } |
| 9573 | 9573 | } |
| 9574 | 9574 | |
| r8990 | r8991 | |
| 9747 | 9747 | nes_state *state = machine->driver_data<nes_state>(); |
| 9748 | 9748 | UINT8 chr = BIT(state->mmc_reg[0], 5) ? CHRRAM : CHRROM; |
| 9749 | 9749 | int chr_base = (state->mmc_reg[2] << 3) & 0xf00; |
| 9750 | ||
| 9750 | ||
| 9751 | 9751 | chr1_x(machine, start, chr_base | bank, chr); |
| 9752 | 9752 | } |
| 9753 | 9753 | |
| r8990 | r8991 | |
| 9921 | 9921 | |
| 9922 | 9922 | |
| 9923 | 9923 | /************************************************************* |
| 9924 | ||
| 9924 | ||
| 9925 | 9925 | Board UNL-STUDYNGAME |
| 9926 | ||
| 9926 | ||
| 9927 | 9927 | Games: Study n Game 32 in 1 |
| 9928 | ||
| 9928 | ||
| 9929 | 9929 | iNES: mapper 39 |
| 9930 | ||
| 9931 | In MESS: Partially Supported (problems with PRG bankswitch, | |
| 9930 | ||
| 9931 | In MESS: Partially Supported (problems with PRG bankswitch, | |
| 9932 | 9932 | only keyboard exercise work). |
| 9933 | ||
| 9933 | ||
| 9934 | 9934 | *************************************************************/ |
| 9935 | 9935 | |
| 9936 | 9936 | static WRITE8_HANDLER( sng32_w ) |
| r8990 | r8991 | |
| 11082 | 11082 | } |
| 11083 | 11083 | |
| 11084 | 11084 | /************************************************************* |
| 11085 | ||
| 11085 | ||
| 11086 | 11086 | UNL-H2288 |
| 11087 | ||
| 11087 | ||
| 11088 | 11088 | *************************************************************/ |
| 11089 | 11089 | |
| 11090 | 11090 | static void h2288_prg_cb( running_machine *machine, int start, int bank ) |
| 11091 | 11091 | { |
| 11092 | 11092 | nes_state *state = machine->driver_data<nes_state>(); |
| 11093 | ||
| 11093 | ||
| 11094 | 11094 | if (!(state->mmc_reg[0] & 0x40)) |
| 11095 | 11095 | prg8_x(machine, start, bank); |
| 11096 | 11096 | } |
| r8990 | r8991 | |
| 11100 | 11100 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 11101 | 11101 | LOG_MMC(("h2288_l_w offset: %04x, data: %02x\n", offset, data)); |
| 11102 | 11102 | offset += 0x100; |
| 11103 | ||
| 11103 | ||
| 11104 | 11104 | if (offset >= 0x1800) |
| 11105 | 11105 | { |
| 11106 | 11106 | state->mmc_reg[offset & 1] = data; |
| r8990 | r8991 | |
| 11120 | 11120 | { |
| 11121 | 11121 | LOG_MMC(("h2288_l_r offset: %04x\n", offset)); |
| 11122 | 11122 | offset += 0x100; |
| 11123 | ||
| 11123 | ||
| 11124 | 11124 | if (offset >= 0x1000) |
| 11125 | 11125 | { |
| 11126 | 11126 | int helper = offset >> 8; |
| r8990 | r8991 | |
| 11137 | 11137 | { |
| 11138 | 11138 | static const UINT8 conv_table[8] = {0, 3, 1, 5, 6, 7, 2, 4}; |
| 11139 | 11139 | LOG_MMC(("h2288_w, offset: %04x, data: %02x\n", offset, data)); |
| 11140 | ||
| 11140 | ||
| 11141 | 11141 | switch (offset & 0x6001) |
| 11142 | 11142 | { |
| 11143 | 11143 | case 0x0000: |
| 11144 | 11144 | txrom_w(space, 0x0000, (data & 0xc0) | conv_table[data & 0x07]); |
| 11145 | 11145 | break; |
| 11146 | ||
| 11146 | ||
| 11147 | 11147 | default: |
| 11148 | 11148 | txrom_w(space, offset, data); |
| 11149 | 11149 | break; |
| r8990 | r8991 | |
| 11151 | 11151 | } |
| 11152 | 11152 | |
| 11153 | 11153 | /************************************************************* |
| 11154 | ||
| 11154 | ||
| 11155 | 11155 | UNL-SHJY3 |
| 11156 | ||
| 11156 | ||
| 11157 | 11157 | *************************************************************/ |
| 11158 | 11158 | |
| 11159 | 11159 | /* I think the IRQ should only get fired if enough CPU cycles have passed, but we don't implement (yet) this part */ |
| r8990 | r8991 | |
| 11177 | 11177 | { |
| 11178 | 11178 | nes_state *state = machine->driver_data<nes_state>(); |
| 11179 | 11179 | int i; |
| 11180 | ||
| 11180 | ||
| 11181 | 11181 | prg8_89(machine, state->mmc_prg_bank[0]); |
| 11182 | 11182 | prg8_ab(machine, state->mmc_prg_bank[1]); |
| 11183 | 11183 | |
| r8990 | r8991 | |
| 11213 | 11213 | mmc_helper += 2; |
| 11214 | 11214 | mmc_helper &= 7; |
| 11215 | 11215 | shift = offset & 4; |
| 11216 | ||
| 11216 | ||
| 11217 | 11217 | state->mmc_vrom_bank[mmc_helper] = (state->mmc_vrom_bank[mmc_helper] & (0xf0 >> shift)) | ((data & 0x0f) << shift); |
| 11218 | 11218 | if (shift) |
| 11219 | 11219 | state->mmc_extra_bank[mmc_helper] = data >> 4; |
| r8990 | r8991 | |
| 11254 | 11254 | } |
| 11255 | 11255 | |
| 11256 | 11256 | /************************************************************* |
| 11257 | ||
| 11257 | ||
| 11258 | 11258 | UNL-603-5052 |
| 11259 | ||
| 11259 | ||
| 11260 | 11260 | MMC3 + protection access in 0x4020 - 0x7fff |
| 11261 | ||
| 11261 | ||
| 11262 | 11262 | in MESS: Partial support |
| 11263 | 11263 | |
| 11264 | 11264 | *************************************************************/ |
| r8990 | r8991 | |
| 11275 | 11275 | READ8_HANDLER( unl_6035052_extra_r ) |
| 11276 | 11276 | { |
| 11277 | 11277 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 11278 | LOG_MMC(("unl_6035052_extra_r, offset: %04x\n", offset)); | |
| 11278 | LOG_MMC(("unl_6035052_extra_r, offset: %04x\n", offset)); | |
| 11279 | 11279 | return state->mmc_latch1; |
| 11280 | 11280 | } |
| 11281 | 11281 | |
| 11282 | 11282 | |
| 11283 | 11283 | /************************************************************* |
| 11284 | ||
| 11284 | ||
| 11285 | 11285 | BMC-POWERJOY |
| 11286 | ||
| 11286 | ||
| 11287 | 11287 | *************************************************************/ |
| 11288 | 11288 | |
| 11289 | 11289 | static void pjoy84_prg_cb( running_machine *machine, int start, int bank ) |
| 11290 | 11290 | { |
| 11291 | 11291 | nes_state *state = machine->driver_data<nes_state>(); |
| 11292 | 11292 | UINT8 flip = (state->mmc3_latch & 0x40) ? 2 : 0; |
| 11293 | ||
| 11293 | ||
| 11294 | 11294 | if (!(state->mmc_reg[3] & 0x03)) |
| 11295 | 11295 | prg8_x(machine, start, bank); |
| 11296 | 11296 | else if (start == flip) |
| r8990 | r8991 | |
| 11324 | 11324 | ((state->mmc_reg[0] << 4) & 0x080 & state->mmc_reg[0]) | |
| 11325 | 11325 | ((state->mmc_reg[0] << 3) & 0x100) | |
| 11326 | 11326 | ((state->mmc_reg[0] << 5) & 0x200); |
| 11327 | ||
| 11327 | ||
| 11328 | 11328 | state->mmc_prg_mask = BIT(state->mmc_reg[0], 6) ? 0x0f : 0x1f; |
| 11329 | 11329 | state->mmc_chr_mask = BIT(state->mmc_reg[0], 7) ? 0x7f : 0xff; |
| 11330 | 11330 | } |
| r8990 | r8991 | |
| 11346 | 11346 | pjoy84_set_base_mask(space->machine); |
| 11347 | 11347 | if (state->mmc_reg[3] & 0x10) |
| 11348 | 11348 | chr8(space->machine, (state->mmc_chr_base >> 3) | (state->mmc_reg[2] & 0x0f), state->mmc_chr_source); |
| 11349 | else | |
| 11349 | else | |
| 11350 | 11350 | mmc3_set_chr(space->machine, state->mmc_chr_source, state->mmc_chr_base, state->mmc_chr_mask); |
| 11351 | 11351 | mmc3_set_prg(space->machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 11352 | 11352 | break; |
| r8990 | r8991 | |
| 11354 | 11354 | } |
| 11355 | 11355 | |
| 11356 | 11356 | /************************************************************* |
| 11357 | ||
| 11357 | ||
| 11358 | 11358 | SOMERI TEAM |
| 11359 | ||
| 11359 | ||
| 11360 | 11360 | iNES: mapper 116 |
| 11361 | ||
| 11361 | ||
| 11362 | 11362 | Emulation note about regs in MESS: currently, |
| 11363 | 11363 | - state->mmc_cmd1 represent the board mode |
| 11364 | 11364 | - state->mmc_reg[n] for n=0,1,2,3 represent the MMC1 regs |
| r8990 | r8991 | |
| 11366 | 11366 | - state->mmc_vrom_bank[n] for n=0,...,5 represent the MMC3 CHR banks |
| 11367 | 11367 | - state->mmc_prg_bank[n] for n=4,5 represent the VRC2 PRG banks |
| 11368 | 11368 | - state->mmc_vrom_bank[n] for n=6,...,13 represent the VRC2 CHR banks |
| 11369 | ||
| 11369 | ||
| 11370 | 11370 | In MESS: Preliminary support |
| 11371 | ||
| 11371 | ||
| 11372 | 11372 | *************************************************************/ |
| 11373 | 11373 | |
| 11374 | 11374 | // MMC1 Mode emulation |
| r8990 | r8991 | |
| 11399 | 11399 | { |
| 11400 | 11400 | nes_state *state = machine->driver_data<nes_state>(); |
| 11401 | 11401 | UINT8 chr_mode = BIT(state->mmc_reg[0], 4); |
| 11402 | ||
| 11402 | ||
| 11403 | 11403 | if (chr_mode) |
| 11404 | 11404 | { |
| 11405 | 11405 | chr4_0(machine, state->mmc_reg[1] & 0x1f, state->mmc_chr_source); |
| r8990 | r8991 | |
| 11412 | 11412 | static WRITE8_HANDLER( someri_mmc1_w ) |
| 11413 | 11413 | { |
| 11414 | 11414 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 11415 | ||
| 11415 | ||
| 11416 | 11416 | assert(state->mmc_cmd1 == 2); |
| 11417 | 11417 | |
| 11418 | 11418 | if (data & 0x80) |
| 11419 | 11419 | { |
| 11420 | 11420 | state->mmc1_count = 0; |
| 11421 | 11421 | state->mmc1_latch = 0; |
| 11422 | ||
| 11422 | ||
| 11423 | 11423 | state->mmc_reg[0] |= 0x0c; |
| 11424 | 11424 | someri_mmc1_set_prg(space->machine); |
| 11425 | 11425 | return; |
| 11426 | 11426 | } |
| 11427 | ||
| 11427 | ||
| 11428 | 11428 | if (state->mmc1_count < 5) |
| 11429 | 11429 | { |
| 11430 | 11430 | if (state->mmc1_count == 0) state->mmc1_latch = 0; |
| r8990 | r8991 | |
| 11432 | 11432 | state->mmc1_latch |= (data & 0x01) ? 0x10 : 0x00; |
| 11433 | 11433 | state->mmc1_count++; |
| 11434 | 11434 | } |
| 11435 | ||
| 11435 | ||
| 11436 | 11436 | if (state->mmc1_count == 5) |
| 11437 | 11437 | { |
| 11438 | 11438 | switch (offset & 0x6000) |
| r8990 | r8991 | |
| 11463 | 11463 | someri_mmc1_set_prg(space->machine); |
| 11464 | 11464 | break; |
| 11465 | 11465 | } |
| 11466 | ||
| 11466 | ||
| 11467 | 11467 | state->mmc1_count = 0; |
| 11468 | 11468 | } |
| 11469 | 11469 | } |
| r8990 | r8991 | |
| 11473 | 11473 | { |
| 11474 | 11474 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 11475 | 11475 | UINT8 mmc_helper, cmd; |
| 11476 | ||
| 11476 | ||
| 11477 | 11477 | assert(state->mmc_cmd1 == 1); |
| 11478 | 11478 | switch (offset & 0x6001) |
| 11479 | 11479 | { |
| 11480 | 11480 | case 0x0000: |
| 11481 | 11481 | mmc_helper = state->mmc3_latch ^ data; |
| 11482 | 11482 | state->mmc3_latch = data; |
| 11483 | ||
| 11483 | ||
| 11484 | 11484 | if (mmc_helper & 0x40) |
| 11485 | 11485 | mmc3_set_prg(space->machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 11486 | ||
| 11486 | ||
| 11487 | 11487 | if (mmc_helper & 0x80) |
| 11488 | 11488 | mmc3_set_chr(space->machine, state->mmc_chr_source, state->mmc_chr_base, state->mmc_chr_mask); |
| 11489 | 11489 | break; |
| 11490 | ||
| 11490 | ||
| 11491 | 11491 | case 0x0001: |
| 11492 | 11492 | cmd = state->mmc3_latch & 0x07; |
| 11493 | 11493 | switch (cmd) |
| r8990 | r8991 | |
| 11504 | 11504 | break; |
| 11505 | 11505 | } |
| 11506 | 11506 | break; |
| 11507 | ||
| 11507 | ||
| 11508 | 11508 | case 0x2000: |
| 11509 | 11509 | set_nt_mirroring(space->machine, BIT(data, 0) ? PPU_MIRROR_HORZ : PPU_MIRROR_VERT); |
| 11510 | 11510 | break; |
| r8990 | r8991 | |
| 11521 | 11521 | { |
| 11522 | 11522 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 11523 | 11523 | UINT8 bank, shift; |
| 11524 | ||
| 11524 | ||
| 11525 | 11525 | assert(state->mmc_cmd1 == 0); |
| 11526 | 11526 | |
| 11527 | 11527 | if (offset < 0x1000) |
| r8990 | r8991 | |
| 11574 | 11574 | |
| 11575 | 11575 | switch (state->mmc_cmd1) |
| 11576 | 11576 | { |
| 11577 | case 0x00: | |
| 11577 | case 0x00: | |
| 11578 | 11578 | prg8_89(machine, state->mmc_prg_bank[4]); |
| 11579 | 11579 | prg8_ab(machine, state->mmc_prg_bank[5]); |
| 11580 | 11580 | for (i = 0; i < 8; i++) |
| 11581 | 11581 | chr1_x(machine, i, state->mmc_vrom_bank[6 + i], CHRROM); |
| 11582 | 11582 | break; |
| 11583 | case 0x01: | |
| 11583 | case 0x01: | |
| 11584 | 11584 | mmc3_set_prg(machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 11585 | 11585 | mmc3_set_chr(machine, state->mmc_chr_source, state->mmc_chr_base, state->mmc_chr_mask); |
| 11586 | 11586 | break; |
| 11587 | case 0x02: | |
| 11587 | case 0x02: | |
| 11588 | 11588 | someri_mmc1_set_prg(machine); |
| 11589 | 11589 | someri_mmc1_set_chr(machine); |
| 11590 | 11590 | break; |
| r8990 | r8991 | |
| 11609 | 11609 | |
| 11610 | 11610 | #ifdef UNUSED_FUNCTION |
| 11611 | 11611 | /************************************************************* |
| 11612 | ||
| 11612 | ||
| 11613 | 11613 | FUJIYA Board - mapper 170 according to NEStopia |
| 11614 | ||
| 11614 | ||
| 11615 | 11615 | Which games are supposed to use this? |
| 11616 | ||
| 11616 | ||
| 11617 | 11617 | *************************************************************/ |
| 11618 | 11618 | |
| 11619 | 11619 | static WRITE8_HANDLER( fujiya_m_w ) |
| r8990 | r8991 | |
| 11621 | 11621 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 11622 | 11622 | LOG_MMC(("fujiya_m_w, offset: %04x, data: %02x\n", offset, data)); |
| 11623 | 11623 | offset += 0x6000; |
| 11624 | ||
| 11624 | ||
| 11625 | 11625 | if (offset == 0x6502 || offset == 0x7000) |
| 11626 | 11626 | state->mmc_latch1 = (data & 0x40) << 1; |
| 11627 | 11627 | } |
| r8990 | r8991 | |
| 11629 | 11629 | static READ8_HANDLER( fujiya_m_r ) |
| 11630 | 11630 | { |
| 11631 | 11631 | nes_state *state = space->machine->driver_data<nes_state>(); |
| 11632 | LOG_MMC(("fujiya_m_r, offset: %04x\n", offset)); | |
| 11632 | LOG_MMC(("fujiya_m_r, offset: %04x\n", offset)); | |
| 11633 | 11633 | offset += 0x6000; |
| 11634 | ||
| 11634 | ||
| 11635 | 11635 | if (offset == 0x7001 || offset == 0x7777) |
| 11636 | 11636 | return state->mmc_latch1 | ((offset >> 8) & 0x7f); |
| 11637 | ||
| 11637 | ||
| 11638 | 11638 | return 0; |
| 11639 | 11639 | } |
| 11640 | 11640 | #endif |
| r8990 | r8991 | |
| 11688 | 11688 | |
| 11689 | 11689 | static READ8_HANDLER( dummy_l_r ) |
| 11690 | 11690 | { |
| 11691 | logerror("read access, offset: %04x\n", offset + 0x4100); | |
| 11691 | logerror("read access, offset: %04x\n", offset + 0x4100); | |
| 11692 | 11692 | return 0x00; |
| 11693 | 11693 | } |
| 11694 | 11694 | |
| 11695 | 11695 | static READ8_HANDLER( dummy_m_r ) |
| 11696 | 11696 | { |
| 11697 | logerror("read access, offset: %04x\n", offset + 0x6000); | |
| 11697 | logerror("read access, offset: %04x\n", offset + 0x6000); | |
| 11698 | 11698 | return 0x00; |
| 11699 | 11699 | } |
| 11700 | 11700 | |
| 11701 | 11701 | static READ8_HANDLER( dummy_r ) |
| 11702 | 11702 | { |
| 11703 | logerror("read access, offset: %04x\n", offset + 0x8000); | |
| 11703 | logerror("read access, offset: %04x\n", offset + 0x8000); | |
| 11704 | 11704 | return 0x00; |
| 11705 | 11705 | } |
| 11706 | 11706 | |
| r8990 | r8991 | |
| 11969 | 11969 | { |
| 11970 | 11970 | nes_state *state = machine->driver_data<nes_state>(); |
| 11971 | 11971 | const nes_pcb_intf *intf = nes_pcb_intf_lookup(state->pcb_id); |
| 11972 | ||
| 11972 | ||
| 11973 | 11973 | if (intf == NULL) |
| 11974 | 11974 | fatalerror("Missing PCB interface\n"); |
| 11975 | ||
| 11975 | ||
| 11976 | 11976 | if (intf) |
| 11977 | 11977 | { |
| 11978 | 11978 | state->mmc_write_low = intf->mmc_l.write; |
| r8990 | r8991 | |
| 11994 | 11994 | state->mmc_read = NULL; // in progress |
| 11995 | 11995 | ppu_latch = NULL; |
| 11996 | 11996 | } |
| 11997 | ||
| 11997 | ||
| 11998 | 11998 | state->mmc3_prg_cb = prg8_x; |
| 11999 | 11999 | state->mmc3_chr_cb = chr1_x; |
| 12000 | ||
| 12000 | ||
| 12001 | 12001 | switch (state->pcb_id) |
| 12002 | 12002 | { |
| 12003 | 12003 | case STD_TXSROM: |
| r8990 | r8991 | |
| 12081 | 12081 | } |
| 12082 | 12082 | |
| 12083 | 12083 | /************************************************************* |
| 12084 | ||
| 12084 | ||
| 12085 | 12085 | pcb_initialize |
| 12086 | 12086 | |
| 12087 | 12087 | Initialize all the necessary registers and quantities for |
| 12088 | 12088 | emulation of each board |
| 12089 | ||
| 12089 | ||
| 12090 | 12090 | *************************************************************/ |
| 12091 | 12091 | |
| 12092 | 12092 | /* this is used by many boards (MMC3, MMC6 + most MMC3 pirate clone boards) */ |
| 12093 | 12093 | static void mmc3_common_initialize( running_machine *machine, int prg_mask, int chr_mask, int IRQ_type ) |
| 12094 | 12094 | { |
| 12095 | 12095 | nes_state *state = machine->driver_data<nes_state>(); |
| 12096 | ||
| 12096 | ||
| 12097 | 12097 | state->mmc3_alt_irq = IRQ_type; // later MMC3 boards seem to use MMC6-type IRQ... more investigations are in progress at NESDev... |
| 12098 | 12098 | state->mmc_prg_bank[0] = state->mmc_prg_bank[2] = 0xfe; // prg_bank[2] & prg_bank[3] remain always the same in most MMC3 variants |
| 12099 | 12099 | state->mmc_prg_bank[1] = state->mmc_prg_bank[3] = 0xff; // but some pirate clone mappers change them after writing certain registers |
| r8990 | r8991 | |
| 12111 | 12111 | { |
| 12112 | 12112 | nes_state *state = machine->driver_data<nes_state>(); |
| 12113 | 12113 | int err = 0, i; |
| 12114 | ||
| 12114 | ||
| 12115 | 12115 | /* basic PRG config */ |
| 12116 | 12116 | prg32(machine, 0); |
| 12117 | ||
| 12117 | ||
| 12118 | 12118 | /* some boards will not use this, but directly CHRROM (resp. CHRRAM) if the board only has VROM (resp. VRAM) */ |
| 12119 | 12119 | state->mmc_chr_source = state->chr_chunks ? CHRROM : CHRRAM; |
| 12120 | 12120 | chr8(machine, 0, state->mmc_chr_source); |
| 12121 | ||
| 12121 | ||
| 12122 | 12122 | /* Here, we init a few helpers: 4 prg banks and 16 chr banks - some mappers use them */ |
| 12123 | 12123 | for (i = 0; i < 4; i++) |
| 12124 | 12124 | state->mmc_prg_bank[i] = 0; |
| r8990 | r8991 | |
| 12126 | 12126 | state->mmc_vrom_bank[i] = 0; |
| 12127 | 12127 | for (i = 0; i < 16; i++) |
| 12128 | 12128 | state->mmc_extra_bank[i] = 0; |
| 12129 | ||
| 12129 | ||
| 12130 | 12130 | state->mmc_latch1 = 0; |
| 12131 | 12131 | state->mmc_latch2 = 0; |
| 12132 | ||
| 12132 | ||
| 12133 | 12133 | /* Finally, we init IRQ-related quantities. */ |
| 12134 | 12134 | state->IRQ_enable = state->IRQ_enable_latch = 0; |
| 12135 | 12135 | state->IRQ_count = state->IRQ_count_latch = 0; |
| 12136 | 12136 | state->IRQ_toggle = 0; |
| 12137 | ||
| 12137 | ||
| 12138 | 12138 | switch (idx) |
| 12139 | 12139 | { |
| 12140 | 12140 | /* many boards only needs PRG to point at first 32k and CHR at first 8k */ |
| r8990 | r8991 | |
| 12193 | 12193 | case BMC_WS: |
| 12194 | 12194 | case UNL_EDU2K: |
| 12195 | 12195 | break; |
| 12196 | ||
| 12196 | ||
| 12197 | 12197 | /* other boards need additional initialization */ |
| 12198 | 12198 | case STD_UXROM: // mapper 2 |
| 12199 | 12199 | case STD_UN1ROM: // mapper 94 |
| r8990 | r8991 | |
| 12238 | 12238 | prg16_89ab(machine, 0); |
| 12239 | 12239 | prg16_cdef(machine, state->prg_chunks - 1); |
| 12240 | 12240 | break; |
| 12241 | ||
| 12241 | ||
| 12242 | 12242 | case STD_CPROM: // mapper 13 |
| 12243 | 12243 | chr4_0(machine, 0, CHRRAM); |
| 12244 | 12244 | chr4_4(machine, 0, CHRRAM); |
| r8990 | r8991 | |
| 12402 | 12402 | if (!state->hard_mirroring) |
| 12403 | 12403 | set_nt_mirroring(machine, PPU_MIRROR_LOW); |
| 12404 | 12404 | break; |
| 12405 | ||
| 12405 | ||
| 12406 | 12406 | // mapper 14 |
| 12407 | 12407 | case REXSOFT_SL1632: |
| 12408 | 12408 | state->mmc_extra_bank[2] = 0xfe; |
| r8990 | r8991 | |
| 12416 | 12416 | case WAIXING_PS2: |
| 12417 | 12417 | set_nt_mirroring(machine, PPU_MIRROR_VERT); |
| 12418 | 12418 | break; |
| 12419 | ||
| 12419 | ||
| 12420 | 12420 | // mapper 35 |
| 12421 | 12421 | case UNL_SC127: |
| 12422 | 12422 | // mapper 42 |
| r8990 | r8991 | |
| 12424 | 12424 | case BTL_AISENSHINICOL: |
| 12425 | 12425 | prg32(machine, 0xff); |
| 12426 | 12426 | break; |
| 12427 | ||
| 12427 | ||
| 12428 | 12428 | // mapper 40 |
| 12429 | 12429 | case BTL_SMB2A: |
| 12430 | 12430 | prg8_67(machine, 0xfe); |
| r8990 | r8991 | |
| 12433 | 12433 | prg8_cd(machine, 0xfe); |
| 12434 | 12434 | prg8_ef(machine, 0xff); |
| 12435 | 12435 | break; |
| 12436 | ||
| 12436 | ||
| 12437 | 12437 | // mapper 43 |
| 12438 | 12438 | case UNL_SMB2J: |
| 12439 | 12439 | if (state->battery) |
| r8990 | r8991 | |
| 12452 | 12452 | state->mmc_reg[0] = state->mmc_reg[1] = state->mmc_reg[2] = state->mmc_reg[3] = 0; |
| 12453 | 12453 | mmc3_common_initialize(machine, 0x3f, 0xff, 0); |
| 12454 | 12454 | break; |
| 12455 | ||
| 12455 | ||
| 12456 | 12456 | // mapper 50 |
| 12457 | 12457 | case BTL_SMB2B: |
| 12458 | 12458 | prg8_67(machine, 0x0f); |
| r8990 | r8991 | |
| 12481 | 12481 | prg16_89ab(machine, 0); |
| 12482 | 12482 | prg16_cdef(machine, 0); |
| 12483 | 12483 | break; |
| 12484 | ||
| 12484 | ||
| 12485 | 12485 | // mapper 64 |
| 12486 | 12486 | case TENGEN_800032: |
| 12487 | 12487 | // mapper 158 |
| r8990 | r8991 | |
| 12495 | 12495 | case CAMERICA_BF9093: |
| 12496 | 12496 | prg32(machine, 0xff); |
| 12497 | 12497 | break; |
| 12498 | ||
| 12498 | ||
| 12499 | 12499 | // mapper 79 (& 146) |
| 12500 | 12500 | case AVE_NINA06: |
| 12501 | 12501 | set_nt_mirroring(machine, PPU_MIRROR_HORZ); |
| 12502 | 12502 | break; |
| 12503 | ||
| 12503 | ||
| 12504 | 12504 | // mapper 83 |
| 12505 | 12505 | case CONY_BOARD: |
| 12506 | 12506 | state->mapper83_reg[9] = 0x0f; |
| 12507 | 12507 | prg8_cd(machine, 0x1e); |
| 12508 | 12508 | prg8_ef(machine, 0x1f); |
| 12509 | 12509 | break; |
| 12510 | ||
| 12510 | ||
| 12511 | 12511 | // mapper 91 |
| 12512 | 12512 | case UNL_MK2: |
| 12513 | 12513 | set_nt_mirroring(machine, PPU_MIRROR_VERT); |
| 12514 | 12514 | prg16_89ab(machine, state->prg_chunks - 1); |
| 12515 | 12515 | prg16_cdef(machine, state->prg_chunks - 1); |
| 12516 | 12516 | break; |
| 12517 | ||
| 12517 | ||
| 12518 | 12518 | // mapper 104 |
| 12519 | 12519 | case CAMERICA_GOLDENFIVE: |
| 12520 | 12520 | prg16_89ab(machine, 0x00); |
| r8990 | r8991 | |
| 12527 | 12527 | prg8_cd(machine, 0); |
| 12528 | 12528 | prg8_ef(machine, (state->prg_chunks << 1) - 1); |
| 12529 | 12529 | break; |
| 12530 | ||
| 12530 | ||
| 12531 | 12531 | // mapper 108 |
| 12532 | 12532 | case WHIRLWIND_2706: |
| 12533 | 12533 | prg32(machine, 0xff); |
| 12534 | 12534 | break; |
| 12535 | ||
| 12535 | ||
| 12536 | 12536 | // mapper 114 |
| 12537 | 12537 | case SUPERGAME_LIONKING: |
| 12538 | 12538 | state->map114_reg = state->map114_reg_enabled = 0; |
| r8990 | r8991 | |
| 12575 | 12575 | state->mmc_vrom_bank[6 + i] = i; |
| 12576 | 12576 | someri_mode_update(machine); |
| 12577 | 12577 | break; |
| 12578 | ||
| 12578 | ||
| 12579 | 12579 | // mapper 120 |
| 12580 | 12580 | case BTL_TOBIDASE: |
| 12581 | 12581 | prg32(machine, 2); |
| 12582 | 12582 | break; |
| 12583 | ||
| 12583 | ||
| 12584 | 12584 | // mapper 121 |
| 12585 | 12585 | case KAY_PANDAPRINCE: |
| 12586 | 12586 | state->mmc_reg[5] = state->mmc_reg[6] = state->mmc_reg[7] = 0; |
| 12587 | 12587 | mmc3_common_initialize(machine, 0xff, 0xff, 0); |
| 12588 | 12588 | break; |
| 12589 | ||
| 12589 | ||
| 12590 | 12590 | // mapper 126 |
| 12591 | 12591 | case BMC_PJOY84: |
| 12592 | 12592 | mmc3_common_initialize(machine, 0xff, 0xff, 0); |
| r8990 | r8991 | |
| 12595 | 12595 | mmc3_set_chr(machine, state->mmc_chr_source, state->mmc_chr_base, state->mmc_chr_mask); |
| 12596 | 12596 | mmc3_set_prg(machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 12597 | 12597 | break; |
| 12598 | ||
| 12598 | ||
| 12599 | 12599 | // mapper 132 |
| 12600 | 12600 | case TXC_22211A: |
| 12601 | 12601 | // mapper 172 |
| r8990 | r8991 | |
| 12604 | 12604 | case TXC_22211C: |
| 12605 | 12605 | state->txc_reg[0] = state->txc_reg[1] = state->txc_reg[2] = state->txc_reg[3] = 0; |
| 12606 | 12606 | break; |
| 12607 | ||
| 12607 | ||
| 12608 | 12608 | // mapper 134 |
| 12609 | 12609 | case BMC_FAMILY_4646B: |
| 12610 | 12610 | mmc3_common_initialize(machine, 0x1f, 0xff, 0); |
| 12611 | 12611 | break; |
| 12612 | ||
| 12612 | ||
| 12613 | 12613 | // mapper 137 |
| 12614 | 12614 | case SACHEN_8259D: |
| 12615 | 12615 | chr8(machine, state->chr_chunks - 1, CHRROM); |
| r8990 | r8991 | |
| 12630 | 12630 | prg16_89ab(machine, 0); |
| 12631 | 12631 | prg16_cdef(machine, 1); |
| 12632 | 12632 | break; |
| 12633 | ||
| 12633 | ||
| 12634 | 12634 | // mapper 156 |
| 12635 | 12635 | case OPENCORP_DAOU306: |
| 12636 | 12636 | prg16_89ab(machine, state->prg_chunks - 2); |
| r8990 | r8991 | |
| 12662 | 12662 | prg16_89ab(machine, 0); |
| 12663 | 12663 | prg16_cdef(machine, 0x20); |
| 12664 | 12664 | break; |
| 12665 | ||
| 12665 | ||
| 12666 | 12666 | // mapper 176 |
| 12667 | 12667 | case UNL_XZY: |
| 12668 | 12668 | // mapper 182 |
| 12669 | 12669 | case HOSENKAN_BOARD: |
| 12670 | 12670 | prg32(machine, (state->prg_chunks - 1) >> 1); |
| 12671 | 12671 | break; |
| 12672 | ||
| 12672 | ||
| 12673 | 12673 | case FUKUTAKE_BOARD: // mapper 186 |
| 12674 | 12674 | prg16_89ab(machine, 0); |
| 12675 | 12675 | prg16_cdef(machine, 0); |
| 12676 | 12676 | break; |
| 12677 | ||
| 12677 | ||
| 12678 | 12678 | // mapper 187 |
| 12679 | 12679 | case UNL_KOF96: |
| 12680 | 12680 | state->mmc_reg[0] = state->mmc_reg[1] = state->mmc_reg[2] = state->mmc_reg[3] = 0; |
| r8990 | r8991 | |
| 12725 | 12725 | state->mmc_vrom_bank[7] = 0x03; |
| 12726 | 12726 | waixing_g_set_chr(machine, state->mmc_chr_base, state->mmc_chr_mask); |
| 12727 | 12727 | break; |
| 12728 | ||
| 12728 | ||
| 12729 | 12729 | // mapper 200 |
| 12730 | 12730 | case BMC_36IN1: |
| 12731 | 12731 | prg16_89ab(machine, state->prg_chunks - 1); |
| 12732 | 12732 | prg16_cdef(machine, state->prg_chunks - 1); |
| 12733 | 12733 | break; |
| 12734 | ||
| 12734 | ||
| 12735 | 12735 | // mapper 202 |
| 12736 | 12736 | case BMC_150IN1: |
| 12737 | 12737 | // mapper 203 |
| r8990 | r8991 | |
| 12749 | 12749 | state->mmc_prg_base = 0x10; // this board has a diff prg_base |
| 12750 | 12750 | mmc3_set_prg(machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 12751 | 12751 | break; |
| 12752 | ||
| 12752 | ||
| 12753 | 12753 | // mapper 208 |
| 12754 | 12754 | case GOUDER_37017: |
| 12755 | 12755 | state->mmc_reg[0] = state->mmc_reg[1] = state->mmc_reg[2] = state->mmc_reg[3] = state->mmc_reg[4] = 0; |
| r8990 | r8991 | |
| 12760 | 12760 | chr8(machine, 0xff, CHRROM); |
| 12761 | 12761 | prg32(machine, 0xff); |
| 12762 | 12762 | break; |
| 12763 | ||
| 12763 | ||
| 12764 | 12764 | // mapper 215 |
| 12765 | 12765 | case SUPERGAME_BOOGERMAN: |
| 12766 | 12766 | state->mmc_reg[0] = 0x00; |
| r8990 | r8991 | |
| 12771 | 12771 | sgame_boog_set_prg(machine); |
| 12772 | 12772 | mmc3_set_chr(machine, state->mmc_chr_source, state->mmc_chr_base, state->mmc_chr_mask); |
| 12773 | 12773 | break; |
| 12774 | ||
| 12774 | ||
| 12775 | 12775 | // mapper 217 |
| 12776 | 12776 | case BMC_GOLDENCARD_6IN1: |
| 12777 | 12777 | mmc3_common_initialize(machine, 0xff, 0xff, 0); |
| r8990 | r8991 | |
| 12787 | 12787 | prg16_89ab(machine, 0); |
| 12788 | 12788 | prg16_cdef(machine, 0); |
| 12789 | 12789 | break; |
| 12790 | ||
| 12790 | ||
| 12791 | 12791 | // mapper 223? |
| 12792 | 12792 | case WAIXING_TYPE_I: |
| 12793 | 12793 | mmc3_common_initialize(machine, 0xff, 0xff, 0); |
| 12794 | 12794 | state->mmc3_wram_protect = 0; |
| 12795 | 12795 | break; |
| 12796 | ||
| 12796 | ||
| 12797 | 12797 | // mapper 224? |
| 12798 | 12798 | case WAIXING_TYPE_J: |
| 12799 | 12799 | mmc3_common_initialize(machine, 0xff, 0xff, 0); |
| r8990 | r8991 | |
| 12803 | 12803 | state->mmc_prg_bank[3] = 0x7f; |
| 12804 | 12804 | mmc3_set_prg(machine, state->mmc_prg_base, state->mmc_prg_mask); |
| 12805 | 12805 | break; |
| 12806 | ||
| 12806 | ||
| 12807 | 12807 | // mapper 227 |
| 12808 | 12808 | case BMC_1200IN1: |
| 12809 | 12809 | prg16_89ab(machine, 0); |
| 12810 | 12810 | prg16_cdef(machine, 0); |
| 12811 | 12811 | break; |
| 12812 | ||
| 12812 | ||
| 12813 | 12813 | // mapper 229 |
| 12814 | 12814 | case BMC_31IN1: |
| 12815 | 12815 | prg16_89ab(machine, 0); |
| r8990 | r8991 | |
| 12833 | 12833 | state->mmc_latch2 = 0x00; |
| 12834 | 12834 | bf9096_set_prg(machine); |
| 12835 | 12835 | break; |
| 12836 | ||
| 12836 | ||
| 12837 | 12837 | // mapper 243 |
| 12838 | 12838 | case SACHEN_74LS374_A: |
| 12839 | 12839 | state->mmc_vrom_bank[0] = 3; |
| 12840 | 12840 | chr8(machine, 3, CHRROM); |
| 12841 | 12841 | set_nt_mirroring(machine, PPU_MIRROR_VERT); |
| 12842 | 12842 | break; |
| 12843 | ||
| 12843 | ||
| 12844 | 12844 | // mapper 246 |
| 12845 | 12845 | case CNE_FSB: |
| 12846 | 12846 | prg32(machine, 0xff); |
| r8990 | r8991 | |
| 12850 | 12850 | state->mmc_reg[0] = 0; |
| 12851 | 12851 | mmc3_common_initialize(machine, 0xff, 0xff, 0); |
| 12852 | 12852 | break; |
| 12853 | ||
| 12853 | ||
| 12854 | 12854 | // mapper 254 |
| 12855 | 12855 | case BTL_PIKACHUY2K: |
| 12856 | 12856 | state->mmc_reg[0] = 0xff; |
| 12857 | 12857 | mmc3_common_initialize(machine, 0xff, 0xff, 0); |
| 12858 | 12858 | break; |
| 12859 | ||
| 12859 | ||
| 12860 | 12860 | // mapper 255 |
| 12861 | 12861 | case BMC_110IN1: |
| 12862 | 12862 | prg16_89ab(machine, 0); |
| 12863 | 12863 | prg16_cdef(machine, 1); |
| 12864 | 12864 | set_nt_mirroring(machine, PPU_MIRROR_VERT); |
| 12865 | 12865 | break; |
| 12866 | ||
| 12866 | ||
| 12867 | 12867 | // UNIF only |
| 12868 | 12868 | case BMC_64IN1NR: |
| 12869 | 12869 | state->mmc_reg[0] = 0x80; |
| r8990 | r8991 | |
| 12919 | 12919 | prg16_89ab(machine, 0); |
| 12920 | 12920 | prg16_cdef(machine, state->prg_chunks - 1); |
| 12921 | 12921 | break; |
| 12922 | ||
| 12922 | ||
| 12923 | 12923 | case BMC_BENSHENG_BS5: |
| 12924 | 12924 | state->mmc_prg_bank[0] = 0xff; |
| 12925 | 12925 | state->mmc_prg_bank[1] = 0xff; |
| r8990 | r8991 | |
| 12927 | 12927 | state->mmc_prg_bank[3] = 0xff; |
| 12928 | 12928 | bmc_bs5_update_banks(machine); |
| 12929 | 12929 | break; |
| 12930 | ||
| 12930 | ||
| 12931 | 12931 | case BMC_810544: |
| 12932 | 12932 | prg16_89ab(machine, 0); |
| 12933 | 12933 | prg16_cdef(machine, 0); |
| 12934 | 12934 | set_nt_mirroring(machine, PPU_MIRROR_VERT); |
| 12935 | 12935 | break; |
| 12936 | ||
| 12936 | ||
| 12937 | 12937 | case BMC_G63IN1: |
| 12938 | 12938 | bmc_gb63_update(machine); |
| 12939 | 12939 | break; |
| 12940 | ||
| 12940 | ||
| 12941 | 12941 | case BMC_FK23C: |
| 12942 | 12942 | state->mmc_reg[0] = 4; |
| 12943 | 12943 | state->mmc_reg[1] = 0xff; |
| r8990 | r8991 | |
| 12947 | 12947 | fk23c_set_prg(machine); |
| 12948 | 12948 | fk23c_set_chr(machine); |
| 12949 | 12949 | break; |
| 12950 | ||
| 12950 | ||
| 12951 | 12951 | case BMC_FK23CA: |
| 12952 | 12952 | state->mmc_reg[0] = state->mmc_reg[1] = state->mmc_reg[2] = state->mmc_reg[3] = 0; |
| 12953 | 12953 | state->mmc_reg[4] = state->mmc_reg[5] = state->mmc_reg[6] = state->mmc_reg[7] = 0xff; |
| r8990 | r8991 | |
| 12955 | 12955 | fk23c_set_prg(machine); |
| 12956 | 12956 | fk23c_set_chr(machine); |
| 12957 | 12957 | break; |
| 12958 | ||
| 12959 | ||
| 12958 | ||
| 12959 | ||
| 12960 | 12960 | case FFE_MAPPER6: |
| 12961 | 12961 | prg16_89ab(machine, 0); |
| 12962 | 12962 | prg16_cdef(machine, 7); |
| r8990 | r8991 | |
| 12968 | 12968 | prg16_89ab(machine, 0); |
| 12969 | 12969 | prg16_cdef(machine, state->prg_chunks - 1); |
| 12970 | 12970 | break; |
| 12971 | ||
| 12971 | ||
| 12972 | 12972 | case UNSUPPORTED_BOARD: |
| 12973 | 12973 | default: |
| 12974 | 12974 | /* Mapper not supported */ |
| 12975 | 12975 | err = 2; |
| 12976 | 12976 | break; |
| 12977 | 12977 | } |
| 12978 | ||
| 12978 | ||
| 12979 | 12979 | return err; |
| 12980 | 12980 | } |
| 12981 | 12981 | |
| 12982 | 12982 | /************************************************************* |
| 12983 | ||
| 12983 | ||
| 12984 | 12984 | nes_pcb_reset |
| 12985 | ||
| 12985 | ||
| 12986 | 12986 | Resets the mmc bankswitch areas to their defaults. |
| 12987 | 12987 | It returns a value "err" that indicates if it was |
| 12988 | 12988 | successful. Possible values for err are: |
| 12989 | ||
| 12989 | ||
| 12990 | 12990 | 0 = success |
| 12991 | 12991 | 1 = no pcb found |
| 12992 | 12992 | 2 = pcb not supported |
| 12993 | ||
| 12993 | ||
| 12994 | 12994 | *************************************************************/ |
| 12995 | 12995 | |
| 12996 | 12996 | int nes_pcb_reset( running_machine *machine ) |
| r8990 | r8991 | |
|---|---|---|
| 80 | 80 | |
| 81 | 81 | MACHINE_RESET ( zx80 ) |
| 82 | 82 | { |
| 83 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(zx_setdirect, *machine)); | |
| 83 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(zx_setdirect, *machine)); | |
| 84 | 84 | zx_tape_bit = 0x80; |
| 85 | 85 | } |
| 86 | 86 |
| r8990 | r8991 | |
|---|---|---|
| 212 | 212 | |
| 213 | 213 | if (!nmi_delay_counter) |
| 214 | 214 | { |
| 215 | cputag_get_address_space(machine, "z80ne", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(z80ne_default, *machine)); | |
| 215 | cputag_get_address_space(machine, "z80ne", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(z80ne_default, *machine)); | |
| 216 | 216 | cputag_set_input_line(machine, "z80ne", INPUT_LINE_NMI, PULSE_LINE); |
| 217 | 217 | } |
| 218 | 218 | return address; |
| r8990 | r8991 | |
| 259 | 259 | |
| 260 | 260 | /* after the first 3 bytes have been read from ROM, switch the RAM back in */ |
| 261 | 261 | reset_delay_counter = 2; |
| 262 | space->set_direct_update_handler(direct_update_delegate_create_static(reset_delay_count, *machine)); | |
| 262 | space->set_direct_update_handler(direct_update_delegate_create_static(reset_delay_count, *machine)); | |
| 263 | 263 | } |
| 264 | 264 | |
| 265 | 265 | static void reset_lx390_banking(running_machine *machine) |
| r8990 | r8991 | |
| 277 | 277 | memory_set_bank(machine, "bank4", 0); /* RAM at 0xF000 */ |
| 278 | 278 | /* after the first 3 bytes have been read from ROM, switch the RAM back in */ |
| 279 | 279 | reset_delay_counter = 2; |
| 280 | space->set_direct_update_handler(direct_update_delegate_create_static(reset_delay_count, *machine)); | |
| 280 | space->set_direct_update_handler(direct_update_delegate_create_static(reset_delay_count, *machine)); | |
| 281 | 281 | break; |
| 282 | 282 | case 0x02: /* EP548 16k BASIC */ |
| 283 | 283 | if (VERBOSE) |
| r8990 | r8991 | |
| 517 | 517 | else |
| 518 | 518 | /* after writing to port 0xF8 and the first ~M1 cycles strike a NMI for single step execution */ |
| 519 | 519 | nmi_delay_counter = 1; |
| 520 | cputag_get_address_space(space->machine, "z80ne", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(nmi_delay_count, *space->machine)); | |
| 520 | cputag_get_address_space(space->machine, "z80ne", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(nmi_delay_count, *space->machine)); | |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 |
| r8990 | r8991 | |
|---|---|---|
| 1605 | 1605 | if (opptr != NULL) |
| 1606 | 1606 | { |
| 1607 | 1607 | direct.explicit_configure(address, address, ~0, opptr - address); |
| 1608 | ||
| 1608 | ||
| 1609 | 1609 | address = ~0; |
| 1610 | 1610 | } |
| 1611 | 1611 | } |
| r8990 | r8991 | |
| 1690 | 1690 | memory_install_read8_handler(space, 0xe1c000, 0xe1cfff, 0, 0, apple2gs_E1Cxxx_r); |
| 1691 | 1691 | memory_install_write8_handler(space, 0xe1c000, 0xe1cfff, 0, 0, apple2gs_E1Cxxx_w); |
| 1692 | 1692 | space->set_direct_update_handler(direct_update_delegate_create_static(apple2gs_opbase, *machine)); |
| 1693 | ||
| 1694 | 1693 | |
| 1694 | ||
| 1695 | 1695 | /* install aux memory writes (for shadowing) */ |
| 1696 | 1696 | memory_install_write8_handler(space, 0x010400, 0x0107FF, 0, 0, apple2gs_aux0400_w); |
| 1697 | 1697 | memory_install_write8_handler(space, 0x012000, 0x013FFF, 0, 0, apple2gs_aux2000_w); |
| r8990 | r8991 | |
|---|---|---|
| 1833 | 1833 | } |
| 1834 | 1834 | } |
| 1835 | 1835 | |
| 1836 | // mac->adb_timer_ticks = 8; | |
| 1837 | // timer_adjust_oneshot(mac_adb_timer, attotime_make(0, ATTOSECONDS_IN_USEC(100)), 0); | |
| 1836 | // mac->adb_timer_ticks = 8; | |
| 1837 | // timer_adjust_oneshot(mac_adb_timer, attotime_make(0, ATTOSECONDS_IN_USEC(100)), 0); | |
| 1838 | 1838 | |
| 1839 | 1839 | if ((mac->adb_datasize == 0) && (mac->adb_streaming == MCU_STREAMING_NONE)) |
| 1840 | 1840 | { |
| r8990 | r8991 | |
| 1872 | 1872 | ret = (mac->adb_send & 0x80)>>7; |
| 1873 | 1873 | mac->adb_send <<= 1; |
| 1874 | 1874 | |
| 1875 | // | |
| 1875 | // printf("VIA IN CB2 = %x\n", ret); | |
| 1876 | 1876 | |
| 1877 | 1877 | return ret; |
| 1878 | 1878 | } |
| r8990 | r8991 | |
| 1964 | 1964 | mac->adb_buffer[4] = 1; // type |
| 1965 | 1965 | mac->adb_buffer[3] = 0; // flag |
| 1966 | 1966 | mac->adb_buffer[2] = cmd; // command |
| 1967 | mac->adb_buffer[1] = mac->rtc_ram[addr]; | |
| 1967 | mac->adb_buffer[1] = mac->rtc_ram[addr]; | |
| 1968 | 1968 | |
| 1969 | 1969 | mac->adb_state |= 1; |
| 1970 | 1970 | mac->adb_timer_ticks = 8; |
| r8990 | r8991 | |
| 2834 | 2834 | (model == MODEL_MAC_LC_II) || (model == MODEL_MAC_LC_III) || ((mac->mac_model >= MODEL_MAC_II) && (mac->mac_model <= MODEL_MAC_SE30)) || |
| 2835 | 2835 | (model == MODEL_MAC_PORTABLE) || (model == MODEL_MAC_PB100)) |
| 2836 | 2836 | { |
| 2837 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(overlay_opbaseoverride, *machine)); | |
| 2837 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(overlay_opbaseoverride, *machine)); | |
| 2838 | 2838 | } |
| 2839 | 2839 | |
| 2840 | 2840 | /* setup keyboard */ |
| r8990 | r8991 | |
|---|---|---|
| 449 | 449 | } |
| 450 | 450 | |
| 451 | 451 | |
| 452 | // FIXME: this is getting messier and messier (no pun intended). inputs reading should be simplified and port_categories cleaned up | |
| 452 | // FIXME: this is getting messier and messier (no pun intended). inputs reading should be simplified and port_categories cleaned up | |
| 453 | 453 | // to also emulate the fact that nothing should be in Port 2 if there is a Crazy Climber pad, etc. |
| 454 | 454 | static void nes_read_input_device( running_machine *machine, int cfg, nes_input *vals, int pad_port, int supports_zapper ) |
| 455 | 455 | { |
| 456 | 456 | nes_state *state = machine->driver_data<nes_state>(); |
| 457 | 457 | static const char *const padnames[] = { "PAD1", "PAD2", "PAD3", "PAD4", "CC_LEFT", "CC_RIGHT" }; |
| 458 | ||
| 458 | ||
| 459 | 459 | vals->i0 = 0; |
| 460 | 460 | vals->i1 = 0; |
| 461 | 461 | vals->i2 = 0; |
| 462 | ||
| 462 | ||
| 463 | 463 | switch (cfg & 0x0f) |
| 464 | 464 | { |
| 465 | 465 | case 0x01: /* gamepad */ |
| 466 | 466 | if (pad_port >= 0) |
| 467 | 467 | vals->i0 = input_port_read(machine, padnames[pad_port]); |
| 468 | 468 | break; |
| 469 | ||
| 469 | ||
| 470 | 470 | case 0x02: /* zapper 1 */ |
| 471 | 471 | if (supports_zapper) |
| 472 | 472 | { |
| r8990 | r8991 | |
| 475 | 475 | vals->i2 = input_port_read(machine, "ZAPPER1_Y"); |
| 476 | 476 | } |
| 477 | 477 | break; |
| 478 | ||
| 478 | ||
| 479 | 479 | case 0x03: /* zapper 2 */ |
| 480 | 480 | if (supports_zapper) |
| 481 | 481 | { |
| r8990 | r8991 | |
| 484 | 484 | vals->i2 = input_port_read(machine, "ZAPPER2_Y"); |
| 485 | 485 | } |
| 486 | 486 | break; |
| 487 | ||
| 487 | ||
| 488 | 488 | case 0x04: /* arkanoid paddle */ |
| 489 | 489 | if (pad_port == 1) |
| 490 | 490 | vals->i0 = (UINT8) ((UINT8) input_port_read(machine, "PADDLE") + (UINT8)0x52) ^ 0xff; |
| 491 | 491 | break; |
| 492 | ||
| 492 | ||
| 493 | 493 | case 0x05: /* crazy climber controller */ |
| 494 | 494 | if (pad_port == 0) |
| 495 | 495 | { |
| r8990 | r8991 | |
| 556 | 556 | { |
| 557 | 557 | if (data & 0x01) |
| 558 | 558 | return; |
| 559 | ||
| 559 | ||
| 560 | 560 | if (LOG_JOY) |
| 561 | 561 | logerror("joy 0 bits read: %d\n", state->in_0.shift); |
| 562 | ||
| 562 | ||
| 563 | 563 | /* Toggling bit 0 high then low resets both controllers */ |
| 564 | 564 | state->in_0.shift = 0; |
| 565 | 565 | state->in_1.shift = 0; |
| 566 | ||
| 566 | ||
| 567 | 567 | /* Read the input devices */ |
| 568 | 568 | if ((cfg & 0x000f) != 0x06) |
| 569 | 569 | { |
| r8990 | r8991 | |
| 579 | 579 | nes_read_input_device(space->machine, 0, &state->in_3, 3, FALSE); |
| 580 | 580 | nes_read_input_device(space->machine, cfg >> 0, &state->in_0, 0, TRUE); |
| 581 | 581 | } |
| 582 | ||
| 582 | ||
| 583 | 583 | if (cfg & 0x0f00) |
| 584 | 584 | state->in_0.i0 |= (state->in_2.i0 << 8) | (0x08 << 16); |
| 585 | ||
| 585 | ||
| 586 | 586 | if (cfg & 0xf000) |
| 587 | 587 | state->in_1.i0 |= (state->in_3.i0 << 8) | (0x04 << 16); |
| 588 | 588 | } |
| r8990 | r8991 | |
| 710 | 710 | state->prg_chunks = mapint3; |
| 711 | 711 | state->chr_chunks = mapint4; |
| 712 | 712 | logerror("NES.HSI info: %d %d %d %d\n", mapint1, mapint2, mapint3, mapint4); |
| 713 | // | |
| 713 | // printf("NES.HSI info: %d %d %d %d\n", mapint1, mapint2, mapint3, mapint4); | |
| 714 | 714 | goodcrcinfo = 1; |
| 715 | 715 | state->ines20 = 0; |
| 716 | 716 | } |
| r8990 | r8991 | |
| 725 | 725 | } |
| 726 | 726 | |
| 727 | 727 | state->hard_mirroring = (local_options & 0x01) ? PPU_MIRROR_VERT : PPU_MIRROR_HORZ; |
| 728 | // | |
| 728 | // printf("%s\n", state->hard_mirroring & 0x01 ? "Vertical" : "Horizontal"); | |
| 729 | 729 | state->battery = local_options & 0x02; |
| 730 | 730 | state->trainer = local_options & 0x04; |
| 731 | 731 | state->four_screen_vram = local_options & 0x08; |
| r8990 | r8991 | |
| 895 | 895 | /* Allocate internal Mapper RAM for boards which require it */ |
| 896 | 896 | if (state->pcb_id == STD_EXROM) |
| 897 | 897 | state->mapper_ram = auto_alloc_array(image.device().machine, UINT8, 0x400); |
| 898 | ||
| 898 | ||
| 899 | 899 | if (state->pcb_id == TAITO_X1_005 || state->pcb_id == TAITO_X1_005_A) |
| 900 | 900 | state->mapper_bram = auto_alloc_array(image.device().machine, UINT8, 0x80); |
| 901 | ||
| 901 | ||
| 902 | 902 | if (state->pcb_id == TAITO_X1_017) |
| 903 | 903 | state->mapper_bram = auto_alloc_array(image.device().machine, UINT8, 0x1400); |
| 904 | ||
| 904 | ||
| 905 | 905 | if (state->pcb_id == NAMCOT_163) |
| 906 | 906 | state->mapper_ram = auto_alloc_array(image.device().machine, UINT8, 0x2000); |
| 907 | ||
| 907 | ||
| 908 | 908 | /* Position past the header */ |
| 909 | 909 | image.fseek(16, SEEK_SET); |
| 910 | 910 | |
| r8990 | r8991 | |
| 1123 | 1123 | logerror("[MIRR] chunk found.\n"); |
| 1124 | 1124 | image.fread(&buffer, 4); |
| 1125 | 1125 | chunk_length = buffer[0] | (buffer[1] << 8) | (buffer[2] << 16) | (buffer[3] << 24); |
| 1126 | ||
| 1126 | ||
| 1127 | 1127 | image.fread(&temp_byte, 1); |
| 1128 | 1128 | switch (temp_byte) |
| 1129 | 1129 | { |
| r8990 | r8991 | |
| 1153 | 1153 | state->hard_mirroring = PPU_MIRROR_HORZ; |
| 1154 | 1154 | break; |
| 1155 | 1155 | } |
| 1156 | ||
| 1156 | ||
| 1157 | 1157 | read_length += (chunk_length + 8); |
| 1158 | 1158 | } |
| 1159 | 1159 | else if ((magic2[0] == 'P') && (magic2[1] == 'C') && (magic2[2] == 'K')) |
| r8990 | r8991 | |
|---|---|---|
| 136 | 136 | if (strcmp(image.extrainfo(), "")) |
| 137 | 137 | extra = image.extrainfo (); |
| 138 | 138 | |
| 139 | if (!extra) | |
| 139 | if (!extra) | |
| 140 | 140 | { |
| 141 | 141 | logerror("cart #%d: warning: no information in crc file\n", id); |
| 142 | 142 | type = -1; |
| 143 | 143 | } |
| 144 | 144 | else if ((1 != sscanf(extra, "%d", &type) ) || |
| 145 | type < 0 || type > SLOT_LAST_CARTRIDGE_TYPE) | |
| 145 | type < 0 || type > SLOT_LAST_CARTRIDGE_TYPE) | |
| 146 | 146 | { |
| 147 | 147 | logerror("cart #%d: warning: information in crc file not valid\n", id); |
| 148 | 148 | type = -1; |
| 149 | 149 | } |
| 150 | else | |
| 150 | else | |
| 151 | 151 | { |
| 152 | 152 | logerror ("cart #%d: info: cart extra info: '%s' = %s\n", id, extra, |
| 153 | 153 | msx_slot_list[type].name); |
| 154 | 154 | } |
| 155 | 155 | |
| 156 | 156 | /* if not, attempt autodetection */ |
| 157 | if (type < 0) | |
| 157 | if (type < 0) | |
| 158 | 158 | { |
| 159 | 159 | type = msx_probe_type (mem, size); |
| 160 | 160 |
| r8990 | r8991 | |
|---|---|---|
| 79 | 79 | { |
| 80 | 80 | UINT8 *mem = memory_region(image.device().machine, "maincpu"); |
| 81 | 81 | if (image.software_entry() == NULL) |
| 82 | { | |
| 82 | { | |
| 83 | 83 | image.fread( mem, 0x8000); |
| 84 | 84 | } else { |
| 85 | 85 | int size = image.get_software_region_length("rom"); |
| r8990 | r8991 | |
|---|---|---|
| 86 | 86 | * 113 - HES 6-in-1 requires mirroring (check Bookyman playfield), while other games break with this (check AV Soccer) |
| 87 | 87 | * 153 - Famicom Jump II uses a different board (or the same in a very different way) |
| 88 | 88 | * 242 - DQ8 has no mirroring (missing graphics is due to other reasons though) |
| 89 | ||
| 89 | ||
| 90 | 90 | crc_hacks have been added also to handle a few wiring settings which would require submappers: |
| 91 | 91 | * CHR protection pins for mapper 185 |
| 92 | 92 | * VRC-2, VRC-4 and VRC-6 line wiring |
| r8990 | r8991 | |
| 374 | 374 | static void prg8_x( running_machine *machine, int start, int bank ) |
| 375 | 375 | { |
| 376 | 376 | nes_state *state = machine->driver_data<nes_state>(); |
| 377 | ||
| 377 | ||
| 378 | 378 | assert(start < 4); |
| 379 | 379 | |
| 380 | 380 | /* assumes that bank references an 8k chunk */ |
| 381 | 381 | bank &= ((state->prg_chunks << 1) - 1); |
| 382 | ||
| 382 | ||
| 383 | 383 | state->prg_bank[start] = bank; |
| 384 | 384 | prg_bank_refresh(machine); |
| 385 | 385 | } |
| r8990 | r8991 | |
|---|---|---|
| 50 | 50 | /* Rex Soft */ |
| 51 | 51 | REXSOFT_SL1632, REXSOFT_DBZ5, |
| 52 | 52 | /* Sachen */ |
| 53 | SACHEN_8259A, SACHEN_8259B, SACHEN_8259C, SACHEN_8259D, | |
| 53 | SACHEN_8259A, SACHEN_8259B, SACHEN_8259C, SACHEN_8259D, | |
| 54 | 54 | SACHEN_SA009, SACHEN_SA0036, SACHEN_SA0037, |
| 55 | 55 | SACHEN_SA72007, SACHEN_SA72008, SACHEN_TCA01, |
| 56 | 56 | SACHEN_TCU01, SACHEN_TCU02, |
| r8990 | r8991 | |
| 90 | 90 | /* Misc: these are needed to convert mappers to boards, I will sort them later */ |
| 91 | 91 | OPENCORP_DAOU306, HES_BOARD, HES6IN1_BOARD, RUMBLESTATION_BOARD, |
| 92 | 92 | MAGICSERIES_MD, KASING_BOARD, FUTUREMEDIA_BOARD, FUKUTAKE_BOARD, SOMERI_SL12, |
| 93 | HENGEDIANZI_BOARD, HENGEDIANZI_XJZB, SUBOR_TYPE0, SUBOR_TYPE1, | |
| 93 | HENGEDIANZI_BOARD, HENGEDIANZI_XJZB, SUBOR_TYPE0, SUBOR_TYPE1, | |
| 94 | 94 | KAISER_KS7058, KAISER_KS7032, KAISER_KS7022, KAISER_KS7017, KAISER_KS202, CONY_BOARD, |
| 95 | 95 | CNE_DECATHLON, CNE_FSB, CNE_SHLZ, RCM_GS2015, RCM_TETRISFAMILY, |
| 96 | 96 | WAIXING_TYPE_A, WAIXING_TYPE_A_1, WAIXING_TYPE_B, WAIXING_TYPE_C, WAIXING_TYPE_D, |
| r8990 | r8991 | |
|---|---|---|
| 1147 | 1147 | |
| 1148 | 1148 | videoROM_ptr = memory_region(machine, "gfx1"); |
| 1149 | 1149 | |
| 1150 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(lisa_OPbaseoverride, *machine)); | |
| 1151 | cputag_get_address_space(machine, "fdccpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(lisa_fdc_OPbaseoverride, *machine)); | |
| 1150 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(lisa_OPbaseoverride, *machine)); | |
| 1151 | cputag_get_address_space(machine, "fdccpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(lisa_fdc_OPbaseoverride, *machine)); | |
| 1152 | 1152 | |
| 1153 | 1153 | m68k_set_reset_callback(machine->device("maincpu"), /*lisa_reset_instr_callback*/NULL); |
| 1154 | 1154 |
| r8990 | r8991 | |
|---|---|---|
| 222 | 222 | MACHINE_RESET( lviv ) |
| 223 | 223 | { |
| 224 | 224 | address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 225 | space->set_direct_update_handler(direct_update_delegate_create_static(lviv_directoverride, *machine)); | |
| 225 | space->set_direct_update_handler(direct_update_delegate_create_static(lviv_directoverride, *machine)); | |
| 226 | 226 | |
| 227 | 227 | lviv_video_ram = messram_get_ptr(machine->device("messram")) + 0xc000; |
| 228 | 228 |
| r8990 | r8991 | |
|---|---|---|
| 358 | 358 | { 172, TXC_22211B }, |
| 359 | 359 | { 173, TXC_22211C }, |
| 360 | 360 | // 174 Unused |
| 361 | { 175, KAISER_KS7022}, | |
| 361 | { 175, KAISER_KS7022}, | |
| 362 | 362 | { 176, UNL_XZY }, |
| 363 | 363 | { 177, HENGEDIANZI_BOARD }, |
| 364 | 364 | { 178, WAIXING_SGZLZ }, |
| r8990 | r8991 | |
| 457 | 457 | int nes_get_mmc_id( running_machine *machine, int mapper ) |
| 458 | 458 | { |
| 459 | 459 | const nes_mmc *mmc = nes_mapper_lookup(mapper); |
| 460 | ||
| 460 | ||
| 461 | 461 | if (mmc == NULL) |
| 462 | 462 | fatalerror("Unimplemented Mapper %d", mapper); |
| 463 | ||
| 463 | ||
| 464 | 464 | return mmc->pcb_id; |
| 465 | 465 | } |
| r8990 | r8991 | |
|---|---|---|
| 258 | 258 | addr <= end_addr; |
| 259 | 259 | addr++, snapptr++) |
| 260 | 260 | cputag_get_address_space(image.device().machine, "maincpu", ADDRESS_SPACE_PROGRAM)->write_byte(addr, *snapptr); |
| 261 | ||
| 262 | 261 | |
| 262 | ||
| 263 | 263 | return IMAGE_INIT_PASS; |
| 264 | 264 | } |
| 265 | 265 |
| r8990 | r8991 | |
|---|---|---|
| 945 | 945 | static UINT32 scsi53c810_fetch(running_machine *machine, UINT32 dsp) |
| 946 | 946 | { |
| 947 | 947 | UINT32 result; |
| 948 | result = cputag_get_address_space(machine, "ppc1", ADDRESS_SPACE_PROGRAM)->read_dword(dsp & 0x7FFFFFFF); | |
| 948 | result = cputag_get_address_space(machine, "ppc1", ADDRESS_SPACE_PROGRAM)->read_dword(dsp & 0x7FFFFFFF); | |
| 949 | 949 | return BYTE_REVERSE32(result); |
| 950 | 950 | } |
| 951 | 951 |
| r8990 | r8991 | |
|---|---|---|
| 269 | 269 | specimx_color = 0x70; |
| 270 | 270 | timer_set(machine, attotime_zero, NULL, 0, setup_pit8253_gates ); |
| 271 | 271 | running_device *fdc = machine->device("wd1793"); |
| 272 | wd17xx_set_pause_time(fdc,12); | |
| 272 | wd17xx_set_pause_time(fdc,12); | |
| 273 | 273 | wd17xx_dden_w(fdc, 0); |
| 274 | 274 | } |
| 275 | 275 |
| r8990 | r8991 | |
|---|---|---|
| 91 | 91 | |
| 92 | 92 | if (jupiter_data) |
| 93 | 93 | { |
| 94 | logerror("data: %p. type: %d.\n", jupiter_data, jupiter_data_type); | |
| 94 | logerror("data: %p. type: %d.\n", jupiter_data, jupiter_data_type); | |
| 95 | 95 | space->set_direct_update_handler(direct_update_delegate_create_static(jupiter_opbaseoverride, *machine)); |
| 96 | ||
| 96 | ||
| 97 | 97 | } |
| 98 | 98 | |
| 99 | 99 | machine->add_notifier(MACHINE_NOTIFY_EXIT, jupiter_machine_stop); |
| r8990 | r8991 | |
|---|---|---|
| 1342 | 1342 | debug_console_register_command(machine, "nimbus_intmasks", CMDFLAG_NONE, 0, 0, 0, execute_debug_intmasks); |
| 1343 | 1343 | debug_console_register_command(machine, "nimbus_debug", CMDFLAG_NONE, 0, 0, 1, nimbus_debug); |
| 1344 | 1344 | |
| 1345 | /* set up the instruction hook */ | |
| 1345 | /* set up the instruction hook */ | |
| 1346 | 1346 | machine->device(MAINCPU_TAG)->debug()->set_instruction_hook(instruction_hook); |
| 1347 | 1347 | } |
| 1348 | 1348 |
| r8990 | r8991 | |
|---|---|---|
| 5 | 5 | Dual floppy drive with HX-20 factory option |
| 6 | 6 | |
| 7 | 7 | |
| 8 | Status: Boots from system disk, missing | |
| 8 | Status: Boots from system disk, missing ??PD7201 emulation | |
| 9 | 9 | |
| 10 | 10 | ***************************************************************************/ |
| 11 | 11 |
| r8990 | r8991 | |
|---|---|---|
| 608 | 608 | |
| 609 | 609 | c64_memory[0x000] = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM)->read_byte(0); |
| 610 | 610 | c64_memory[0x001] = cpu_get_address_space(device, ADDRESS_SPACE_PROGRAM)->read_byte(1); |
| 611 | ||
| 611 | ||
| 612 | 612 | } |
| 613 | 613 | |
| 614 | 614 | UINT8 c64_m6510_port_read( running_device *device, UINT8 direction ) |
| r8990 | r8991 | |
| 1048 | 1048 | |
| 1049 | 1049 | if (i >= C64_MAX_ROMBANK) |
| 1050 | 1050 | return IMAGE_INIT_FAIL; |
| 1051 | ||
| 1051 | ||
| 1052 | 1052 | /* Start to parse the .crt header */ |
| 1053 | 1053 | /* 0x16-0x17 is Hardware type */ |
| 1054 | 1054 | image.fseek(0x16, SEEK_SET); |
| r8990 | r8991 | |
| 1153 | 1153 | /* Does CHIP contain any data? */ |
| 1154 | 1154 | if (test != c64_cart.bank[i].size) |
| 1155 | 1155 | return IMAGE_INIT_FAIL; |
| 1156 | ||
| 1156 | ||
| 1157 | 1157 | /* Advance to the next CHIP block */ |
| 1158 | 1158 | i++; |
| 1159 | 1159 | j += chip_size; |
| r8990 | r8991 | |
| 1224 | 1224 | a0_loaded = 1; |
| 1225 | 1225 | if (c64_cart.bank[ii].size > 0x3000) |
| 1226 | 1226 | b0_loaded = 1; |
| 1227 | // | |
| 1227 | // printf("addr 0x8000: 80 %d, 90 %d, a0 %d, b0 %d\n", _80_loaded, _90_loaded, a0_loaded, b0_loaded); | |
| 1228 | 1228 | } |
| 1229 | 1229 | |
| 1230 | 1230 | if (c64_cart.bank[ii].addr == 0x9000 && !_90_loaded) |
| r8990 | r8991 | |
| 1235 | 1235 | a0_loaded = 1; |
| 1236 | 1236 | if (c64_cart.bank[ii].size > 0x2000) |
| 1237 | 1237 | b0_loaded = 1; |
| 1238 | // | |
| 1238 | // printf("addr 0x9000: 80 %d, 90 %d, a0 %d, b0 %d\n", _80_loaded, _90_loaded, a0_loaded, b0_loaded); | |
| 1239 | 1239 | } |
| 1240 | 1240 | |
| 1241 | 1241 | if (c64_cart.bank[ii].addr == 0xa000 && !a0_loaded) |
| r8990 | r8991 | |
| 1244 | 1244 | a0_loaded = 1; |
| 1245 | 1245 | if (c64_cart.bank[ii].size > 0x1000) |
| 1246 | 1246 | b0_loaded = 1; |
| 1247 | // | |
| 1247 | // printf("addr 0xa000: 80 %d, 90 %d, a0 %d, b0 %d\n", _80_loaded, _90_loaded, a0_loaded, b0_loaded); | |
| 1248 | 1248 | } |
| 1249 | 1249 | |
| 1250 | 1250 | if (c64_cart.bank[ii].addr == 0xb000 && !b0_loaded) |
| 1251 | 1251 | { |
| 1252 | 1252 | memcpy(roml + 0x3000, cart_cpy + c64_cart.bank[ii].start, c64_cart.bank[ii].size); |
| 1253 | 1253 | b0_loaded = 1; |
| 1254 | // | |
| 1254 | // printf("addr 0xb000: 80 %d, 90 %d, a0 %d, b0 %d\n", _80_loaded, _90_loaded, a0_loaded, b0_loaded); | |
| 1255 | 1255 | } |
| 1256 | 1256 | |
| 1257 | 1257 | if (c64_cart.bank[ii].addr == 0xe000 && !e0_loaded) |
| r8990 | r8991 | |
| 1260 | 1260 | e0_loaded = 1; |
| 1261 | 1261 | if (c64_cart.bank[ii].size > 0x1000) |
| 1262 | 1262 | f0_loaded = 1; |
| 1263 | // | |
| 1263 | // printf("addr 0xe000: e0 %d, f0 %d\n", e0_loaded, f0_loaded); | |
| 1264 | 1264 | } |
| 1265 | 1265 | |
| 1266 | 1266 | if (c64_cart.bank[ii].addr == 0xf000 && !f0_loaded) |
| 1267 | 1267 | { |
| 1268 | 1268 | memcpy(romh + 0x1000, cart_cpy + c64_cart.bank[ii].start, c64_cart.bank[ii].size); |
| 1269 | 1269 | f0_loaded = 1; |
| 1270 | // | |
| 1270 | // printf("addr 0xe000: e0 %d, f0 %d\n", e0_loaded, f0_loaded); | |
| 1271 | 1271 | } |
| 1272 | 1272 | } |
| 1273 | 1273 | } |
| r8990 | r8991 | |
|---|---|---|
| 1355 | 1355 | st->ppi_data_signal = 0; |
| 1356 | 1356 | st->ppi_shift_register = 0; |
| 1357 | 1357 | st->ppi_shift_enable = 0; |
| 1358 | ||
| 1358 | ||
| 1359 | 1359 | pc_mouse_set_serial_port( machine->device("ins8250_0") ); |
| 1360 | 1360 | pc_hdc_set_dma8237_device( st->dma8237 ); |
| 1361 | 1361 | speaker_level_w( speaker, 0 ); |
| r8990 | r8991 | |
|---|---|---|
| 84 | 84 | |
| 85 | 85 | } |
| 86 | 86 | |
| 87 | #endif // _MACHINE_CDIC_H_ | |
| No newline at end of file | ||
| 87 | #endif // _MACHINE_CDIC_H_ |
| r8990 | r8991 | |
|---|---|---|
| 875 | 875 | floppy_mon_w(floppy_get_device(device->machine, 0), 1); |
| 876 | 876 | floppy_mon_w(floppy_get_device(device->machine, 1), 1); |
| 877 | 877 | floppy_mon_w(floppy_get_device(device->machine, 2), 1); |
| 878 | floppy_mon_w(floppy_get_device(device->machine, 3), 1); | |
| 878 | floppy_mon_w(floppy_get_device(device->machine, 3), 1); | |
| 879 | 879 | wd17xx_set_side(fdc,BIT(data,4)); |
| 880 | 880 | if (BIT(data,0)) { |
| 881 | 881 | wd17xx_set_drive(fdc,0); |
| r8990 | r8991 | |
|---|---|---|
| 51 | 51 | /* |
| 52 | 52 | static bitmap_t* x68k_get_gfx_page(int pri,int type) |
| 53 | 53 | { |
| 54 | if(type == GFX16) | |
| 55 | { | |
| 56 | switch(pri) | |
| 57 | { | |
| 58 | case 0: | |
| 59 | return x68k_gfx_0_bitmap_16; | |
| 60 | case 1: | |
| 61 | return x68k_gfx_1_bitmap_16; | |
| 62 | case 2: | |
| 63 | return x68k_gfx_2_bitmap_16; | |
| 64 | case 3: | |
| 65 | return x68k_gfx_3_bitmap_16; | |
| 66 | default: | |
| 67 | return x68k_gfx_0_bitmap_16; // should never reach here. | |
| 68 | } | |
| 69 | } | |
| 70 | if(type == GFX256) | |
| 71 | { | |
| 72 | switch(pri) | |
| 73 | { | |
| 74 | case 0: | |
| 75 | case 1: | |
| 76 | return x68k_gfx_0_bitmap_256; | |
| 77 | case 2: | |
| 78 | case 3: | |
| 79 | return x68k_gfx_1_bitmap_256; | |
| 80 | default: | |
| 81 | return x68k_gfx_0_bitmap_256; // should never reach here. | |
| 82 | } | |
| 83 | } | |
| 84 | if(type == GFX65536) | |
| 85 | return x68k_gfx_0_bitmap_65536; | |
| 54 | if(type == GFX16) | |
| 55 | { | |
| 56 | switch(pri) | |
| 57 | { | |
| 58 | case 0: | |
| 59 | return x68k_gfx_0_bitmap_16; | |
| 60 | case 1: | |
| 61 | return x68k_gfx_1_bitmap_16; | |
| 62 | case 2: | |
| 63 | return x68k_gfx_2_bitmap_16; | |
| 64 | case 3: | |
| 65 | return x68k_gfx_3_bitmap_16; | |
| 66 | default: | |
| 67 | return x68k_gfx_0_bitmap_16; // should never reach here. | |
| 68 | } | |
| 69 | } | |
| 70 | if(type == GFX256) | |
| 71 | { | |
| 72 | switch(pri) | |
| 73 | { | |
| 74 | case 0: | |
| 75 | case 1: | |
| 76 | return x68k_gfx_0_bitmap_256; | |
| 77 | case 2: | |
| 78 | case 3: | |
| 79 | return x68k_gfx_1_bitmap_256; | |
| 80 | default: | |
| 81 | return x68k_gfx_0_bitmap_256; // should never reach here. | |
| 82 | } | |
| 83 | } | |
| 84 | if(type == GFX65536) | |
| 85 | return x68k_gfx_0_bitmap_65536; | |
| 86 | 86 | |
| 87 | ||
| 87 | return NULL; // should never reach here either. | |
| 88 | 88 | } |
| 89 | 89 | */ |
| 90 | 90 | static void x68k_crtc_text_copy(int src, int dest) |
| r8990 | r8991 | |
| 432 | 432 | break; |
| 433 | 433 | } |
| 434 | 434 | } |
| 435 | /* if(ACCESSING_BITS_8_15) | |
| 436 | { | |
| 437 | x68k_sys.crtc.interlace = 0; | |
| 438 | if(data & 0x0400) | |
| 439 | x68k_sys.crtc.interlace = 1; | |
| 440 | }*/ | |
| 435 | /* if(ACCESSING_BITS_8_15) | |
| 436 | { | |
| 437 | x68k_sys.crtc.interlace = 0; | |
| 438 | if(data & 0x0400) | |
| 439 | x68k_sys.crtc.interlace = 1; | |
| 440 | }*/ | |
| 441 | 441 | x68k_crtc_refresh_mode(space->machine); |
| 442 | 442 | break; |
| 443 | 443 | case 576: // operation register |
| r8990 | r8991 | |
| 499 | 499 | |
| 500 | 500 | WRITE16_HANDLER( x68k_gvram_w ) |
| 501 | 501 | { |
| 502 | // | |
| 502 | // int xloc,yloc,pageoffset; | |
| 503 | 503 | /* |
| 504 | 504 | G-VRAM usage is determined by colour depth and "real" screen size. |
| 505 | 505 |
| r8990 | r8991 | |
|---|---|---|
| 378 | 378 | vic2->first_ba_cycle = vic2->cycles_counter; |
| 379 | 379 | if ((vic2->rdy_workaround_cb != NULL) && (vic2->rdy_workaround_cb(machine) != 7 )) |
| 380 | 380 | { |
| 381 | // | |
| 381 | // cpu_suspend(machine->firstcpu, SUSPEND_REASON_SPIN, 0); | |
| 382 | 382 | } |
| 383 | 383 | vic2->cpu_suspended = 1; |
| 384 | 384 | } |
| r8990 | r8991 | |
| 391 | 391 | { |
| 392 | 392 | if ((vic2->rdy_workaround_cb != NULL)) |
| 393 | 393 | { |
| 394 | // | |
| 394 | // cpu_resume(machine->firstcpu, SUSPEND_REASON_SPIN); | |
| 395 | 395 | } |
| 396 | 396 | vic2->cpu_suspended = 0; |
| 397 | 397 | } |
| r8990 | r8991 | |
| 452 | 452 | // Video matrix access |
| 453 | 453 | INLINE void vic2_matrix_access( running_machine *machine, vic2_state *vic2 ) |
| 454 | 454 | { |
| 455 | // | |
| 455 | // if (vic2->cpu_suspended == 1) | |
| 456 | 456 | { |
| 457 | 457 | if ((vic2->cycles_counter - vic2->first_ba_cycle) < 0) |
| 458 | 458 | vic2->matrix_line[vic2->ml_index] = vic2->color_line[vic2->ml_index] = 0xff; |
| r8990 | r8991 | |
| 1005 | 1005 | UINT8 vic_cycles = (vic2->cycles_counter + 1) & 0xff; |
| 1006 | 1006 | vic2->cycles_counter++; |
| 1007 | 1007 | |
| 1008 | // | |
| 1008 | // printf("%02x %02x %02x\n",cpu_cycles,vic_cycles,rdy_cycles); | |
| 1009 | 1009 | /* |
| 1010 | 1010 | if (input_code_pressed(machine, KEYCODE_X)) |
| 1011 | 1011 | { |
| r8990 | r8991 | |
| 1028 | 1028 | if (input_code_pressed_once(machine, KEYCODE_C)) adjust[0]++; |
| 1029 | 1029 | if (input_code_pressed_once(machine, KEYCODE_V)) adjust[0]--; |
| 1030 | 1030 | if (input_code_pressed_once(machine, KEYCODE_Z)) printf("b:%02x 1:%02x 2:%02x 3:%02x 4:%02x 5:%02x 6:%02x 7:%02x 8:%02x\n", |
| 1031 | ||
| 1031 | adjust[0],adjust[1],adjust[2],adjust[3],adjust[4],adjust[5],adjust[6],adjust[7],adjust[8]); | |
| 1032 | 1032 | } |
| 1033 | 1033 | */ |
| 1034 | 1034 | |
| r8990 | r8991 | |
| 1041 | 1041 | { |
| 1042 | 1042 | vic2->vblanking = 1; |
| 1043 | 1043 | |
| 1044 | // | |
| 1044 | // if (LIGHTPEN_BUTTON) | |
| 1045 | 1045 | { |
| 1046 | 1046 | /* lightpen timer start */ |
| 1047 | 1047 | timer_set(machine, attotime_make(0, 0), vic2, 1, vic2_timer_timeout); |
| r8990 | r8991 | |
| 1632 | 1632 | { |
| 1633 | 1633 | vic2->vblanking = 1; |
| 1634 | 1634 | |
| 1635 | // | |
| 1635 | // if (LIGHTPEN_BUTTON) | |
| 1636 | 1636 | { |
| 1637 | 1637 | /* lightpen timer starten */ |
| 1638 | 1638 | timer_set(machine, attotime_make(0, 0), vic2, 1, vic2_timer_timeout); |
| r8990 | r8991 | |
|---|---|---|
| 111 | 111 | /* set new blink state - record blink state in event list */ |
| 112 | 112 | void kc85_video_set_blink_state(running_machine *machine, int data) |
| 113 | 113 | { |
| 114 | // | |
| 114 | // EventList_AddItemOffset(machine, KC85_VIDEO_EVENT_SET_BLINK_STATE, ((data & 0x01)<<7), machine->firstcpu->attotime_to_cycles(attotime_mul(machine->primary_screen->scan_period(), machine->primary_screen->vpos()))); | |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | |
| r8990 | r8991 | |
| 496 | 496 | { |
| 497 | 497 | int cycles_remaining_in_frame = KC85_CYCLES_PER_FRAME; |
| 498 | 498 | |
| 499 | // | |
| 499 | // EVENT_LIST_ITEM *pItem; | |
| 500 | 500 | // int NumItems; |
| 501 | 501 | |
| 502 | 502 | struct video_update_state video_update; |
| 503 | // | |
| 503 | // int cycles_offset = 0; | |
| 504 | 504 | |
| 505 | 505 | video_update.render_x = 0; |
| 506 | 506 | video_update.render_y = 0; |
| r8990 | r8991 | |
| 516 | 516 | video_update.vertical.cycles_remaining_in_state = vertical_graphics_state_lines[video_update.vertical.state]; |
| 517 | 517 | video_update.vertical.cycles_remaining = KC85_CYCLES_PER_FRAME; |
| 518 | 518 | |
| 519 | // /* first item in list */ | |
| 520 | // pItem = EventList_GetFirstItem(); | |
| 521 | // /* number of items remaining */ | |
| 522 | // NumItems = EventList_NumEvents(); | |
| 519 | // /* first item in list */ | |
| 520 | // pItem = EventList_GetFirstItem(); | |
| 521 | // /* number of items remaining */ | |
| 522 | // NumItems = EventList_NumEvents(); | |
| 523 | 523 | // |
| 524 | // while (NumItems) | |
| 525 | // { | |
| 526 | // int delta_cycles; | |
| 524 | // while (NumItems) | |
| 525 | // { | |
| 526 | // int delta_cycles; | |
| 527 | 527 | // |
| 528 | // /* number of cycles until event will trigger */ | |
| 529 | // delta_cycles = pItem->Event_Time - cycles_offset; | |
| 528 | // /* number of cycles until event will trigger */ | |
| 529 | // delta_cycles = pItem->Event_Time - cycles_offset; | |
| 530 | 530 | // |
| 531 | // //logerror("cycles between this event and next: %d\n",delta_cycles); | |
| 532 | // kc85_common_vh_process_lines(&video_update, delta_cycles); | |
| 531 | // //logerror("cycles between this event and next: %d\n",delta_cycles); | |
| 532 | // kc85_common_vh_process_lines(&video_update, delta_cycles); | |
| 533 | 533 | // |
| 534 | // /* update number of cycles remaining in frame */ | |
| 535 | // cycles_remaining_in_frame -= delta_cycles; | |
| 536 | // /* set new blink state */ | |
| 537 | // kc85_blink_state = pItem->Event_Data; | |
| 534 | // /* update number of cycles remaining in frame */ | |
| 535 | // cycles_remaining_in_frame -= delta_cycles; | |
| 536 | // /* set new blink state */ | |
| 537 | // kc85_blink_state = pItem->Event_Data; | |
| 538 | 538 | // |
| 539 | // /* set new cycles into frame */ | |
| 540 | // cycles_offset = pItem->Event_Time; | |
| 541 | // /* next event */ | |
| 542 | // pItem++; | |
| 543 | // /* update number of events remaining */ | |
| 544 | // NumItems--; | |
| 545 | // } | |
| 539 | // /* set new cycles into frame */ | |
| 540 | // cycles_offset = pItem->Event_Time; | |
| 541 | // /* next event */ | |
| 542 | // pItem++; | |
| 543 | // /* update number of events remaining */ | |
| 544 | // NumItems--; | |
| 545 | // } | |
| 546 | 546 | |
| 547 | 547 | |
| 548 | 548 | /* process remainder */ |
| 549 | 549 | kc85_common_vh_process_lines(&video_update, cycles_remaining_in_frame); |
| 550 | // EventList_Reset(); | |
| 551 | // EventList_SetOffsetStartTime ( machine->firstcpu->attotime_to_cycles(attotime_mul(machine->primary_screen->scan_period(), machine->primary_screen->vpos())) ); | |
| 550 | // EventList_Reset(); | |
| 551 | // EventList_SetOffsetStartTime ( machine->firstcpu->attotime_to_cycles(attotime_mul(machine->primary_screen->scan_period(), machine->primary_screen->vpos())) ); | |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | |
| r8990 | r8991 | |
| 559 | 559 | static void kc85_common_vh_start(running_machine *machine) |
| 560 | 560 | { |
| 561 | 561 | kc85_blink_state = 0; |
| 562 | // | |
| 562 | // EventList_Initialise(machine, 30000); | |
| 563 | 563 | } |
| 564 | 564 | |
| 565 | 565 | static unsigned char *kc85_4_display_video_ram; |
| r8990 | r8991 | |
|---|---|---|
| 92 | 92 | UINT8 mmc5_high_chr; |
| 93 | 93 | UINT8 mmc5_split_scr; |
| 94 | 94 | UINT8 *extended_ntram; |
| 95 | ||
| 95 | ||
| 96 | 96 | UINT8 mmc5_last_chr_a; |
| 97 | 97 | UINT16 mmc5_vrom_regA[8]; |
| 98 | 98 | UINT16 mmc5_vrom_regB[4]; |
| r8990 | r8991 | |
|---|---|---|
| 53 | 53 | |
| 54 | 54 | extern const device_type X1_KEYBOARD; |
| 55 | 55 | |
| 56 | #endif /* X1_H_ */ | |
| No newline at end of file | ||
| 56 | #endif /* X1_H_ */ |
| r8990 | r8991 | |
|---|---|---|
| 146 | 146 | void EventList_AddItemOffset(running_machine *machine, int ID, int Data,int Time); |
| 147 | 147 | int EventList_NumEvents(void); |
| 148 | 148 | EVENT_LIST_ITEM *EventList_GetFirstItem(void); |
| 149 | ||
| 149 | ||
| 150 | 150 | /*----------- defined in video/timex.c -----------*/ |
| 151 | 151 | extern VIDEO_EOF( ts2068 ); |
| 152 | 152 | extern VIDEO_UPDATE( ts2068 ); |
| r8990 | r8991 | |
|---|---|---|
| 78 | 78 | static driver_data_t *alloc(running_machine &machine) { return auto_alloc_clear(&machine, towns_state(machine)); } |
| 79 | 79 | towns_state(running_machine &machine) |
| 80 | 80 | : driver_data_t(machine) { } |
| 81 | ||
| 81 | ||
| 82 | 82 | UINT8 ftimer; |
| 83 | 83 | UINT8 nmi_mask; |
| 84 | 84 | UINT8 compat_mode; |
| r8990 | r8991 | |
|---|---|---|
| 185 | 185 | |
| 186 | 186 | extern const device_type EINSTEIN_FIRE_DAISY; |
| 187 | 187 | |
| 188 | #endif /* EINSTEIN_H_ */ | |
| No newline at end of file | ||
| 188 | #endif /* EINSTEIN_H_ */ |
| r8990 | r8991 | |
|---|---|---|
| 311 | 311 | |
| 312 | 312 | if(floppy_image_size(floppy) == size) |
| 313 | 313 | { |
| 314 | *vote = 100; | |
| 314 | *vote = 100; | |
| 315 | 315 | } |
| 316 | 316 | else |
| 317 | 317 | { |
| r8990 | r8991 | |
| 348 | 348 | tag->disk_type = type; |
| 349 | 349 | tag->heads = 2; |
| 350 | 350 | if (tag->disk_type==0x30 || tag->disk_type==0x40) tag->heads = 1; |
| 351 | ||
| 351 | ||
| 352 | 352 | tag->image_size = size; |
| 353 | 353 | for(x=0;x<164;x++) |
| 354 | 354 | tag->trackoffset[x] = offs[x]; |
| r8990 | r8991 | |
|---|---|---|
| 38 | 38 | { |
| 39 | 39 | int file_size; |
| 40 | 40 | UINT8 * file_data; |
| 41 | ||
| 41 | ||
| 42 | 42 | int chunks_in_file = 0; |
| 43 | ||
| 43 | ||
| 44 | 44 | int i; |
| 45 | ||
| 45 | ||
| 46 | 46 | logerror ("Trying to load cart\n"); |
| 47 | ||
| 47 | ||
| 48 | 48 | file_size = image.length(); |
| 49 | ||
| 49 | ||
| 50 | 50 | if (file_size < 0x09) |
| 51 | 51 | { |
| 52 | 52 | logerror ("Bad file size\n"); |
| 53 | 53 | return IMAGE_INIT_FAIL; |
| 54 | 54 | } |
| 55 | ||
| 55 | ||
| 56 | 56 | file_data = (UINT8 *)malloc(file_size); |
| 57 | 57 | if (file_data == NULL) |
| 58 | 58 | { |
| 59 | 59 | logerror ("Memory allocating error\n"); |
| 60 | 60 | return IMAGE_INIT_FAIL; |
| 61 | 61 | } |
| 62 | ||
| 62 | ||
| 63 | 63 | image.fread(file_data, file_size); |
| 64 | ||
| 64 | ||
| 65 | 65 | for (i=0; i<8; i++) |
| 66 | 66 | if(file_data[i+1]&0x02) chunks_in_file++; |
| 67 | ||
| 67 | ||
| 68 | 68 | if (chunks_in_file*0x2000+0x09 != file_size) |
| 69 | 69 | { |
| 70 | 70 | free (file_data); |
| 71 | 71 | logerror ("File corrupted\n"); |
| 72 | 72 | return IMAGE_INIT_FAIL; |
| 73 | 73 | } |
| 74 | ||
| 74 | ||
| 75 | 75 | switch (file_data[0x00]) |
| 76 | 76 | { |
| 77 | 77 | case 0x00: logerror ("DOCK cart\n"); |
| r8990 | r8991 | |
| 102 | 102 | } |
| 103 | 103 | free (file_data); |
| 104 | 104 | break; |
| 105 | ||
| 105 | ||
| 106 | 106 | default: logerror ("Cart type not supported\n"); |
| 107 | 107 | free (file_data); |
| 108 | 108 | timex_cart_type = TIMEX_CART_NONE; |
| 109 | 109 | return IMAGE_INIT_FAIL; |
| 110 | 110 | } |
| 111 | ||
| 111 | ||
| 112 | 112 | logerror ("Cart loaded\n"); |
| 113 | 113 | logerror ("Chunks %02x\n", timex_cart_chunks); |
| 114 | 114 | return IMAGE_INIT_PASS; |
| r8990 | r8991 | |
|---|---|---|
| 47 | 47 | DRIVER( a7800 ) /* Atari 7800 NTSC */ |
| 48 | 48 | DRIVER( a7800p ) /* Atari 7800 PAL */ |
| 49 | 49 | DRIVER( lynx ) /* Atari Lynx Handheld */ |
| 50 | // | |
| 50 | // DRIVER( lynx2 ) /* Atari Lynx II Handheld redesigned, no additions */ | |
| 51 | 51 | DRIVER( jaguar ) /* Atari Jaguar */ |
| 52 | 52 | DRIVER( jaguarcd ) /* Atari Jaguar CD */ |
| 53 | 53 | |
| r8990 | r8991 | |
| 762 | 762 | |
| 763 | 763 | /* TI 99 clones */ |
| 764 | 764 | DRIVER( tutor) /* 1983? Tomy Tutor */ |
| 765 | DRIVER( pyuuta ) /* 1982 Tomy Pyuuta | |
| 765 | DRIVER( pyuuta ) /* 1982 Tomy Pyuuta */ | |
| 766 | 766 | DRIVER( geneve ) /* 1987? Myarc Geneve 9640 */ |
| 767 | 767 | DRIVER( genmod ) /* 199?? Myarc Geneve 9640 */ |
| 768 | 768 | DRIVER( ti99_4p ) /* 1996 SNUG 99/4P (a.k.a. SGCPU) */ |
| r8990 | r8991 | |
|---|---|---|
| 158 | 158 | |
| 159 | 159 | MDRV_MACHINE_RESET( 3do ) |
| 160 | 160 | |
| 161 | // MDRV_VIDEO_START( generic_bitmapped ) | |
| 162 | // MDRV_VIDEO_UPDATE( generic_bitmapped ) | |
| 161 | // MDRV_VIDEO_START( generic_bitmapped ) | |
| 162 | // MDRV_VIDEO_UPDATE( generic_bitmapped ) | |
| 163 | 163 | MDRV_VIDEO_START( _3do ) |
| 164 | 164 | MDRV_VIDEO_UPDATE( _3do ) |
| 165 | 165 |
| r8990 | r8991 | |
|---|---|---|
| 19 | 19 | B) It's easier to me to see what the attribute vram does since I don't |
| 20 | 20 | have any docs atm. |
| 21 | 21 | |
| 22 | TODO (game specific): | |
| 23 | - (several AX* games, namely Galaxy Mission Part 1/2 and others): inputs doesn't work | |
| 24 | - AX6 - Demo: When AY-based speech talks, other emus emulates the screen drawing to be a solid green (plain PC-6001) or solid white (Mk2 version), | |
| 25 | but, according to an original video reference that I've seen, that screen should actually some kind of weird garbage on it ... | |
| 26 | - AX6 - Powered Knight: doesn't work too well, according to the asm code it asks the player to press either 'B' or 'C' then a number but | |
| 27 | nothing is shown on screen, other emus behaves the same, bad dump? | |
| 28 | (Mk2 mode 5 games) | |
| 29 | - 3D Golf Simulation Super Version: gameplay / inputs looks broken | |
| 30 | - American Truck: Screen is offset at the loading screen, loading bug? | |
| 31 | - Castle Excellent: copyright text drawing is quite bogus, scans text in vertical instead of horizontal? | |
| 32 | - Dezeni Land (ALL versions) / Hurry Fox 1/2: asks you to "load something", can't do it with current cassette kludge, also, for Dezeni Land(s) keyboard irqs | |
| 33 | doesn't seem to work too well with halt opcode execution? | |
| 34 | - Dezeni Land 1/4: dies after loading of main program | |
| 35 | - Dezeni Land 2: dies at the "load something" screen with presumably wrong stack opcodes | |
| 36 | - (MyCom BASIC games with multiple files): most of them refuses to run ... how to load them? | |
| 37 | - Grobda: when "get ready" speech plays, screen should be full white but instead it's all black, same issue as AX-6 Demo? | |
| 38 | - Pac-Man / Tiny Xevious 2: gameplay is too fast | |
| 39 | - Salad no Kunino Tomato-Hime: can't start a play | |
| 40 | - Space Harrier: inputs doesn't work properly | |
| 41 | - The Black Onyx: dies when it attempts to save the character, that obviously means saving on the tape | |
| 42 | - Yakyukyo / Punchball Mario: waits for an irq, check which one; | |
| 22 | TODO (game specific): | |
| 23 | - (several AX* games, namely Galaxy Mission Part 1/2 and others): inputs doesn't work | |
| 24 | - AX6 - Demo: When AY-based speech talks, other emus emulates the screen drawing to be a solid green (plain PC-6001) or solid white (Mk2 version), | |
| 25 | but, according to an original video reference that I've seen, that screen should actually some kind of weird garbage on it ... | |
| 26 | - AX6 - Powered Knight: doesn't work too well, according to the asm code it asks the player to press either 'B' or 'C' then a number but | |
| 27 | nothing is shown on screen, other emus behaves the same, bad dump? | |
| 28 | (Mk2 mode 5 games) | |
| 29 | - 3D Golf Simulation Super Version: gameplay / inputs looks broken | |
| 30 | - American Truck: Screen is offset at the loading screen, loading bug? | |
| 31 | - Castle Excellent: copyright text drawing is quite bogus, scans text in vertical instead of horizontal? | |
| 32 | - Dezeni Land (ALL versions) / Hurry Fox 1/2: asks you to "load something", can't do it with current cassette kludge, also, for Dezeni Land(s) keyboard irqs | |
| 33 | doesn't seem to work too well with halt opcode execution? | |
| 34 | - Dezeni Land 1/4: dies after loading of main program | |
| 35 | - Dezeni Land 2: dies at the "load something" screen with presumably wrong stack opcodes | |
| 36 | - (MyCom BASIC games with multiple files): most of them refuses to run ... how to load them? | |
| 37 | - Grobda: when "get ready" speech plays, screen should be full white but instead it's all black, same issue as AX-6 Demo? | |
| 38 | - Pac-Man / Tiny Xevious 2: gameplay is too fast | |
| 39 | - Salad no Kunino Tomato-Hime: can't start a play | |
| 40 | - Space Harrier: inputs doesn't work properly | |
| 41 | - The Black Onyx: dies when it attempts to save the character, that obviously means saving on the tape | |
| 42 | - Yakyukyo / Punchball Mario: waits for an irq, check which one; | |
| 43 | 43 | |
| 44 | 44 | ======================================================================================================================================================== |
| 45 | 45 | |
| r8990 | r8991 | |
| 97 | 97 | ================================================================================== |
| 98 | 98 | |
| 99 | 99 | PC-6001 irq table: |
| 100 | irq vector 0x00: writes 0x00 to [$fa19] | |
| 100 | irq vector 0x00: writes 0x00 to [$fa19] | |
| 101 | 101 | irq vector 0x02: (A = 0, B = 0) tests ppi port c, does something with ay ports (plus more?) ;keyboard data ready, no kanji lock, no caps lock |
| 102 | irq vector 0x04: ;uart irq | |
| 103 | irq vector 0x06: operates with $fa28, $fa2e, $fd1b ;timer irq | |
| 104 | irq vector 0x08: tests ppi port c, puts port A to $fa1d,puts 0x02 to [$fa19] ;tape data ready | |
| 105 | irq vector 0x0a: writes 0x00 to [$fa19] ;(unused) | |
| 106 | irq vector 0x0c: writes 0x00 to [$fa19] ;(unused) | |
| 107 | irq vector 0x0e: same as 2, (A = 0x03, B = 0x00) ;keyboard data ready, unknown type | |
| 108 | irq vector 0x10: same as 2, (A = 0x03, B = 0x00) ;(unused) | |
| 109 | irq vector 0x12: writes 0x10 to [$fa19] ;end of tape reached | |
| 110 | irq vector 0x14: same as 2, (A = 0x00, B = 0x01) ;kanji lock enabled | |
| 111 | irq vector 0x16: tests ppi port c, writes the result to $feca. ;joystick | |
| 112 | irq vector 0x18: ;TVR (?) | |
| 113 | irq vector 0x1a: ;Date | |
| 114 | irq vector 0x1c: ;(unused) | |
| 115 | irq vector 0x1e: ;(unused) | |
| 116 | irq vector 0x20: ;voice | |
| 117 | irq vector 0x22: ;VRTC (?) | |
| 118 | irq vector 0x24: ;(unused) | |
| 119 | irq vector 0x26: ;(unused) | |
| 102 | irq vector 0x04: ;uart irq | |
| 103 | irq vector 0x06: operates with $fa28, $fa2e, $fd1b ;timer irq | |
| 104 | irq vector 0x08: tests ppi port c, puts port A to $fa1d,puts 0x02 to [$fa19] ;tape data ready | |
| 105 | irq vector 0x0a: writes 0x00 to [$fa19] ;(unused) | |
| 106 | irq vector 0x0c: writes 0x00 to [$fa19] ;(unused) | |
| 107 | irq vector 0x0e: same as 2, (A = 0x03, B = 0x00) ;keyboard data ready, unknown type | |
| 108 | irq vector 0x10: same as 2, (A = 0x03, B = 0x00) ;(unused) | |
| 109 | irq vector 0x12: writes 0x10 to [$fa19] ;end of tape reached | |
| 110 | irq vector 0x14: same as 2, (A = 0x00, B = 0x01) ;kanji lock enabled | |
| 111 | irq vector 0x16: tests ppi port c, writes the result to $feca. ;joystick | |
| 112 | irq vector 0x18: ;TVR (?) | |
| 113 | irq vector 0x1a: ;Date | |
| 114 | irq vector 0x1c: ;(unused) | |
| 115 | irq vector 0x1e: ;(unused) | |
| 116 | irq vector 0x20: ;voice | |
| 117 | irq vector 0x22: ;VRTC (?) | |
| 118 | irq vector 0x24: ;(unused) | |
| 119 | irq vector 0x26: ;(unused) | |
| 120 | 120 | |
| 121 | 121 | |
| 122 | 122 | *******************************************************************************************************************************************************/ |
| r8990 | r8991 | |
| 410 | 410 | int pen[2]; |
| 411 | 411 | |
| 412 | 412 | /* |
| 413 | palette reference: | |
| 414 | UINT8 pal_num[] = { 0x00, 0x04, 0x01, 0x05, | |
| 415 | 0x02, 0x06, 0x03, 0x07, | |
| 416 | 0x08, 0x0c, 0x09, 0x0d, | |
| 417 | 0x0a, 0x0e, 0x0b, 0x0f }; | |
| 413 | palette reference: | |
| 414 | UINT8 pal_num[] = { 0x00, 0x04, 0x01, 0x05, | |
| 415 | 0x02, 0x06, 0x03, 0x07, | |
| 416 | 0x08, 0x0c, 0x09, 0x0d, | |
| 417 | 0x0a, 0x0e, 0x0b, 0x0f }; | |
| 418 | 418 | |
| 419 | color |= pal_num[(pen[0] & 3) | ((pen[1] & 3) << 2)]; | |
| 420 | */ | |
| 419 | color |= pal_num[(pen[0] & 3) | ((pen[1] & 3) << 2)]; | |
| 420 | */ | |
| 421 | 421 | |
| 422 | 422 | pen[0] = pc6001_video_ram[count+0x0000] >> (6-i*2) & 3; |
| 423 | 423 | pen[1] = pc6001_video_ram[count+0x2000] >> (6-i*2) & 3; |
| r8990 | r8991 | |
| 453 | 453 | int pen[2]; |
| 454 | 454 | |
| 455 | 455 | /* |
| 456 | palette reference: | |
| 457 | UINT8 pal_num[] = { 0x00, 0x04, 0x01, 0x05 }; | |
| 456 | palette reference: | |
| 457 | UINT8 pal_num[] = { 0x00, 0x04, 0x01, 0x05 }; | |
| 458 | 458 | |
| 459 | color |= pal_num[(pen[0] & 1) | ((pen[1] & 1) << 1)]; | |
| 460 | */ | |
| 459 | color |= pal_num[(pen[0] & 1) | ((pen[1] & 1) << 1)]; | |
| 460 | */ | |
| 461 | 461 | |
| 462 | 462 | pen[0] = pc6001_video_ram[count+0x0000] >> (7-i) & 1; |
| 463 | 463 | pen[1] = pc6001_video_ram[count+0x2000] >> (7-i) & 1; |
| r8990 | r8991 | |
| 496 | 496 | for(x=0;x<40;x++) |
| 497 | 497 | { |
| 498 | 498 | /* |
| 499 | exgfx attr format: | |
| 500 | x--- ---- rom bank select | |
| 501 | -xxx ---- bg color | |
| 502 | ---- xxxx fg color | |
| 503 | Note that the exgfx banks a different gfx ROM | |
| 504 | */ | |
| 499 | exgfx attr format: | |
| 500 | x--- ---- rom bank select | |
| 501 | -xxx ---- bg color | |
| 502 | ---- xxxx fg color | |
| 503 | Note that the exgfx banks a different gfx ROM | |
| 504 | */ | |
| 505 | 505 | tile = pc6001_video_ram[(x+(y*40))+0x400] + 0x200; |
| 506 | 506 | attr = pc6001_video_ram[(x+(y*40)) & 0x3ff]; |
| 507 | 507 | tile+= ((attr & 0x80) << 1); |
| r8990 | r8991 | |
| 940 | 940 | |
| 941 | 941 | bank_r0 = data; |
| 942 | 942 | |
| 943 | // | |
| 943 | // printf("%02x BANK | %02x\n",data,bank_opt); | |
| 944 | 944 | memory_set_bankptr(space->machine, "bank1", &ROM[banksw_table_r0[(data & 0xf)+(bank_opt*0x10)][0]]); |
| 945 | 945 | memory_set_bankptr(space->machine, "bank2", &ROM[banksw_table_r0[(data & 0xf)+(bank_opt*0x10)][1]]); |
| 946 | 946 | memory_set_bankptr(space->machine, "bank3", &ROM[banksw_table_r0[((data & 0xf0)>>4)+(bank_opt*0x10)][2]]); |
| r8990 | r8991 | |
| 959 | 959 | |
| 960 | 960 | bank_r1 = data; |
| 961 | 961 | |
| 962 | // | |
| 962 | // printf("%02x BANK\n",data); | |
| 963 | 963 | memory_set_bankptr(space->machine, "bank5", &ROM[banksw_table_r1[(data & 0xf)+(bank_opt*0x10)][0]]); |
| 964 | 964 | memory_set_bankptr(space->machine, "bank6", &ROM[banksw_table_r1[(data & 0xf)+(bank_opt*0x10)][1]]); |
| 965 | 965 | memory_set_bankptr(space->machine, "bank7", &ROM[banksw_table_r1[((data & 0xf0)>>4)+(bank_opt*0x10)][2]]); |
| r8990 | r8991 | |
| 977 | 977 | UINT8 *gfx_data = memory_region(space->machine, "gfx1"); |
| 978 | 978 | |
| 979 | 979 | /* |
| 980 | 0 - TVROM / VOICE ROM | |
| 981 | 1 - KANJI ROM bank 0 | |
| 982 | 2 - KANJI ROM bank 1 | |
| 983 | 3 - TVROM / VOICE ROM | |
| 984 | */ | |
| 980 | 0 - TVROM / VOICE ROM | |
| 981 | 1 - KANJI ROM bank 0 | |
| 982 | 2 - KANJI ROM bank 1 | |
| 983 | 3 - TVROM / VOICE ROM | |
| 984 | */ | |
| 985 | 985 | bank_opt = data & 3; |
| 986 | 986 | |
| 987 | 987 | memory_set_bankptr(space->machine, "bank1", &ROM[banksw_table_r0[(bank_r0 & 0xf)+(bank_opt*0x10)][0]]); |
| r8990 | r8991 | |
| 1052 | 1052 | { |
| 1053 | 1053 | UINT8 *work_ram = memory_region(machine, "maincpu"); |
| 1054 | 1054 | |
| 1055 | // | |
| 1055 | // popmessage("%02x",vram_bank); | |
| 1056 | 1056 | |
| 1057 | 1057 | switch(vram_bank & 0x66) |
| 1058 | 1058 | { |
| r8990 | r8991 | |
| 1103 | 1103 | |
| 1104 | 1104 | static WRITE8_HANDLER( pc6001m2_vram_bank_w ) |
| 1105 | 1105 | { |
| 1106 | // | |
| 1106 | // UINT32 startaddr[] = {WRAM(6), WRAM(6), WRAM(0), WRAM(4) }; | |
| 1107 | 1107 | |
| 1108 | 1108 | ex_vram_bank = data; |
| 1109 | 1109 | vram_bank_change(space->machine,(ex_vram_bank & 0x06) | ((sys_latch & 0x06) << 4)); |
| r8990 | r8991 | |
| 1130 | 1130 | } |
| 1131 | 1131 | } |
| 1132 | 1132 | |
| 1133 | // | |
| 1133 | // popmessage("%02x",data); | |
| 1134 | 1134 | |
| 1135 | // | |
| 1135 | // pc6001_video_ram = work_ram + startaddr[(data >> 1) & 0x03]; | |
| 1136 | 1136 | } |
| 1137 | 1137 | |
| 1138 | 1138 | static WRITE8_HANDLER( pc6001m2_col_bank_w ) |
| r8990 | r8991 | |
| 1182 | 1182 | static WRITE8_HANDLER( pc6001m2_0xf3_w ) |
| 1183 | 1183 | { |
| 1184 | 1184 | /* |
| 1185 | x--- ---- M1 (?) wait setting | |
| 1186 | -x-- ---- ROM wait setting | |
| 1187 | --x- ---- RAM wait setting | |
| 1188 | ---x ---- custom irq 2 address output | |
| 1189 | ---- x--- custom irq 1 address output | |
| 1190 | ---- -x-- timer irq mask 2 (mirror?) | |
| 1191 | ---- --x- custom irq 2 mask | |
| 1192 | ---- ---x custom irq 1 mask | |
| 1193 | */ | |
| 1185 | x--- ---- M1 (?) wait setting | |
| 1186 | -x-- ---- ROM wait setting | |
| 1187 | --x- ---- RAM wait setting | |
| 1188 | ---x ---- custom irq 2 address output | |
| 1189 | ---- x--- custom irq 1 address output | |
| 1190 | ---- -x-- timer irq mask 2 (mirror?) | |
| 1191 | ---- --x- custom irq 2 mask | |
| 1192 | ---- ---x custom irq 1 mask | |
| 1193 | */ | |
| 1194 | 1194 | timer_irq_mask2 = data & 4; |
| 1195 | 1195 | } |
| 1196 | 1196 | |
| r8990 | r8991 | |
| 1271 | 1271 | AM_RANGE(0xf1, 0xf1) AM_READWRITE(pc6001m2_bank_r1_r,pc6001m2_bank_r1_w) |
| 1272 | 1272 | AM_RANGE(0xf2, 0xf2) AM_READWRITE(pc6001m2_bank_w0_r,pc6001m2_bank_w0_w) |
| 1273 | 1273 | AM_RANGE(0xf3, 0xf3) AM_WRITE(pc6001m2_0xf3_w) |
| 1274 | // AM_RANGE(0xf4 | |
| 1275 | // AM_RANGE(0xf5 | |
| 1274 | // AM_RANGE(0xf4 | |
| 1275 | // AM_RANGE(0xf5 | |
| 1276 | 1276 | AM_RANGE(0xf6, 0xf6) AM_WRITE(pc6001m2_timer_adj_w) |
| 1277 | 1277 | AM_RANGE(0xf7, 0xf7) AM_WRITE(pc6001m2_timer_irqv_w) |
| 1278 | 1278 | ADDRESS_MAP_END |
| r8990 | r8991 | |
| 1302 | 1302 | |
| 1303 | 1303 | AM_RANGE(0xb0, 0xb0) AM_WRITE(pc6001m2_system_latch_w) |
| 1304 | 1304 | /* these are disk related */ |
| 1305 | // AM_RANGE(0xb1 | |
| 1306 | // AM_RANGE(0xb2 | |
| 1307 | // AM_RANGE(0xb3 | |
| 1305 | // AM_RANGE(0xb1 | |
| 1306 | // AM_RANGE(0xb2 | |
| 1307 | // AM_RANGE(0xb3 | |
| 1308 | 1308 | |
| 1309 | 1309 | AM_RANGE(0xc0, 0xc0) AM_WRITE(pc6001m2_col_bank_w) |
| 1310 | 1310 | AM_RANGE(0xc1, 0xc1) AM_WRITE(pc6001m2_vram_bank_w) |
| r8990 | r8991 | |
| 1318 | 1318 | AM_RANGE(0xf1, 0xf1) AM_READWRITE(pc6001m2_bank_r1_r,pc6001m2_bank_r1_w) |
| 1319 | 1319 | AM_RANGE(0xf2, 0xf2) AM_READWRITE(pc6001m2_bank_w0_r,pc6001m2_bank_w0_w) |
| 1320 | 1320 | AM_RANGE(0xf3, 0xf3) AM_WRITE(pc6001m2_0xf3_w) |
| 1321 | // AM_RANGE(0xf4 | |
| 1322 | // AM_RANGE(0xf5 | |
| 1321 | // AM_RANGE(0xf4 | |
| 1322 | // AM_RANGE(0xf5 | |
| 1323 | 1323 | AM_RANGE(0xf6, 0xf6) AM_WRITE(pc6001m2_timer_adj_w) |
| 1324 | 1324 | AM_RANGE(0xf7, 0xf7) AM_WRITE(pc6001m2_timer_irqv_w) |
| 1325 | 1325 | ADDRESS_MAP_END |
| r8990 | r8991 | |
| 1513 | 1513 | |
| 1514 | 1514 | AM_RANGE(0xb0, 0xb0) AM_WRITE(pc6001sr_system_latch_w) |
| 1515 | 1515 | /* these are disk related */ |
| 1516 | // AM_RANGE(0xb1 | |
| 1517 | // AM_RANGE(0xb2 | |
| 1518 | // AM_RANGE(0xb3 | |
| 1516 | // AM_RANGE(0xb1 | |
| 1517 | // AM_RANGE(0xb2 | |
| 1518 | // AM_RANGE(0xb3 | |
| 1519 | 1519 | |
| 1520 | // AM_RANGE(0xc0, 0xc0) AM_WRITE(pc6001m2_col_bank_w) | |
| 1521 | // AM_RANGE(0xc1, 0xc1) AM_WRITE(pc6001m2_vram_bank_w) | |
| 1522 | // AM_RANGE(0xc2, 0xc2) AM_WRITE(pc6001m2_opt_bank_w) | |
| 1520 | // AM_RANGE(0xc0, 0xc0) AM_WRITE(pc6001m2_col_bank_w) | |
| 1521 | // AM_RANGE(0xc1, 0xc1) AM_WRITE(pc6001m2_vram_bank_w) | |
| 1522 | // AM_RANGE(0xc2, 0xc2) AM_WRITE(pc6001m2_opt_bank_w) | |
| 1523 | 1523 | |
| 1524 | 1524 | AM_RANGE(0xc8, 0xc8) AM_WRITE(pc6001sr_mode_w) |
| 1525 | 1525 | AM_RANGE(0xc9, 0xc9) AM_WRITE(pc6001sr_vram_bank_w) |
| r8990 | r8991 | |
| 1528 | 1528 | |
| 1529 | 1529 | AM_RANGE(0xe0, 0xe3) AM_MIRROR(0x0c) AM_READWRITE(upd7752_reg_r,upd7752_reg_w) |
| 1530 | 1530 | |
| 1531 | // AM_RANGE(0xf0, 0xf0) AM_READWRITE(pc6001m2_bank_r0_r,pc6001m2_bank_r0_w) | |
| 1532 | // AM_RANGE(0xf1, 0xf1) AM_READWRITE(pc6001m2_bank_r1_r,pc6001m2_bank_r1_w) | |
| 1533 | // AM_RANGE(0xf2, 0xf2) AM_READWRITE(pc6001m2_bank_w0_r,pc6001m2_bank_w0_w) | |
| 1531 | // AM_RANGE(0xf0, 0xf0) AM_READWRITE(pc6001m2_bank_r0_r,pc6001m2_bank_r0_w) | |
| 1532 | // AM_RANGE(0xf1, 0xf1) AM_READWRITE(pc6001m2_bank_r1_r,pc6001m2_bank_r1_w) | |
| 1533 | // AM_RANGE(0xf2, 0xf2) AM_READWRITE(pc6001m2_bank_w0_r,pc6001m2_bank_w0_w) | |
| 1534 | 1534 | AM_RANGE(0xf3, 0xf3) AM_WRITE(pc6001m2_0xf3_w) |
| 1535 | // AM_RANGE(0xf4 | |
| 1536 | // AM_RANGE(0xf5 | |
| 1535 | // AM_RANGE(0xf4 | |
| 1536 | // AM_RANGE(0xf5 | |
| 1537 | 1537 | AM_RANGE(0xf6, 0xf6) AM_WRITE(pc6001m2_timer_adj_w) |
| 1538 | 1538 | AM_RANGE(0xf7, 0xf7) AM_WRITE(pc6001m2_timer_irqv_w) |
| 1539 | 1539 | ADDRESS_MAP_END |
| r8990 | r8991 | |
| 1718 | 1718 | |
| 1719 | 1719 | static WRITE8_DEVICE_HANDLER (pc6001_8255_porta_w ) |
| 1720 | 1720 | { |
| 1721 | // if(data != 0x06) | |
| 1722 | // printf("pc6001_8255_porta_w %02x\n",data); | |
| 1721 | // if(data != 0x06) | |
| 1722 | // printf("pc6001_8255_porta_w %02x\n",data); | |
| 1723 | 1723 | } |
| 1724 | 1724 | |
| 1725 | 1725 | static READ8_DEVICE_HANDLER (pc6001_8255_portb_r ) |
| r8990 | r8991 | |
| 1821 | 1821 | static UINT8 joy_press; |
| 1822 | 1822 | |
| 1823 | 1823 | /* |
| 1824 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1825 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1826 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1827 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1828 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1829 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1830 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1831 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1832 | */ | |
| 1824 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_UP ) PORT_8WAY | |
| 1825 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) PORT_8WAY | |
| 1826 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT ) PORT_8WAY | |
| 1827 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT ) PORT_8WAY | |
| 1828 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_BUTTON1 ) | |
| 1829 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1830 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1831 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 1832 | */ | |
| 1833 | 1833 | |
| 1834 | 1834 | joy_press = 0; |
| 1835 | 1835 | |
| r8990 | r8991 | |
| 1902 | 1902 | UINT32 key2 = input_port_read(machine,"key2"); |
| 1903 | 1903 | UINT32 key3 = input_port_read(machine,"key3"); |
| 1904 | 1904 | static UINT32 old_key1,old_key2,old_key3; |
| 1905 | // | |
| 1905 | // UINT8 p1_key = input_port_read(machine, "P1");; | |
| 1906 | 1906 | |
| 1907 | 1907 | if(cas_switch == 0) |
| 1908 | 1908 | { |
| r8990 | r8991 | |
| 2020 | 2020 | sr_bank_r[5] = 0x0a; memory_set_bankptr(machine, "bank6", &ROM[SR_WRAM0(0x0a)]); |
| 2021 | 2021 | sr_bank_r[6] = 0x0c; memory_set_bankptr(machine, "bank7", &ROM[SR_WRAM0(0x0c)]); |
| 2022 | 2022 | sr_bank_r[7] = 0x0e; memory_set_bankptr(machine, "bank8", &ROM[SR_WRAM0(0x0e)]); |
| 2023 | // | |
| 2023 | // bank_opt = 0x02; //tv rom | |
| 2024 | 2024 | |
| 2025 | 2025 | /* enable default work RAM writes */ |
| 2026 | 2026 | sr_bank_w[0] = 0x00; |
| r8990 | r8991 | |
| 2190 | 2190 | MDRV_CARTSLOT_EXTENSION_LIST("bin") |
| 2191 | 2191 | MDRV_CARTSLOT_NOT_MANDATORY |
| 2192 | 2192 | |
| 2193 | // | |
| 2193 | // MDRV_CASSETTE_ADD("cass",pc6001_cassette_config) | |
| 2194 | 2194 | MDRV_CARTSLOT_ADD("cass") |
| 2195 | 2195 | MDRV_CARTSLOT_EXTENSION_LIST("cas,p6") |
| 2196 | 2196 | MDRV_CARTSLOT_NOT_MANDATORY |
| r8990 | r8991 | |
| 2339 | 2339 | ROM_REGION( 0x90000, "maincpu", ROMREGION_ERASEFF ) |
| 2340 | 2340 | ROM_LOAD( "systemrom1.64", 0x10000, 0x10000, CRC(b6fc2db2) SHA1(dd48b1eee60aa34780f153359f5da7f590f8dff4) ) |
| 2341 | 2341 | ROM_LOAD( "systemrom2.64", 0x20000, 0x10000, CRC(55a62a1d) SHA1(3a19855d290fd4ac04e6066fe4a80ecd81dc8dd7) ) |
| 2342 | // cgrom 1 0x30000, 0x10000 | |
| 2343 | // exrom 0 0x40000, 0x10000 | |
| 2344 | // exrom 1 0x50000, 0x10000 | |
| 2345 | // exram 0 0x60000, 0x10000 | |
| 2346 | // work ram 0 0x70000, 0x10000 | |
| 2347 | // <invalid> 0x80000, 0x10000 | |
| 2342 | // cgrom 1 0x30000, 0x10000 | |
| 2343 | // exrom 0 0x40000, 0x10000 | |
| 2344 | // exrom 1 0x50000, 0x10000 | |
| 2345 | // exram 0 0x60000, 0x10000 | |
| 2346 | // work ram 0 0x70000, 0x10000 | |
| 2347 | // <invalid> 0x80000, 0x10000 | |
| 2348 | 2348 | |
| 2349 | 2349 | ROM_REGION( 0x1000, "mcu", ROMREGION_ERASEFF ) |
| 2350 | 2350 | ROM_LOAD( "i8049", 0x0000, 0x1000, NO_DUMP ) |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | MYCOMZ-80A (c) 1981 Japan Electronics College | |
| 4 | 4 | |
| 5 | ||
| 5 | preliminary driver by Angelo Salese | |
| 6 | 6 | |
| 7 | TODO: | |
| 8 | - SN doesn't seem to work properly, needs to find out what's the WE bit | |
| 9 | for. | |
| 10 | - Hook-up FDC and CMT load / save; | |
| 11 | - Printer | |
| 12 | - RTC | |
| 7 | TODO: | |
| 8 | - SN doesn't seem to work properly, needs to find out what's the WE bit | |
| 9 | for. | |
| 10 | - Hook-up FDC and CMT load / save; | |
| 11 | - Printer | |
| 12 | - RTC | |
| 13 | 13 | |
| 14 | 14 | ****************************************************************************/ |
| 15 | 15 | |
| r8990 | r8991 | |
| 367 | 367 | /* doesn't work? */ |
| 368 | 368 | //printf("%02x %02x\n",data,sn_we); |
| 369 | 369 | //if(sn_we) |
| 370 | // | |
| 370 | // sn76496_w(device->machine->device("sn1"), 0, data); | |
| 371 | 371 | } |
| 372 | 372 | |
| 373 | 373 | static WRITE8_DEVICE_HANDLER( vram_haddr_w ) |
| r8990 | r8991 | |
| 378 | 378 | static READ8_DEVICE_HANDLER( input_1a ) |
| 379 | 379 | { |
| 380 | 380 | /* |
| 381 | x--- ---- display flag | |
| 382 | ---- --x- keyboard shift | |
| 383 | ---- ---x keyboard strobe | |
| 384 | */ | |
| 381 | x--- ---- display flag | |
| 382 | ---- --x- keyboard shift | |
| 383 | ---- ---x keyboard strobe | |
| 384 | */ | |
| 385 | 385 | int res; |
| 386 | 386 | |
| 387 | 387 | res = keyb_press_flag; |
| r8990 | r8991 | |
| 393 | 393 | static READ8_DEVICE_HANDLER( input_0c ) |
| 394 | 394 | { |
| 395 | 395 | /* |
| 396 | xxxx ---- keyboard related, it expects to return 1101 here | |
| 397 | */ | |
| 396 | xxxx ---- keyboard related, it expects to return 1101 here | |
| 397 | */ | |
| 398 | 398 | return (mame_rand(device->machine) & 0x20) | 0x00; |
| 399 | 399 | } |
| 400 | 400 | |
| r8990 | r8991 | |
| 407 | 407 | static WRITE8_DEVICE_HANDLER( output_1c ) |
| 408 | 408 | { |
| 409 | 409 | /* |
| 410 | x--- ---- width 80/40 (0 = 80, 1 = 40) | |
| 411 | -x-- ---- video mode (0= tile, 1 = bitmap) | |
| 412 | --x- ---- PSG Chip Select bit | |
| 413 | ---x ---- PSG Write Enable bit | |
| 414 | ---- x--- cmt remote | |
| 415 | ---- -x-- cmt output | |
| 416 | ---- --x- printer reset | |
| 417 | ---- ---x printer strobe | |
| 418 | */ | |
| 410 | x--- ---- width 80/40 (0 = 80, 1 = 40) | |
| 411 | -x-- ---- video mode (0= tile, 1 = bitmap) | |
| 412 | --x- ---- PSG Chip Select bit | |
| 413 | ---x ---- PSG Write Enable bit | |
| 414 | ---- x--- cmt remote | |
| 415 | ---- -x-- cmt output | |
| 416 | ---- --x- printer reset | |
| 417 | ---- ---x printer strobe | |
| 418 | */ | |
| 419 | 419 | |
| 420 | 420 | video_mode = data & 0xc0; |
| 421 | 421 | sn_we = data & 0x10; |
| 422 | // | |
| 422 | // printf("%02x\n",data & 0x10); | |
| 423 | 423 | } |
| 424 | 424 | |
| 425 | 425 | static I8255A_INTERFACE( ppi8255_intf_0 ) |
| r8990 | r8991 | |
| 471 | 471 | if(!shift_press_flag) // shift not pressed |
| 472 | 472 | { |
| 473 | 473 | //if(scancode >= 0x41 && scancode < 0x5b) |
| 474 | // | |
| 474 | // scancode += 0x20; // lowercase, FIXME: 'A' doesn't work properly? | |
| 475 | 475 | } |
| 476 | 476 | else |
| 477 | 477 | { |
| r8990 | r8991 | |
| 559 | 559 | /* Driver */ |
| 560 | 560 | |
| 561 | 561 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 562 | COMP( 1981, mycom, 0, 0, mycom, | |
| 562 | COMP( 1981, mycom, 0, 0, mycom, | |
| 563 | 563 |
| r8990 | r8991 | |
|---|---|---|
| 884 | 884 | { |
| 885 | 885 | image.seterror( IMAGE_ERROR_UNSPECIFIED, "Unable to fully read from file" ); |
| 886 | 886 | return IMAGE_INIT_FAIL; |
| 887 | } | |
| 887 | } | |
| 888 | 888 | } |
| 889 | 889 | else |
| 890 | 890 | { |
| r8990 | r8991 | |
| 977 | 977 | |
| 978 | 978 | MDRV_VIDEO_START( vii ) |
| 979 | 979 | MDRV_VIDEO_UPDATE( vii ) |
| 980 | ||
| 981 | MDRV_SOFTWARE_LIST_ADD("vii_cart","vii") | |
| 980 | ||
| 981 | MDRV_SOFTWARE_LIST_ADD("vii_cart","vii") | |
| 982 | 982 | MACHINE_CONFIG_END |
| 983 | 983 | |
| 984 | 984 | static MACHINE_CONFIG_START( vsmile, vii_state ) |
| r8990 | r8991 | |
|---|---|---|
| 25 | 25 | (it's gray in the Arcade version),could be either flickering for pseudo-alpha effect or it's |
| 26 | 26 | a btanb; |
| 27 | 27 | - Exoa II - Warroid: major tile width/height positioning bugs (especially during gameplay); |
| 28 | - Hydlide 2 / 3: can't get the user disk to work properly | |
| 29 | - Gruppe: shows a random bitmap graphic then returns "program load error" | |
| 30 | - Sorcerian / Ys 3 / Psy-O-Blade (and others): they all fails tight loops with the fdc ready bit check | |
| 31 | - Turbo Alpha: has z80dma / fdc bugs, doesn't show the presentation properly and then hangs; | |
| 32 | - Legend of Kage: has serious graphic artifacts, pcg doesn't scroll properly, bitmap-based sprites aren't shown properly, dma bugs? | |
| 33 | - "newtype": dies with a z80dma assert; | |
| 34 | - Ys 2: fills the screen with "syntax errors" | |
| 35 | - Thexder: Can't start a play, keyboard related issue? | |
| 36 | - V.I.P.: can't get inputs to work at all there; | |
| 28 | - Hydlide 2 / 3: can't get the user disk to work properly | |
| 29 | - Gruppe: shows a random bitmap graphic then returns "program load error" | |
| 30 | - Sorcerian / Ys 3 / Psy-O-Blade (and others): they all fails tight loops with the fdc ready bit check | |
| 31 | - Turbo Alpha: has z80dma / fdc bugs, doesn't show the presentation properly and then hangs; | |
| 32 | - Legend of Kage: has serious graphic artifacts, pcg doesn't scroll properly, bitmap-based sprites aren't shown properly, dma bugs? | |
| 33 | - "newtype": dies with a z80dma assert; | |
| 34 | - Ys 2: fills the screen with "syntax errors" | |
| 35 | - Thexder: Can't start a play, keyboard related issue? | |
| 36 | - V.I.P.: can't get inputs to work at all there; | |
| 37 | 37 | |
| 38 | 38 | Notes: |
| 39 | 39 | - An interesting feature of the Sharp X-1 is the extended i/o bank. When the ppi port c bit 5 |
| r8990 | r8991 | |
|---|---|---|
| 953 | 953 | ROM_LOAD( "b4-1360.rom", 0x10000, 0x4000, CRC(0d311e21) SHA1(55987b7b00ddc666db30f35cbf23500b49e7ff09)) |
| 954 | 954 | ROM_LOAD( "b5-1360.rom", 0x14000, 0x4000, CRC(f945f3f7) SHA1(26116d8277212e14bddb64c531f134fbb5c86f9e)) |
| 955 | 955 | ROM_LOAD( "b6-1360.rom", 0x18000, 0x4000, CRC(ae823112) SHA1(9ab458e70752cacfd5d3ed36a8e89f96c63a6f50)) |
| 956 | ROM_LOAD( "b7-1360.rom", 0x1c000, 0x4000, CRC(ba7384b6) SHA1(95396d506f1d71e66c3ae2d47ffb4b6d10b31401)) | |
| 956 | ROM_LOAD( "b7-1360.rom", 0x1c000, 0x4000, CRC(ba7384b6) SHA1(95396d506f1d71e66c3ae2d47ffb4b6d10b31401)) | |
| 957 | 957 | ROM_REGION(0x100,"gfx1",ROMREGION_ERASEFF) |
| 958 | 958 | ROM_END |
| 959 | ||
| 959 | ||
| 960 | 960 | ROM_START(pc1403) |
| 961 | 961 | ROM_REGION(0x10000,"maincpu",0) |
| 962 | 962 | ROM_LOAD("introm.bin", 0x0000, 0x2000, CRC(588c500b) SHA1(2fed9ebede27e20a8ee4b4b03b9f8cd7808ada5c)) |
| r8990 | r8991 | |
| 996 | 996 | pc1600 |
| 997 | 997 | */ |
| 998 | 998 | ROM_START( pc1500 ) |
| 999 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) | |
| 999 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) | |
| 1000 | 1000 | ROM_LOAD( "sys1500.rom", 0x0000, 0x4000, CRC(d480b50d) SHA1(4bf748ba4d7c2b7cd7da7f3fdefcdd2e4cd41c4e)) |
| 1001 | 1001 | ROM_REGION( 0x10000, "ce150", ROMREGION_ERASEFF ) |
| 1002 | 1002 | ROM_LOAD( "ce-150.rom", 0x0000, 0x2000, CRC(8fa1df6d) SHA1(a3aa02a641a46c27c0d4c0dc025b0dbe9b5b79c8)) |
| r8990 | r8991 | |
|---|---|---|
| 100 | 100 | state_save_register_global(machine, spim_data); |
| 101 | 101 | if (machine->device<cpu_device>("maincpu")->debug()) { |
| 102 | 102 | machine->device<cpu_device>("maincpu")->debug()->set_dasm_override(palm_dasm_override); |
| 103 | } | |
| 103 | } | |
| 104 | 104 | } |
| 105 | 105 | |
| 106 | 106 | static MACHINE_RESET( palm ) |
| r8990 | r8991 | |
|---|---|---|
| 18 | 18 | static ADDRESS_MAP_START(a6809_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 19 | 19 | ADDRESS_MAP_UNMAP_HIGH |
| 20 | 20 | AM_RANGE(0x0000,0x03ff) AM_RAM |
| 21 | AM_RANGE(0x0400,0x07ff) AM_DEVREADWRITE("saa5050", saa5050_videoram_r, saa5050_videoram_w) | |
| 21 | AM_RANGE(0x0400,0x07ff) AM_DEVREADWRITE("saa5050", saa5050_videoram_r, saa5050_videoram_w) | |
| 22 | 22 | AM_RANGE(0x0800,0x0800) AM_DEVWRITE("mc6845", mc6845_address_w) |
| 23 | 23 | AM_RANGE(0x0801,0x0801) AM_DEVREADWRITE("mc6845", mc6845_register_r , mc6845_register_w) |
| 24 | 24 | AM_RANGE(0x0900,0x090f) AM_MIRROR(0xf0)AM_DEVREADWRITE("via", via_r, via_w) |
| r8990 | r8991 | |
| 113 | 113 | MDRV_SAA5050_ADD("saa5050", a6809_saa5050_intf) |
| 114 | 114 | |
| 115 | 115 | MDRV_VIDEO_UPDATE(a6809) |
| 116 | ||
| 116 | ||
| 117 | 117 | MDRV_VIA6522_ADD("via", XTAL_4MHz / 4, via_intf) |
| 118 | ||
| 118 | ||
| 119 | 119 | MDRV_MC6845_ADD("mc6845", MC6845, XTAL_4MHz / 2, a6809_crtc6845_interface) |
| 120 | 120 | MACHINE_CONFIG_END |
| 121 | 121 | |
| r8990 | r8991 | |
| 127 | 127 | /* This looks like some sort of prom */ |
| 128 | 128 | ROM_REGION( 0x100, "proms", 0 ) |
| 129 | 129 | ROM_LOAD( "acorn6809.ic11", 0x0000, 0x0100, CRC(7908317d) SHA1(e0f1e5bd3a8598d3b62bc432dd1f3892ed7e66d8) ) |
| 130 | ||
| 130 | ||
| 131 | 131 | /* This is SAA5050 so same char def is taken as in p2000t driver */ |
| 132 | 132 | ROM_REGION(0x01000, "gfx1",0) |
| 133 | 133 | ROM_LOAD("p2000.chr", 0x0140, 0x08c0, BAD_DUMP CRC(78c17e3e) SHA1(4e1c59dc484505de1dc0b1ba7e5f70a54b0d4ccc)) |
| r8990 | r8991 | |
|---|---|---|
| 513 | 513 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 514 | 514 | COMP( 1986, radio86, 0, 0, radio86, radio86, radio86, "<unknown>", "Radio-86RK", 0) |
| 515 | 515 | COMP( 1986, radio16, radio86, 0, radio16, radio86, radio86, "<unknown>", "Radio-86RK (16K RAM)", 0) |
| 516 | COMP( 1986, kr03, | |
| 516 | COMP( 1986, kr03, | |
| 517 | 517 | COMP( 1986, radio4k, radio86, 0, radio86, radio86, radio86, "<unknown>", "Radio-86RK (4K ROM)", 0) |
| 518 | 518 | COMP( 1986, radiorom, radio86, 0, radiorom, radio86, radio86, "<unknown>", "Radio-86RK (ROM-Disk)", 0) |
| 519 | 519 | COMP( 1986, radioram, radio86, 0, radioram, radio86, radioram, "<unknown>", "Radio-86RK (ROM/RAM Disk)", 0) |
| r8990 | r8991 | |
|---|---|---|
| 584 | 584 | { |
| 585 | 585 | image.fread(ptr + address, 0x2000); |
| 586 | 586 | image.fread(ptr + 0xa000, 0x2000); |
| 587 | ||
| 587 | ||
| 588 | 588 | memory_install_rom(program, address, address + 0x1fff, 0, 0, ptr + address); |
| 589 | 589 | memory_install_rom(program, 0xa000, 0xbfff, 0, 0, ptr + 0xa000); |
| 590 | 590 | } |
| r8990 | r8991 | |
| 603 | 603 | memcpy(ptr + address, image.get_software_region("2000"), size); |
| 604 | 604 | memory_install_rom(program, address, (address + size) - 1, 0, 0, ptr + address); |
| 605 | 605 | } |
| 606 | ||
| 606 | ||
| 607 | 607 | size = image.get_software_region_length("4000"); |
| 608 | 608 | if (size) |
| 609 | 609 | { |
| r8990 | r8991 | |
| 611 | 611 | memcpy(ptr + address, image.get_software_region("4000"), size); |
| 612 | 612 | memory_install_rom(program, address, (address + size) - 1, 0, 0, ptr + address); |
| 613 | 613 | } |
| 614 | ||
| 614 | ||
| 615 | 615 | size = image.get_software_region_length("6000"); |
| 616 | 616 | if (size) |
| 617 | 617 | { |
| r8990 | r8991 | |
| 619 | 619 | memcpy(ptr + address, image.get_software_region("6000"), size); |
| 620 | 620 | memory_install_rom(program, address, (address + size) - 1, 0, 0, ptr + address); |
| 621 | 621 | } |
| 622 | ||
| 622 | ||
| 623 | 623 | size = image.get_software_region_length("a000"); |
| 624 | 624 | if (size) |
| 625 | 625 | { |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | ||
| 2 | ||
| 3 | 3 | SEL Z80 Trainer |
| 4 | 4 | |
| 5 | 5 | 31/08/2010 Skeleton driver. |
| r8990 | r8991 | |
| 18 | 18 | |
| 19 | 19 | static ADDRESS_MAP_START( selz80_io , ADDRESS_SPACE_IO, 8) |
| 20 | 20 | ADDRESS_MAP_UNMAP_HIGH |
| 21 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 21 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 22 | 22 | ADDRESS_MAP_END |
| 23 | 23 | |
| 24 | 24 | /* Input ports */ |
| r8990 | r8991 | |
| 26 | 26 | INPUT_PORTS_END |
| 27 | 27 | |
| 28 | 28 | |
| 29 | static MACHINE_RESET(selz80) | |
| 30 | { | |
| 29 | static MACHINE_RESET(selz80) | |
| 30 | { | |
| 31 | 31 | } |
| 32 | 32 | |
| 33 | 33 | static VIDEO_START( selz80 ) |
| r8990 | r8991 | |
| 43 | 43 | /* basic machine hardware */ |
| 44 | 44 | MDRV_CPU_ADD("maincpu",Z80, XTAL_4MHz) |
| 45 | 45 | MDRV_CPU_PROGRAM_MAP(selz80_mem) |
| 46 | MDRV_CPU_IO_MAP(selz80_io) | |
| 46 | MDRV_CPU_IO_MAP(selz80_io) | |
| 47 | 47 | |
| 48 | 48 | MDRV_MACHINE_RESET(selz80) |
| 49 | ||
| 49 | ||
| 50 | 50 | /* video hardware */ |
| 51 | 51 | MDRV_SCREEN_ADD("screen", RASTER) |
| 52 | 52 | MDRV_SCREEN_REFRESH_RATE(50) |
| r8990 | r8991 | |
| 72 | 72 | /* Driver */ |
| 73 | 73 | |
| 74 | 74 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 75 | COMP( 1985, selz80, 0, 0, | |
| 75 | COMP( 1985, selz80, 0, 0, | |
| 76 | 76 |
| r8990 | r8991 | |
|---|---|---|
| 7 | 7 | TODO: |
| 8 | 8 | - no documentation, the entire driver is just a bunch of educated |
| 9 | 9 | guesses ... |
| 10 | - BEEP pitch is horrible | |
| 11 | - fix fdc issue with 1dd disks (irq related?) | |
| 10 | - BEEP pitch is horrible | |
| 11 | - fix fdc issue with 1dd disks (irq related?) | |
| 12 | 12 | |
| 13 | 13 | ****************************************************************************/ |
| 14 | 14 | |
| r8990 | r8991 | |
| 307 | 307 | case 0x04: |
| 308 | 308 | // ---- xxxx select floppy drive (yes, 15 of them, A to P) |
| 309 | 309 | wd17xx_set_drive(dev,data & 0x01); |
| 310 | // | |
| 310 | // wd17xx_set_side(dev,(data & 0x10)>>4); | |
| 311 | 311 | if(data & 0xf0) |
| 312 | 312 | printf("%02x\n",data); |
| 313 | 313 | break; |
| r8990 | r8991 | |
| 317 | 317 | static WRITE_LINE_DEVICE_HANDLER( smc777_fdc_intrq_w ) |
| 318 | 318 | { |
| 319 | 319 | fdc_irq_flag = state; |
| 320 | // | |
| 320 | // cputag_set_input_line(device->machine, "maincpu", 0, (state) ? ASSERT_LINE : CLEAR_LINE); | |
| 321 | 321 | } |
| 322 | 322 | |
| 323 | 323 | static WRITE_LINE_DEVICE_HANDLER( smc777_fdc_drq_w ) |
| r8990 | r8991 | |
| 335 | 335 | |
| 336 | 336 | keyb_press_flag = 0; |
| 337 | 337 | res = keyb_press; |
| 338 | // | |
| 338 | // keyb_press = 0xff; | |
| 339 | 339 | |
| 340 | 340 | return res; |
| 341 | 341 | } |
| r8990 | r8991 | |
| 355 | 355 | static WRITE8_HANDLER( system_output_w ) |
| 356 | 356 | { |
| 357 | 357 | /* |
| 358 | ---x --- beep | |
| 359 | all the rest is unknown at current time | |
| 360 | */ | |
| 358 | ---x --- beep | |
| 359 | all the rest is unknown at current time | |
| 360 | */ | |
| 361 | 361 | system_data = data; |
| 362 | 362 | beep_set_state(space->machine->device("beeper"),data & 0x10); |
| 363 | 363 | } |
| r8990 | r8991 | |
| 389 | 389 | static WRITE8_HANDLER( display_reg_w ) |
| 390 | 390 | { |
| 391 | 391 | /* |
| 392 | x--- ---- width 80 / 40 switch (0 = 640 x 200 1 = 320 x 200) | |
| 393 | ---- -x-- mode select? | |
| 394 | */ | |
| 392 | x--- ---- width 80 / 40 switch (0 = 640 x 200 1 = 320 x 200) | |
| 393 | ---- -x-- mode select? | |
| 394 | */ | |
| 395 | 395 | |
| 396 | 396 | { |
| 397 | 397 | if((display_reg & 0x80) != (data & 0x80)) |
| r8990 | r8991 | |
| 426 | 426 | AM_RANGE(0x18, 0x19) AM_WRITE(smc777_6845_w) |
| 427 | 427 | AM_RANGE(0x1a, 0x1b) AM_READ(key_r) AM_WRITENOP//keyboard data |
| 428 | 428 | AM_RANGE(0x1c, 0x1c) AM_READWRITE(system_input_r,system_output_w) //status and control data / Printer strobe |
| 429 | // AM_RANGE(0x1d, 0x1d) AM_WRITENOP //status and control data / Printer status / strobe | |
| 430 | // AM_RANGE(0x1e, 0x1f) AM_WRITENOP //RS232C irq control | |
| 429 | // AM_RANGE(0x1d, 0x1d) AM_WRITENOP //status and control data / Printer status / strobe | |
| 430 | // AM_RANGE(0x1e, 0x1f) AM_WRITENOP //RS232C irq control | |
| 431 | 431 | AM_RANGE(0x20, 0x20) AM_READWRITE(display_reg_r,display_reg_w) //display mode switching |
| 432 | // AM_RANGE(0x21, 0x21) AM_WRITENOP //60 Hz irq control | |
| 433 | // AM_RANGE(0x22, 0x22) AM_WRITENOP //printer output data | |
| 432 | // AM_RANGE(0x21, 0x21) AM_WRITENOP //60 Hz irq control | |
| 433 | // AM_RANGE(0x22, 0x22) AM_WRITENOP //printer output data | |
| 434 | 434 | AM_RANGE(0x23, 0x23) AM_WRITE(border_col_w) //border area control |
| 435 | // AM_RANGE(0x24, 0x24) AM_WRITENOP //Timer write / specify address (RTC) | |
| 436 | // AM_RANGE(0x25, 0x25) AM_READNOP //Timer read (RTC) | |
| 437 | // AM_RANGE(0x26, 0x26) AM_WRITENOP //RS232C RX / TX | |
| 438 | // AM_RANGE(0x27, 0x27) AM_WRITENOP //RS232C Mode / Command / Status | |
| 435 | // AM_RANGE(0x24, 0x24) AM_WRITENOP //Timer write / specify address (RTC) | |
| 436 | // AM_RANGE(0x25, 0x25) AM_READNOP //Timer read (RTC) | |
| 437 | // AM_RANGE(0x26, 0x26) AM_WRITENOP //RS232C RX / TX | |
| 438 | // AM_RANGE(0x27, 0x27) AM_WRITENOP //RS232C Mode / Command / Status | |
| 439 | 439 | |
| 440 | // AM_RANGE(0x28, 0x2c) AM_READWRITE(smc777_fdc_r,smc777_fdc_w) //fdc 2, MB8876 -> FD1791 | |
| 441 | // AM_RANGE(0x2d, 0x2f) AM_NOP //rs-232c no. 2 | |
| 440 | // AM_RANGE(0x28, 0x2c) AM_READWRITE(smc777_fdc_r,smc777_fdc_w) //fdc 2, MB8876 -> FD1791 | |
| 441 | // AM_RANGE(0x2d, 0x2f) AM_NOP //rs-232c no. 2 | |
| 442 | 442 | AM_RANGE(0x30, 0x34) AM_READWRITE(smc777_fdc1_r,smc777_fdc1_w) //fdc 1, MB8876 -> FD1791 |
| 443 | // AM_RANGE(0x35, 0x37) AM_NOP //rs-232c no. 3 | |
| 444 | // AM_RANGE(0x38, 0x3b) AM_NOP //cache disk unit | |
| 445 | // AM_RANGE(0x3c, 0x3d) AM_NOP //RGB Superimposer | |
| 446 | // AM_RANGE(0x40, 0x47) AM_NOP //IEEE-488 interface unit | |
| 447 | // AM_RANGE(0x48, 0x50) AM_NOP //HDD (Winchester) | |
| 443 | // AM_RANGE(0x35, 0x37) AM_NOP //rs-232c no. 3 | |
| 444 | // AM_RANGE(0x38, 0x3b) AM_NOP //cache disk unit | |
| 445 | // AM_RANGE(0x3c, 0x3d) AM_NOP //RGB Superimposer | |
| 446 | // AM_RANGE(0x40, 0x47) AM_NOP //IEEE-488 interface unit | |
| 447 | // AM_RANGE(0x48, 0x50) AM_NOP //HDD (Winchester) | |
| 448 | 448 | AM_RANGE(0x51, 0x51) AM_READ(unk_r) |
| 449 | 449 | AM_RANGE(0x52, 0x52) AM_WRITE(smc777_ramdac_w) |
| 450 | // | |
| 450 | // AM_RANGE(0x54, 0x59) AM_NOP //VTR Controller | |
| 451 | 451 | AM_RANGE(0x53, 0x53) AM_DEVWRITE("sn1", sn76496_w) //not in the datasheet ... almost certainly SMC-777 specific |
| 452 | // AM_RANGE(0x5a, 0x5b) AM_WRITENOP //RAM banking | |
| 453 | // AM_RANGE(0x70, 0x70) AM_NOP //Auto Start ROM | |
| 454 | // AM_RANGE(0x74, 0x74) AM_NOP //IEEE-488 ROM | |
| 455 | // AM_RANGE(0x75, 0x75) AM_NOP //VTR Controller ROM | |
| 452 | // AM_RANGE(0x5a, 0x5b) AM_WRITENOP //RAM banking | |
| 453 | // AM_RANGE(0x70, 0x70) AM_NOP //Auto Start ROM | |
| 454 | // AM_RANGE(0x74, 0x74) AM_NOP //IEEE-488 ROM | |
| 455 | // AM_RANGE(0x75, 0x75) AM_NOP //VTR Controller ROM | |
| 456 | 456 | AM_RANGE(0x80, 0xff) AM_READWRITE(smc777_fbuf_r, smc777_fbuf_w) //GRAM |
| 457 | 457 | ADDRESS_MAP_END |
| 458 | 458 | |
| r8990 | r8991 | |
| 580 | 580 | if((input_port_read(machine,portnames[port_i])>>i) & 1) |
| 581 | 581 | { |
| 582 | 582 | //key_flag = 1; |
| 583 | // if(keymod & 0x02) // shift not pressed | |
| 584 | // { | |
| 585 | // if(scancode >= 0x41 && scancode < 0x5a) | |
| 586 | // scancode += 0x20; // lowercase | |
| 587 | // } | |
| 588 | // else | |
| 589 | // { | |
| 590 | // if(scancode >= 0x31 && scancode < 0x3a) | |
| 591 | // scancode -= 0x10; | |
| 592 | // if(scancode == 0x30) | |
| 593 | // { | |
| 594 | // scancode = 0x3d; | |
| 595 | // } | |
| 596 | // } | |
| 583 | // if(keymod & 0x02) // shift not pressed | |
| 584 | // { | |
| 585 | // if(scancode >= 0x41 && scancode < 0x5a) | |
| 586 | // scancode += 0x20; // lowercase | |
| 587 | // } | |
| 588 | // else | |
| 589 | // { | |
| 590 | // if(scancode >= 0x31 && scancode < 0x3a) | |
| 591 | // scancode -= 0x10; | |
| 592 | // if(scancode == 0x30) | |
| 593 | // { | |
| 594 | // scancode = 0x3d; | |
| 595 | // } | |
| 596 | // } | |
| 597 | 597 | keyb_press = scancode; |
| 598 | 598 | keyb_press_flag = 1; |
| 599 | 599 | return; |
| r8990 | r8991 | |
| 755 | 755 | /* Driver */ |
| 756 | 756 | |
| 757 | 757 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 758 | COMP( 1983, smc777, 0, 0, | |
| 758 | COMP( 1983, smc777, 0, 0, | |
| 759 | 759 |
| r8990 | r8991 | |
|---|---|---|
| 222 | 222 | running_device *beta = machine->device(BETA_DISK_TAG); |
| 223 | 223 | UINT16 pc = cpu_get_reg(machine->device("maincpu"), STATE_GENPCBASE); |
| 224 | 224 | address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 225 | ||
| 225 | ||
| 226 | 226 | if (betadisk_is_active(beta)) |
| 227 | 227 | { |
| 228 | 228 | if (pc >= 0x4000) |
| r8990 | r8991 | |
|---|---|---|
| 137 | 137 | |
| 138 | 138 | static MACHINE_CONFIG_START( zexall, driver_data_t ) |
| 139 | 139 | /* basic machine hardware */ |
| 140 | MDRV_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz*10) | |
| 140 | MDRV_CPU_ADD("maincpu", Z80, XTAL_3_579545MHz*10) | |
| 141 | 141 | MDRV_CPU_PROGRAM_MAP(z80_mem) |
| 142 | 142 | MDRV_CPU_IO_MAP(z80_io) |
| 143 | 143 | MDRV_QUANTUM_TIME(HZ(60)) |
| r8990 | r8991 | |
|---|---|---|
| 639 | 639 | address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 640 | 640 | |
| 641 | 641 | space->set_direct_update_handler(direct_update_delegate_create_static(spectrum_direct, *machine)); |
| 642 | ||
| 642 | ||
| 643 | 643 | state->port_7ffd_data = -1; |
| 644 | 644 | state->port_1ffd_data = -1; |
| 645 | 645 | } |
| r8990 | r8991 | |
|---|---|---|
| 823 | 823 | MDRV_CPU_MODIFY("m8502") |
| 824 | 824 | MDRV_CPU_CLOCK( VIC6569_CLOCK) |
| 825 | 825 | MDRV_CPU_CONFIG( c128_m8502_interface ) |
| 826 | ||
| 826 | ||
| 827 | 827 | MDRV_SCREEN_MODIFY("screen") |
| 828 | 828 | MDRV_SCREEN_REFRESH_RATE(VIC6569_VRETRACERATE) |
| 829 | 829 | MDRV_SCREEN_SIZE(VIC6569_COLUMNS * 2, VIC6569_LINES) |
| r8990 | r8991 | |
|---|---|---|
| 466 | 466 | // |
| 467 | 467 | //static UINT8 krtn_read(running_machine *machine) |
| 468 | 468 | //{ |
| 469 | // px8_state *state = machine->driver_data<px8_state>(); | |
| 470 | // UINT8 data = 0xff; | |
| 469 | // px8_state *state = machine->driver_data<px8_state>(); | |
| 470 | // UINT8 data = 0xff; | |
| 471 | 471 | // |
| 472 | // switch (state->ksc) | |
| 473 | // { | |
| 474 | // case 0: data = input_port_read(machine, "KSC0"); break; | |
| 475 | // case 1: data = input_port_read(machine, "KSC1"); break; | |
| 476 | // case 2: data = input_port_read(machine, "KSC2"); break; | |
| 477 | // case 3: data = input_port_read(machine, "KSC3"); break; | |
| 478 | // case 4: data = input_port_read(machine, "KSC4"); break; | |
| 479 | // case 5: data = input_port_read(machine, "KSC5"); break; | |
| 480 | // case 6: data = input_port_read(machine, "KSC6"); break; | |
| 481 | // case 7: data = input_port_read(machine, "KSC7"); break; | |
| 482 | // case 8: data = input_port_read(machine, "KSC8"); break; | |
| 483 | // case 9: data = input_port_read(machine, "SW4"); break; | |
| 484 | // } | |
| 472 | // switch (state->ksc) | |
| 473 | // { | |
| 474 | // case 0: data = input_port_read(machine, "KSC0"); break; | |
| 475 | // case 1: data = input_port_read(machine, "KSC1"); break; | |
| 476 | // case 2: data = input_port_read(machine, "KSC2"); break; | |
| 477 | // case 3: data = input_port_read(machine, "KSC3"); break; | |
| 478 | // case 4: data = input_port_read(machine, "KSC4"); break; | |
| 479 | // case 5: data = input_port_read(machine, "KSC5"); break; | |
| 480 | // case 6: data = input_port_read(machine, "KSC6"); break; | |
| 481 | // case 7: data = input_port_read(machine, "KSC7"); break; | |
| 482 | // case 8: data = input_port_read(machine, "KSC8"); break; | |
| 483 | // case 9: data = input_port_read(machine, "SW4"); break; | |
| 484 | // } | |
| 485 | 485 | // |
| 486 | // | |
| 486 | // return data; | |
| 487 | 487 | //} |
| 488 | 488 | // |
| 489 | 489 | ///*------------------------------------------------- |
| r8990 | r8991 | |
| 492 | 492 | // |
| 493 | 493 | //static READ8_HANDLER( krtn_0_3_r ) |
| 494 | 494 | //{ |
| 495 | // | |
| 495 | // return krtn_read(space->machine) & 0x0f; | |
| 496 | 496 | //} |
| 497 | 497 | // |
| 498 | 498 | ///*------------------------------------------------- |
| r8990 | r8991 | |
| 501 | 501 | // |
| 502 | 502 | //static READ8_HANDLER( krtn_4_7_r ) |
| 503 | 503 | //{ |
| 504 | // | |
| 504 | // return krtn_read(space->machine) >> 4; | |
| 505 | 505 | //} |
| 506 | 506 | // |
| 507 | 507 | ///*------------------------------------------------- |
| r8990 | r8991 | |
| 510 | 510 | // |
| 511 | 511 | //static WRITE8_HANDLER( ksc_w ) |
| 512 | 512 | //{ |
| 513 | // | |
| 513 | // px8_state *state = space->machine->driver_data<px8_state>(); | |
| 514 | 514 | // |
| 515 | // | |
| 515 | // state->ksc = data; | |
| 516 | 516 | //} |
| 517 | 517 | |
| 518 | 518 | /*************************************************************************** |
| r8990 | r8991 | |
| 575 | 575 | |
| 576 | 576 | //static ADDRESS_MAP_START( px8_sub_io, ADDRESS_SPACE_IO, 8 ) |
| 577 | 577 | //// AM_RANGE(0x00, 0x00) AM_READWRITE() |
| 578 | // | |
| 578 | // AM_RANGE(0x01, 0x01) AM_READ(krtn_0_3_r) | |
| 579 | 579 | //// AM_RANGE(0x02, 0x02) AM_WRITE() |
| 580 | // | |
| 580 | // AM_RANGE(0x03, 0x03) AM_WRITE(ksc_w) | |
| 581 | 581 | //// AM_RANGE(0x04, 0x04) AM_WRITE() |
| 582 | // | |
| 582 | // AM_RANGE(0x05, 0x05) AM_READ(krtn_4_7_r) | |
| 583 | 583 | //// AM_RANGE(0x06, 0x06) AM_READ() |
| 584 | 584 | //// AM_RANGE(0x07, 0x07) AM_WRITE() |
| 585 | 585 | //ADDRESS_MAP_END |
| r8990 | r8991 | |
|---|---|---|
| 27 | 27 | - tune cassette trigger level |
| 28 | 28 | - accurate video timing |
| 29 | 29 | |
| 30 | 10 SCREEN 2,1,1:CLS | |
| 31 | 20 FOR X=0 TO 8 | |
| 32 | 30 LINE(X*24,0)-(X*24+16,191),X,BF | |
| 33 | 40 NEXT | |
| 30 | 10 SCREEN 2,1,1:CLS | |
| 31 | 20 FOR X=0 TO 8 | |
| 32 | 30 LINE(X*24,0)-(X*24+16,191),X,BF | |
| 33 | 40 NEXT | |
| 34 | 34 | |
| 35 | 10 SCREEN3,1,1:COLOR,,1:CLS | |
| 36 | 20 X1=INT(RND(1)*256):Y1=INT(RND(1)*192):X2=INT(RND(1)*256):Y2=INT(RND(1)*192):C=INT(RND(1)*4)+1:LINE(X1,Y1)-(X2,Y2),C:GOTO 20 | |
| 37 | RUN | |
| 35 | 10 SCREEN3,1,1:COLOR,,1:CLS | |
| 36 | 20 X1=INT(RND(1)*256):Y1=INT(RND(1)*192):X2=INT(RND(1)*256):Y2=INT(RND(1)*192):C=INT(RND(1)*4)+1:LINE(X1,Y1)-(X2,Y2),C:GOTO 20 | |
| 37 | RUN | |
| 38 | 38 | |
| 39 | 39 | |
| 40 | ||
| 40 | 10 SCREEN2,1,1:CLS:FORX=0TO8:LINE(X*24,0)-(X*24+16,191),X,BF:NEXT | |
| 41 | 41 | |
| 42 | 42 | */ |
| 43 | 43 |
| r8990 | r8991 | |
|---|---|---|
| 1866 | 1866 | memory_set_bankptr(machine, "bank1", bank_base[1] ); |
| 1867 | 1867 | memory_set_bankptr(machine, "bank2", bank_base[2] ); |
| 1868 | 1868 | modeSS_write_enabled = 0; |
| 1869 | modeSS_byte_started = 0; | |
| 1869 | modeSS_byte_started = 0; | |
| 1870 | 1870 | space->set_direct_update_handler(direct_update_delegate_create_static(modeSS_opbase, *machine)); |
| 1871 | 1871 | /* The Supercharger has no motor control so just enable it */ |
| 1872 | 1872 | cassette_change_state( machine->device("cassette"), CASSETTE_MOTOR_ENABLED, CASSETTE_MOTOR_DISABLED ); |
| r8990 | r8991 | |
| 1881 | 1881 | memory_install_read8_handler(space, 0x1000, 0x103f, 0, 0, modeDPC_r); |
| 1882 | 1882 | memory_install_write8_handler(space, 0x1040, 0x107f, 0, 0, modeDPC_w); |
| 1883 | 1883 | memory_install_write8_handler(space, 0x1ff8, 0x1ff9, 0, 0, modeF8_switch_w); |
| 1884 | memory_install_read8_handler(space, 0x1ff8, 0x1ff9, 0, 0, modeF8_switch_r); | |
| 1884 | memory_install_read8_handler(space, 0x1ff8, 0x1ff9, 0, 0, modeF8_switch_r); | |
| 1885 | 1885 | space->set_direct_update_handler(direct_update_delegate_create_static(modeDPC_opbase_handler, *machine)); |
| 1886 | 1886 | { |
| 1887 | 1887 | int data_fetcher; |
| r8990 | r8991 | |
|---|---|---|
| 356 | 356 | } |
| 357 | 357 | |
| 358 | 358 | /* if boot is active, page in fake ROM */ |
| 359 | /* if ((pcw_boot) && (block==0)) | |
| 360 | { | |
| 361 | unsigned char *FakeROM; | |
| 359 | /* if ((pcw_boot) && (block==0)) | |
| 360 | { | |
| 361 | unsigned char *FakeROM; | |
| 362 | 362 | |
| 363 | ||
| 363 | FakeROM = &memory_region(machine, "maincpu")[0x010000]; | |
| 364 | 364 | |
| 365 | memory_set_bankptr(machine, "bank1", FakeROM); | |
| 366 | }*/ | |
| 365 | memory_set_bankptr(machine, "bank1", FakeROM); | |
| 366 | }*/ | |
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | /* from Jacob Nevins docs */ |
| r8990 | r8991 | |
| 689 | 689 | |
| 690 | 690 | static READ8_HANDLER(pcw_printer_data_r) |
| 691 | 691 | { |
| 692 | // | |
| 692 | // pcw_printer_data = 0xf8; | |
| 693 | 693 | pcw_printer_data = upi41_master_r(space->machine->device("printer_mcu"),0); |
| 694 | 694 | return pcw_printer_data; |
| 695 | 695 | } |
| r8990 | r8991 | |
| 703 | 703 | /* MCU handlers */ |
| 704 | 704 | /*static READ8_HANDLER(mcu_printer_data_r) |
| 705 | 705 | { |
| 706 | ||
| 706 | return pcw_printer_data; | |
| 707 | 707 | } |
| 708 | 708 | |
| 709 | 709 | static WRITE8_HANDLER(mcu_printer_data_w) |
| 710 | 710 | { |
| 711 | ||
| 711 | pcw_printer_data = data; | |
| 712 | 712 | }*/ |
| 713 | 713 | |
| 714 | 714 | static READ8_HANDLER(mcu_printer_command_r) |
| r8990 | r8991 | |
| 730 | 730 | int seq; |
| 731 | 731 | |
| 732 | 732 | /* Keyboard data is sent in serial from the MCU through the keyboard port, to the ASIC |
| 733 | Sends a string of 12-bit sequences, first 4 bits are the RAM location (from &3ff0), | |
| 734 | then 8 bits for the data to be written there. */ | |
| 733 | Sends a string of 12-bit sequences, first 4 bits are the RAM location (from &3ff0), | |
| 734 | then 8 bits for the data to be written there. */ | |
| 735 | 735 | seq = mcu_transmit_count % 12; |
| 736 | 736 | if(seq < 4) |
| 737 | 737 | { |
| r8990 | r8991 | |
| 873 | 873 | /* i8041 MCU */ |
| 874 | 874 | static ADDRESS_MAP_START(pcw_printer_io, ADDRESS_SPACE_IO, 8) |
| 875 | 875 | AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(mcu_printer_command_r) |
| 876 | // AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(mcu_printer_data_r, mcu_printer_data_w) | |
| 877 | // AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(mcu_printer_p2_r) | |
| 876 | // AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(mcu_printer_data_r, mcu_printer_data_w) | |
| 877 | // AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_READ(mcu_printer_p2_r) | |
| 878 | 878 | AM_RANGE(MCS48_PORT_PROG, MCS48_PORT_PROG) AM_DEVWRITE("printer_8243",i8243_prog_w) |
| 879 | 879 | ADDRESS_MAP_END |
| 880 | 880 | |
| r8990 | r8991 | |
| 1065 | 1065 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| 1066 | 1066 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Stop") PORT_CODE(KEYCODE_ESC) PORT_CHAR(UCHAR_MAMEKEY(ESC)) |
| 1067 | 1067 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Q) PORT_CHAR('q') PORT_CHAR('Q') |
| 1068 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) | |
| 1068 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_TAB) | |
| 1069 | 1069 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_A) PORT_CHAR('a') PORT_CHAR('A') |
| 1070 | 1070 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("Shift Lock") PORT_CODE(KEYCODE_CAPSLOCK) PORT_CHAR(UCHAR_MAMEKEY(CAPSLOCK)) |
| 1071 | 1071 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_Z) PORT_CHAR('z') PORT_CHAR('Z') |
| r8990 | r8991 | |
| 1077 | 1077 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("[-]") PORT_CODE(KEYCODE_F4) PORT_CHAR(UCHAR_MAMEKEY(PGDN)) // 1st key on the right from 'Spacebar' |
| 1078 | 1078 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("F7 F8") PORT_CODE(KEYCODE_F7) PORT_CHAR(UCHAR_MAMEKEY(F7)) PORT_CHAR(UCHAR_MAMEKEY(F8)) |
| 1079 | 1079 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_ENTER_PAD) PORT_CHAR(UCHAR_MAMEKEY(ENTER_PAD)) |
| 1080 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) | |
| 1080 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_CODE(KEYCODE_DEL_PAD) | |
| 1081 | 1081 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("DEL<") PORT_CODE(KEYCODE_BACKSPACE) PORT_CHAR(8) |
| 1082 | 1082 | |
| 1083 | 1083 | PORT_START("LINE10") /* 0x03ffa */ |
| r8990 | r8991 | |
| 1096 | 1096 | For now, I let it with no default mapping. */ |
| 1097 | 1097 | PORT_START("LINE13") /* 0x03ffd */ |
| 1098 | 1098 | PORT_BIT(0xff, 0xff, IPT_UNUSED) |
| 1099 | // PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT LOCK") //PORT_CODE(KEYCODE_CAPSLOCK) | |
| 1100 | // PORT_BIT(0x80, 0xff, IPT_UNUSED) | |
| 1099 | // PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_KEYBOARD) PORT_NAME("SHIFT LOCK") //PORT_CODE(KEYCODE_CAPSLOCK) | |
| 1100 | // PORT_BIT(0x80, 0xff, IPT_UNUSED) | |
| 1101 | 1101 | |
| 1102 | 1102 | PORT_START("LINE14") /* 0x03ffe */ |
| 1103 | 1103 | PORT_BIT ( 0xff, 0xff, IPT_UNUSED ) |
| r8990 | r8991 | |
|---|---|---|
| 5 | 5 | 10/06/2008 Preliminary driver. |
| 6 | 6 | |
| 7 | 7 | |
| 8 | ||
| 8 | Notes: | |
| 9 | 9 | |
| 10 | - keyboard connected to sio channel a | |
| 11 | - sio channel a clock output connected to ctc trigger 0 | |
| 10 | - keyboard connected to sio channel a | |
| 11 | - sio channel a clock output connected to ctc trigger 0 | |
| 12 | 12 | |
| 13 | 13 | ****************************************************************************/ |
| 14 | 14 |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | ||
| 2 | ||
| 3 | 3 | Xircom / Intel REX 6000 |
| 4 | 4 | |
| 5 | 5 | 18/06/2009 Skeleton driver. |
| r8990 | r8991 | |
| 23 | 23 | INPUT_PORTS_END |
| 24 | 24 | |
| 25 | 25 | |
| 26 | static MACHINE_RESET(rex6000) | |
| 27 | { | |
| 26 | static MACHINE_RESET(rex6000) | |
| 27 | { | |
| 28 | 28 | } |
| 29 | 29 | |
| 30 | 30 | static VIDEO_START( rex6000 ) |
| r8990 | r8991 | |
| 40 | 40 | /* basic machine hardware */ |
| 41 | 41 | MDRV_CPU_ADD("maincpu",Z80, XTAL_4MHz) |
| 42 | 42 | MDRV_CPU_PROGRAM_MAP(rex6000_mem) |
| 43 | MDRV_CPU_IO_MAP(rex6000_io) | |
| 43 | MDRV_CPU_IO_MAP(rex6000_io) | |
| 44 | 44 | |
| 45 | 45 | MDRV_MACHINE_RESET(rex6000) |
| 46 | ||
| 46 | ||
| 47 | 47 | /* video hardware */ |
| 48 | 48 | MDRV_SCREEN_ADD("screen", RASTER) |
| 49 | 49 | MDRV_SCREEN_REFRESH_RATE(50) |
| r8990 | r8991 | |
| 67 | 67 | /* Driver */ |
| 68 | 68 | |
| 69 | 69 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 70 | COMP( 2000, rex6000, 0, 0, | |
| 70 | COMP( 2000, rex6000, 0, 0, | |
| 71 | 71 |
| r8990 | r8991 | |
|---|---|---|
| 379 | 379 | |
| 380 | 380 | /*static READ8_HANDLER( keyboard_r ) |
| 381 | 381 | { |
| 382 | ||
| 382 | v1050_state *state = space->machine->driver_data<v1050_state>(); | |
| 383 | 383 | |
| 384 | ||
| 384 | static const char *const KEY_ROW[] = { "X0", "X1", "X2", "X3", "X4", "X5", "X6", "X7", "X8", "X9", "XA", "XB" }; | |
| 385 | 385 | |
| 386 | ||
| 386 | return input_port_read(space->machine, KEY_ROW[state->keylatch]); | |
| 387 | 387 | } |
| 388 | 388 | |
| 389 | 389 | static WRITE8_HANDLER( keyboard_w ) |
| 390 | 390 | { |
| 391 | ||
| 391 | v1050_state *state = space->machine->driver_data<v1050_state>(); | |
| 392 | 392 | |
| 393 | ||
| 393 | state->keylatch = data & 0x0f; | |
| 394 | 394 | } |
| 395 | 395 | */ |
| 396 | 396 | //static WRITE8_HANDLER( p2_w ) |
| 397 | 397 | //{ |
| 398 | // | |
| 398 | // /* | |
| 399 | 399 | // |
| 400 | 400 | // bit description |
| 401 | 401 | // |
| r8990 | r8991 | |
| 410 | 410 | // |
| 411 | 411 | // */ |
| 412 | 412 | // |
| 413 | // | |
| 413 | // v1050_state *state = space->machine->driver_data<v1050_state>(); | |
| 414 | 414 | // |
| 415 | // | |
| 415 | // output_set_led_value(0, BIT(data, 5)); | |
| 416 | 416 | //// discrete_sound_w(discrete, NODE_01, BIT(data, 6)); |
| 417 | // | |
| 417 | // state->kb_so = BIT(data, 7); | |
| 418 | 418 | //} |
| 419 | 419 | |
| 420 | 420 | /* Memory Maps */ |
| r8990 | r8991 | |
| 460 | 460 | ADDRESS_MAP_END |
| 461 | 461 | |
| 462 | 462 | //static ADDRESS_MAP_START( v1050_kbd_io, ADDRESS_SPACE_IO, 8 ) |
| 463 | // AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(keyboard_r, keyboard_w) | |
| 464 | // AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(p2_w) | |
| 463 | // AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_READWRITE(keyboard_r, keyboard_w) | |
| 464 | // AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(p2_w) | |
| 465 | 465 | //ADDRESS_MAP_END |
| 466 | 466 | |
| 467 | 467 | /* Input Ports */ |
| r8990 | r8991 | |
| 1165 | 1165 | state->bank = 0; |
| 1166 | 1166 | |
| 1167 | 1167 | v1050_bankswitch(machine); |
| 1168 | ||
| 1169 | state->timer_sio->adjust(attotime_zero, 0, ATTOTIME_IN_HZ((double)XTAL_16MHz/4/13/16)); | |
| 1168 | ||
| 1169 | state->timer_sio->adjust(attotime_zero, 0, ATTOTIME_IN_HZ((double)XTAL_16MHz/4/13/16)); | |
| 1170 | 1170 | } |
| 1171 | 1171 | |
| 1172 | 1172 |
| r8990 | r8991 | |
|---|---|---|
| 295 | 295 | -------------------------------------------------*/ |
| 296 | 296 | |
| 297 | 297 | //static ADDRESS_MAP_START( keyboard_mem, ADDRESS_SPACE_PROGRAM, 8 ) |
| 298 | // | |
| 298 | // AM_RANGE(0x000, 0x7ff) AM_ROM | |
| 299 | 299 | //ADDRESS_MAP_END |
| 300 | 300 | |
| 301 | 301 | /*------------------------------------------------- |
| r8990 | r8991 | |
|---|---|---|
| 54 | 54 | |
| 55 | 55 | TODO: |
| 56 | 56 | |
| 57 | ||
| 57 | - replace the 2nd Z80DART with Z80SIO when it is implemented properly | |
| 58 | 58 | - ABC 77 keyboard |
| 59 | 59 | - bit accurate Z80 SIO/2 (cassette) |
| 60 | 60 | - floppy controller board |
| r8990 | r8991 | |
| 93 | 93 | |
| 94 | 94 | /* Keyboard HACK */ |
| 95 | 95 | |
| 96 | enum | |
| 96 | enum | |
| 97 | 97 | { |
| 98 | 98 | CHANNEL_A = 0, |
| 99 | 99 | CHANNEL_B |
| r8990 | r8991 | |
| 937 | 937 | |
| 938 | 938 | static ABCBUS_DAISY( abcbus_daisy ) |
| 939 | 939 | { |
| 940 | // | |
| 940 | // { LUXOR_55_21046_ABCBUS("abc830") }, | |
| 941 | 941 | { NULL } |
| 942 | 942 | }; |
| 943 | 943 |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | Acorn Archimedes 7000/7000+ | |
| 4 | 4 | |
| 5 | 5 | preliminary driver by Angelo Salese, |
| 6 | 6 | based on work by Tomasz Slanina and Tom Walker |
| 7 | 7 | |
| 8 | ??? | |
| 9 | bp (0382827C) (second trigger) | |
| 10 | do R13 = SR13 | |
| 8 | ??? | |
| 9 | bp (0382827C) (second trigger) | |
| 10 | do R13 = SR13 | |
| 11 | 11 | |
| 12 | 12 | ****************************************************************************/ |
| 13 | 13 | |
| r8990 | r8991 | |
| 28 | 28 | |
| 29 | 29 | static const char *const vidc20_regnames[] = |
| 30 | 30 | { |
| 31 | "Video Palette", // 0 | |
| 32 | "Video Palette Address", // 1 | |
| 31 | "Video Palette", // 0 | |
| 32 | "Video Palette Address", // 1 | |
| 33 | 33 | "RESERVED", // 2 |
| 34 | "LCD offset", | |
| 34 | "LCD offset", | |
| 35 | 35 | "Border Colour", // 4 |
| 36 | "Cursor Palette Logical Colour 1", // 5 | |
| 37 | "Cursor Palette Logical Colour 2", // 6 | |
| 38 | "Cursor Palette Logical Colour 3", // 7 | |
| 36 | "Cursor Palette Logical Colour 1", // 5 | |
| 37 | "Cursor Palette Logical Colour 2", // 6 | |
| 38 | "Cursor Palette Logical Colour 3", // 7 | |
| 39 | 39 | "Horizontal", // 8 |
| 40 | 40 | "Vertical", // 9 |
| 41 | 41 | "Stereo Image", // A |
| r8990 | r8991 | |
| 49 | 49 | static const char *const vidc20_horz_regnames[] = |
| 50 | 50 | { |
| 51 | 51 | "Horizontal Cycle", // 0x80 HCR |
| 52 | "Horizontal Sync Width", // 0x81 HSWR | |
| 53 | "Horizontal Border Start", // 0x82 HBSR | |
| 54 | "Horizontal Display Start", // 0x83 HDSR | |
| 55 | "Horizontal Display End", // 0x84 HDER | |
| 56 | "Horizontal Border End", // 0x85 HBER | |
| 57 | "Horizontal Cursor Start", // 0x86 HCSR | |
| 52 | "Horizontal Sync Width", // 0x81 HSWR | |
| 53 | "Horizontal Border Start", // 0x82 HBSR | |
| 54 | "Horizontal Display Start", // 0x83 HDSR | |
| 55 | "Horizontal Display End", // 0x84 HDER | |
| 56 | "Horizontal Border End", // 0x85 HBER | |
| 57 | "Horizontal Cursor Start", // 0x86 HCSR | |
| 58 | 58 | "Horizontal Interlace", // 0x87 HIR |
| 59 | "Horizontal Counter TEST", // 0x88 | |
| 60 | "Horizontal <UNDEFINED>", // 0x89 | |
| 61 | "Horizontal <UNDEFINED>", // 0x8a | |
| 62 | "Horizontal <UNDEFINED>", // 0x8b | |
| 63 | "Horizontal All TEST", // 0x8c | |
| 64 | "Horizontal <UNDEFINED>", // 0x8d | |
| 65 | "Horizontal <UNDEFINED>", // 0x8e | |
| 66 | "Horizontal <UNDEFINED>" // 0x8f | |
| 59 | "Horizontal Counter TEST", // 0x88 | |
| 60 | "Horizontal <UNDEFINED>", // 0x89 | |
| 61 | "Horizontal <UNDEFINED>", // 0x8a | |
| 62 | "Horizontal <UNDEFINED>", // 0x8b | |
| 63 | "Horizontal All TEST", // 0x8c | |
| 64 | "Horizontal <UNDEFINED>", // 0x8d | |
| 65 | "Horizontal <UNDEFINED>", // 0x8e | |
| 66 | "Horizontal <UNDEFINED>" // 0x8f | |
| 67 | 67 | }; |
| 68 | 68 | |
| 69 | 69 | #define HCR 0 |
| r8990 | r8991 | |
| 77 | 77 | |
| 78 | 78 | static const char *const vidc20_vert_regnames[] = |
| 79 | 79 | { |
| 80 | "Vertical Cycle", // 0x90 VCR | |
| 81 | "Vertical Sync Width", // 0x91 VSWR | |
| 82 | "Vertical Border Start", // 0x92 VBSR | |
| 83 | "Vertical Display Start", // 0x93 VDSR | |
| 80 | "Vertical Cycle", // 0x90 VCR | |
| 81 | "Vertical Sync Width", // 0x91 VSWR | |
| 82 | "Vertical Border Start", // 0x92 VBSR | |
| 83 | "Vertical Display Start", // 0x93 VDSR | |
| 84 | 84 | "Vertical Display End", // 0x94 VDER |
| 85 | "Vertical Border End", // 0x95 VBER | |
| 86 | "Vertical Cursor Start", // 0x96 VCSR | |
| 87 | "Vertical Cursor End", // 0x97 VCER | |
| 88 | "Vertical Counter TEST", // 0x98 | |
| 89 | "Horizontal <UNDEFINED>", // 0x99 | |
| 90 | "Vertical Counter Increment TEST", // 0x9a | |
| 91 | "Horizontal <UNDEFINED>", // 0x9b | |
| 92 | "Vertical All TEST", // 0x9c | |
| 93 | "Horizontal <UNDEFINED>", // 0x9d | |
| 94 | "Horizontal <UNDEFINED>", // 0x9e | |
| 95 | "Horizontal <UNDEFINED>" // 0x9f | |
| 85 | "Vertical Border End", // 0x95 VBER | |
| 86 | "Vertical Cursor Start", // 0x96 VCSR | |
| 87 | "Vertical Cursor End", // 0x97 VCER | |
| 88 | "Vertical Counter TEST", // 0x98 | |
| 89 | "Horizontal <UNDEFINED>", // 0x99 | |
| 90 | "Vertical Counter Increment TEST", // 0x9a | |
| 91 | "Horizontal <UNDEFINED>", // 0x9b | |
| 92 | "Vertical All TEST", // 0x9c | |
| 93 | "Horizontal <UNDEFINED>", // 0x9d | |
| 94 | "Horizontal <UNDEFINED>", // 0x9e | |
| 95 | "Horizontal <UNDEFINED>" // 0x9f | |
| 96 | 96 | }; |
| 97 | 97 | |
| 98 | 98 | #define VCR 0 |
| r8990 | r8991 | |
| 108 | 108 | { |
| 109 | 109 | /* sanity checks - first pass */ |
| 110 | 110 | /* |
| 111 | total cycles + border start/end | |
| 112 | */ | |
| 111 | total cycles + border start/end | |
| 112 | */ | |
| 113 | 113 | if(vidc20_horz_reg[HCR] && vidc20_horz_reg[HBSR] && vidc20_horz_reg[HBER] && |
| 114 | 114 | vidc20_vert_reg[VCR] && vidc20_vert_reg[VBSR] && vidc20_vert_reg[VBER]) |
| 115 | 115 | { |
| 116 | 116 | /* sanity checks - second pass */ |
| 117 | 117 | /* |
| 118 | total cycles > border end > border start | |
| 119 | */ | |
| 118 | total cycles > border end > border start | |
| 119 | */ | |
| 120 | 120 | if((vidc20_horz_reg[HCR] > vidc20_horz_reg[HBER]) && |
| 121 | 121 | (vidc20_horz_reg[HBER] > vidc20_horz_reg[HBSR]) && |
| 122 | 122 | (vidc20_vert_reg[VCR] > vidc20_vert_reg[VBER]) && |
| r8990 | r8991 | |
| 262 | 262 | if(x_size <= 0 || y_size <= 0) |
| 263 | 263 | return 0; |
| 264 | 264 | |
| 265 | // | |
| 265 | // popmessage("%d",vidc20_bpp_mode); | |
| 266 | 266 | |
| 267 | 267 | count = 0; |
| 268 | 268 | |
| r8990 | r8991 | |
| 513 | 513 | "<RESERVED>" // 0x1fc |
| 514 | 514 | }; |
| 515 | 515 | |
| 516 | #define IOMD_IOCR | |
| 516 | #define IOMD_IOCR | |
| 517 | 517 | #define IOMD_KBDDAT 0x004/4 |
| 518 | 518 | #define IOMD_KBDCR 0x008/4 |
| 519 | 519 | |
| r8990 | r8991 | |
| 531 | 531 | #define IOMD_T1GO 0x058/4 |
| 532 | 532 | #define IOMD_T1LATCH 0x05c/4 |
| 533 | 533 | |
| 534 | #define IOMD_ID0 0x094/4 | |
| 535 | #define IOMD_ID1 0x098/4 | |
| 534 | #define IOMD_ID0 0x094/4 | |
| 535 | #define IOMD_ID1 0x098/4 | |
| 536 | 536 | #define IOMD_VERSION 0x09c/4 |
| 537 | 537 | |
| 538 | 538 | #define IOMD_VIDCUR 0x1d0/4 |
| r8990 | r8991 | |
| 610 | 610 | |
| 611 | 611 | static READ32_HANDLER( a7000_iomd_r ) |
| 612 | 612 | { |
| 613 | // if(offset != IOMD_KBDCR) | |
| 614 | // logerror("IOMD: %s Register (%04x) read\n",iomd_regnames[offset & (0x1ff >> 2)],offset*4); | |
| 613 | // if(offset != IOMD_KBDCR) | |
| 614 | // logerror("IOMD: %s Register (%04x) read\n",iomd_regnames[offset & (0x1ff >> 2)],offset*4); | |
| 615 | 615 | |
| 616 | 616 | |
| 617 | 617 | switch(offset) |
| r8990 | r8991 | |
| 626 | 626 | |
| 627 | 627 | return IOMD_IO_ctrl | 0x34 | flyback; |
| 628 | 628 | } |
| 629 | case IOMD_KBDCR: | |
| 629 | case IOMD_KBDCR: | |
| 630 | 630 | |
| 631 | 631 | /* |
| 632 | 1--- ---- always high | |
| 633 | -x-- ---- Timer 1 | |
| 634 | --x- ---- Timer 0 | |
| 635 | ---x ---- Power On Reset | |
| 636 | ---- x--- Flyback | |
| 637 | ---- -x-- nINT1 | |
| 638 | ---- --0- always low | |
| 639 | ---- ---x INT2 | |
| 640 | */ | |
| 632 | 1--- ---- always high | |
| 633 | -x-- ---- Timer 1 | |
| 634 | --x- ---- Timer 0 | |
| 635 | ---x ---- Power On Reset | |
| 636 | ---- x--- Flyback | |
| 637 | ---- -x-- nINT1 | |
| 638 | ---- --0- always low | |
| 639 | ---- ---x INT2 | |
| 640 | */ | |
| 641 | 641 | case IOMD_IRQSTA: return (IRQ_status_A & ~2) | 0x80; |
| 642 | 642 | case IOMD_IRQRQA: return (IRQ_status_A & IRQ_mask_A) | 0x80; |
| 643 | 643 | case IOMD_IRQMSKA: return (IRQ_mask_A); |
| r8990 | r8991 | |
| 648 | 648 | case IOMD_T1LOW: return timer_out[1] & 0xff; |
| 649 | 649 | case IOMD_T1HIGH: return (timer_out[1] >> 8) & 0xff; |
| 650 | 650 | |
| 651 | case IOMD_ID0: return io_id & 0xff; // IOMD ID low | |
| 652 | case IOMD_ID1: return (io_id >> 8) & 0xff; // IOMD ID high | |
| 651 | case IOMD_ID0: return io_id & 0xff; // IOMD ID low | |
| 652 | case IOMD_ID1: return (io_id >> 8) & 0xff; // IOMD ID high | |
| 653 | 653 | case IOMD_VERSION: return 0; |
| 654 | 654 | |
| 655 | case IOMD_VIDEND: | |
| 655 | case IOMD_VIDEND: | |
| 656 | 656 | case IOMD_VIDSTART: return (viddma_addr_start & 0x1ffffff8); //bits 31, 30, 29 undefined |
| 657 | 657 | case IOMD_VIDCR: return (viddma_status & 0xa0) | 0x50; //bit 6 = DRAM mode, bit 4 = QWORD transfer |
| 658 | 658 | |
| 659 | default: | |
| 659 | default: | |
| 660 | 660 | } |
| 661 | 661 | |
| 662 | 662 | return 0; |
| r8990 | r8991 | |
| 664 | 664 | |
| 665 | 665 | static WRITE32_HANDLER( a7000_iomd_w ) |
| 666 | 666 | { |
| 667 | // | |
| 667 | // logerror("IOMD: %s Register (%04x) write = %08x\n",iomd_regnames[offset & (0x1ff >> 2)],offset*4,data); | |
| 668 | 668 | |
| 669 | 669 | switch(offset) |
| 670 | 670 | { |
| r8990 | r8991 | |
| 678 | 678 | case IOMD_IRQRQA: IRQ_status_A &= ~data; break; |
| 679 | 679 | case IOMD_IRQMSKA: IRQ_mask_A = (data & ~2) | 0x80; break; |
| 680 | 680 | |
| 681 | case IOMD_T0LOW: timer_in[0] = (timer_in[0] & 0xff00) | (data & 0xff); break; | |
| 682 | case IOMD_T0HIGH: timer_in[0] = (timer_in[0] & 0x00ff) | ((data & 0xff) << 8); break; | |
| 681 | case IOMD_T0LOW: timer_in[0] = (timer_in[0] & 0xff00) | (data & 0xff); break; | |
| 682 | case IOMD_T0HIGH: timer_in[0] = (timer_in[0] & 0x00ff) | ((data & 0xff) << 8); break; | |
| 683 | 683 | case IOMD_T0GO: |
| 684 | 684 | timer_counter[0] = timer_in[0]; |
| 685 | 685 | fire_iomd_timer(0,timer_counter[0]); |
| r8990 | r8991 | |
| 698 | 698 | } |
| 699 | 699 | break; |
| 700 | 700 | |
| 701 | case IOMD_T1LOW: timer_in[1] = (timer_in[1] & 0xff00) | (data & 0xff); break; | |
| 702 | case IOMD_T1HIGH: timer_in[1] = (timer_in[1] & 0x00ff) | ((data & 0xff) << 8); break; | |
| 701 | case IOMD_T1LOW: timer_in[1] = (timer_in[1] & 0xff00) | (data & 0xff); break; | |
| 702 | case IOMD_T1HIGH: timer_in[1] = (timer_in[1] & 0x00ff) | ((data & 0xff) << 8); break; | |
| 703 | 703 | case IOMD_T1GO: |
| 704 | 704 | timer_counter[1] = timer_in[1]; |
| 705 | 705 | fire_iomd_timer(1,timer_counter[1]); |
| r8990 | r8991 | |
| 718 | 718 | } |
| 719 | 719 | break; |
| 720 | 720 | |
| 721 | case IOMD_VIDEND: | |
| 721 | case IOMD_VIDEND: | |
| 722 | 722 | case IOMD_VIDSTART: viddma_addr_start = data & 0x1ffffff8; //bits 31, 30, 29 unused |
| 723 | 723 | case IOMD_VIDCR: |
| 724 | 724 | viddma_status = data & 0xa0; if(data & 0x20) { viddma_transfer_start(space); } |
| r8990 | r8991 | |
| 731 | 731 | |
| 732 | 732 | static ADDRESS_MAP_START( a7000_mem, ADDRESS_SPACE_PROGRAM, 32) |
| 733 | 733 | AM_RANGE(0x00000000, 0x003fffff) AM_MIRROR(0x00800000) AM_ROM AM_REGION("user1", 0x0) |
| 734 | // AM_RANGE(0x01000000, 0x01ffffff) AM_NOP //expansion ROM | |
| 735 | // AM_RANGE(0x02000000, 0x02ffffff) AM_RAM //VRAM | |
| 736 | // I/O 03000000 - 033fffff | |
| 737 | // AM_RANGE(0x03010000, 0x03011fff) //Super IO | |
| 738 | // AM_RANGE(0x03012000, 0x03029fff) //FDC | |
| 739 | // AM_RANGE(0x0302b000, 0x0302bfff) //Network podule | |
| 740 | // AM_RANGE(0x03040000, 0x0304ffff) //podule space 0,1,2,3 | |
| 741 | // AM_RANGE(0x03070000, 0x0307ffff) //podule space 4,5,6,7 | |
| 734 | // AM_RANGE(0x01000000, 0x01ffffff) AM_NOP //expansion ROM | |
| 735 | // AM_RANGE(0x02000000, 0x02ffffff) AM_RAM //VRAM | |
| 736 | // I/O 03000000 - 033fffff | |
| 737 | // AM_RANGE(0x03010000, 0x03011fff) //Super IO | |
| 738 | // AM_RANGE(0x03012000, 0x03029fff) //FDC | |
| 739 | // AM_RANGE(0x0302b000, 0x0302bfff) //Network podule | |
| 740 | // AM_RANGE(0x03040000, 0x0304ffff) //podule space 0,1,2,3 | |
| 741 | // AM_RANGE(0x03070000, 0x0307ffff) //podule space 4,5,6,7 | |
| 742 | 742 | AM_RANGE(0x03200000, 0x032001ff) AM_READWRITE(a7000_iomd_r,a7000_iomd_w) //IOMD Registers //mirrored at 0x03000000-0x1ff? |
| 743 | // | |
| 743 | // AM_RANGE(0x03310000, 0x03310003) //Mouse Buttons | |
| 744 | 744 | |
| 745 | 745 | AM_RANGE(0x03400000, 0x037fffff) AM_WRITE(a7000_vidc20_w) |
| 746 | // | |
| 746 | // AM_RANGE(0x08000000, 0x08ffffff) AM_MIRROR(0x07000000) //EASI space | |
| 747 | 747 | AM_RANGE(0x10000000, 0x13ffffff) AM_RAM //SIMM 0 bank 0 |
| 748 | 748 | AM_RANGE(0x14000000, 0x17ffffff) AM_RAM //SIMM 0 bank 1 |
| 749 | // AM_RANGE(0x18000000, 0x18ffffff) AM_MIRROR(0x03000000) AM_RAM //SIMM 1 bank 0 | |
| 750 | // AM_RANGE(0x1c000000, 0x1cffffff) AM_MIRROR(0x03000000) AM_RAM //SIMM 1 bank 1 | |
| 749 | // AM_RANGE(0x18000000, 0x18ffffff) AM_MIRROR(0x03000000) AM_RAM //SIMM 1 bank 0 | |
| 750 | // AM_RANGE(0x1c000000, 0x1cffffff) AM_MIRROR(0x03000000) AM_RAM //SIMM 1 bank 1 | |
| 751 | 751 | ADDRESS_MAP_END |
| 752 | 752 | |
| 753 | 753 | |
| r8990 | r8991 | |
| 767 | 767 | static MACHINE_RESET(a7000) |
| 768 | 768 | { |
| 769 | 769 | IOMD_IO_ctrl = 0x0b | 0x34; //bit 0,1 and 3 set high on reset plus 2,4,5 always high |
| 770 | // | |
| 770 | // IRQ_status_A = 0x10; // set POR bit ON | |
| 771 | 771 | IRQ_mask_A = 0x00; |
| 772 | 772 | |
| 773 | 773 | IOMD_keyb_ctrl = 0x00; |
| r8990 | r8991 | |
|---|---|---|
| 9 | 9 | |
| 10 | 10 | TODO: |
| 11 | 11 | |
| 12 | ||
| 12 | CreatiVision | |
| 13 | 13 | |
| 14 | 14 | - fix Diagnostic A (video) sprites generator test |
| 15 | 15 | - proper keyboard emulation, need keyboard schematics |
| r8990 | r8991 | |
| 22 | 22 | * Titanic Frogger Demo 1.0 |
| 23 | 23 | * Titanic Frogger Demo 1.1 |
| 24 | 24 | |
| 25 | ||
| 25 | Salora Manager | |
| 26 | 26 | |
| 27 | - keyboard Ctrl+I/J/N don't print out BASIC commands | |
| 28 | - RAM mapping | |
| 29 | - cassette (figure out correct input level) | |
| 30 | - floppy (interface cartridge needed) | |
| 27 | - keyboard Ctrl+I/J/N don't print out BASIC commands | |
| 28 | - RAM mapping | |
| 29 | - cassette (figure out correct input level) | |
| 30 | - floppy (interface cartridge needed) | |
| 31 | 31 | |
| 32 | 32 | */ |
| 33 | 33 | |
| r8990 | r8991 | |
| 86 | 86 | CN3 - printer connector (7x2 PCB edge male) |
| 87 | 87 | CN4 - expansion connector (30x2 PCB edge male) |
| 88 | 88 | CN5 - cartridge connector (18x2 PCB edge female) |
| 89 | CN6 | |
| 89 | CN6 - keyboard connector (16x1 pin header) | |
| 90 | 90 | |
| 91 | 91 | |
| 92 | 92 | Sub board |
| r8990 | r8991 | |
| 393 | 393 | |
| 394 | 394 | static INPUT_PORTS_START( manager ) |
| 395 | 395 | PORT_START("ROW0") |
| 396 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 397 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 396 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 397 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 398 | 398 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_STOP) PORT_CHAR('.') PORT_CHAR('>') |
| 399 | 399 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("RETURN") PORT_CODE(KEYCODE_ENTER) PORT_CHAR('\r') |
| 400 | 400 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_3) PORT_CHAR('3') PORT_CHAR('-') |
| r8990 | r8991 | |
| 403 | 403 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_X) PORT_CHAR('X') PORT_CHAR('x') |
| 404 | 404 | |
| 405 | 405 | PORT_START("ROW1") |
| 406 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 407 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 406 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 407 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 408 | 408 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xC3\x84 \xC3\xA4") PORT_CODE(KEYCODE_QUOTE) PORT_CHAR(0x00C4) PORT_CHAR(0x00E4) |
| 409 | 409 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_EQUALS) PORT_CHAR(';') PORT_CHAR('+') |
| 410 | 410 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_2) PORT_CHAR('2') PORT_CHAR('"') |
| r8990 | r8991 | |
| 414 | 414 | |
| 415 | 415 | PORT_START("ROW2") |
| 416 | 416 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i') |
| 417 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 417 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 418 | 418 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_SLASH) PORT_CHAR('/') PORT_CHAR('?') |
| 419 | 419 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("\xC3\x85 \xC3\xA5") PORT_CODE(KEYCODE_BACKSLASH) PORT_CHAR(0x00C5) PORT_CHAR(0x00E5) |
| 420 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') | |
| 420 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_1) PORT_CHAR('1') PORT_CHAR('!') | |
| 421 | 421 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_Q) PORT_CHAR('Q') PORT_CHAR('q') |
| 422 | 422 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("CTRL") PORT_CODE(KEYCODE_LCONTROL) PORT_CHAR(UCHAR_MAMEKEY(LCONTROL)) |
| 423 | 423 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("SHIFT") PORT_CODE(KEYCODE_LSHIFT) PORT_CODE(KEYCODE_RSHIFT) PORT_CHAR(UCHAR_SHIFT_1) |
| r8990 | r8991 | |
| 433 | 433 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_C) PORT_CHAR('C') PORT_CHAR('c') |
| 434 | 434 | |
| 435 | 435 | PORT_START("ROW4") |
| 436 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 437 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 436 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 437 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 438 | 438 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_COMMA) PORT_CHAR(',') PORT_CHAR('<') |
| 439 | 439 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_P) PORT_CHAR('P') PORT_CHAR('p') |
| 440 | 440 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_5) PORT_CHAR('5') PORT_CHAR('%') |
| r8990 | r8991 | |
| 444 | 444 | |
| 445 | 445 | PORT_START("ROW5") |
| 446 | 446 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') |
| 447 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 447 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 448 | 448 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_L) PORT_CHAR('L') PORT_CHAR('l') |
| 449 | 449 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_0) PORT_CHAR('0') PORT_CHAR('=') |
| 450 | 450 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_6) PORT_CHAR('6') PORT_CHAR('&') |
| r8990 | r8991 | |
| 453 | 453 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_B) PORT_CHAR('B') PORT_CHAR('b') |
| 454 | 454 | |
| 455 | 455 | PORT_START("ROW6") |
| 456 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 456 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) | |
| 457 | 457 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_S) PORT_CHAR('S') PORT_CHAR('s') |
| 458 | 458 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_K) PORT_CHAR('K') PORT_CHAR('k') |
| 459 | 459 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_9) PORT_CHAR('9') PORT_CHAR(')') |
| r8990 | r8991 | |
| 471 | 471 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_I) PORT_CHAR('I') PORT_CHAR('i') |
| 472 | 472 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_J) PORT_CHAR('J') PORT_CHAR('j') |
| 473 | 473 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_CODE(KEYCODE_M) PORT_CHAR('M') PORT_CHAR('m') |
| 474 | ||
| 474 | ||
| 475 | 475 | PORT_START("JOY0") |
| 476 | 476 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 477 | 477 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN ) |
| r8990 | r8991 | |
| 761 | 761 | |
| 762 | 762 | /* keyboard latch */ |
| 763 | 763 | state->keylatch = data; |
| 764 | ||
| 764 | ||
| 765 | 765 | /* centronics data */ |
| 766 | 766 | centronics_data_w(device, 0, data); |
| 767 | 767 | } |
| r8990 | r8991 | |
| 779 | 779 | static READ_LINE_DEVICE_HANDLER( lasr2001_pia_cb1_r ) |
| 780 | 780 | { |
| 781 | 781 | crvision_state *state = device->machine->driver_data<crvision_state>(); |
| 782 | ||
| 782 | ||
| 783 | 783 | /* actually this is a diode-AND (READY & _BUSY), but ctronics.c returns busy status if printer image is not mounted -> Manager won't boot */ |
| 784 | 784 | return sn76496_ready_r(state->psg) & (centronics_not_busy_r(state->centronics) | pia6821_get_output_ca2_z(device)); |
| 785 | 785 | } |
| r8990 | r8991 | |
| 1207 | 1207 | CONS( 1983, vz2000, crvision, 0, pal, crvision, 0, "Dick Smith Electronics", "VZ 2000 (Oceania)", 0 ) |
| 1208 | 1208 | CONS( 1983, crvisio2, crvision, 0, pal, crvision, 0, "Video Technology", "CreatiVision MK-II (Europe)", 0 ) |
| 1209 | 1209 | /* |
| 1210 | COMP( 1983, lasr2001, 0, 0, lasr2001, lasr2001, 0, "Video Technology", "Laser 2001", GAME_NOT_WORKING ) | |
| 1211 | COMP( 1983, vz2001, lasr2001, 0, lasr2001, lasr2001, 0, "Dick Smith Electronics", "VZ 2001 (Oceania)", GAME_NOT_WORKING ) | |
| 1210 | COMP( 1983, lasr2001, 0, 0, lasr2001, lasr2001, 0, "Video Technology", "Laser 2001", GAME_NOT_WORKING ) | |
| 1211 | COMP( 1983, vz2001, lasr2001, 0, lasr2001, lasr2001, 0, "Dick Smith Electronics", "VZ 2001 (Oceania)", GAME_NOT_WORKING ) | |
| 1212 | 1212 | */ |
| 1213 | 1213 | COMP( 1983, manager, 0, 0, lasr2001, manager, 0, "Salora", "Manager (Finland)", 0 ) |
| r8990 | r8991 | |
|---|---|---|
| 272 | 272 | switch(offset) |
| 273 | 273 | { |
| 274 | 274 | case 0x00: // bit 7 = NMI vector protect, bit 6 = power off, bit 0 = software reset, bit 3 = A20 line? |
| 275 | // | |
| 275 | // cputag_set_input_line(space->machine,"maincpu",INPUT_LINE_A20,(data & 0x08) ? CLEAR_LINE : ASSERT_LINE); | |
| 276 | 276 | logerror("SYS: port 0x20 write %02x\n",data); |
| 277 | 277 | break; |
| 278 | 278 | case 0x02: |
| r8990 | r8991 | |
|---|---|---|
| 4 | 4 | |
| 5 | 5 | driver by Angelo Salese |
| 6 | 6 | |
| 7 | TODO: | |
| 8 | - Kanji text is cutted in half when font_size is 1 / interlace is disabled, different data used? (check Back to the Future); | |
| 9 | - Find real CRTC registers | |
| 10 | - Some games doesn't set proper registers if you have interlace enabled, is there any real reason? | |
| 11 | - Implement external ROM hook-up; | |
| 12 | - FDC loading without the IPLPRO doesn't work at all, why? | |
| 13 | - reverse / blanking tvram attributes; | |
| 14 | - clean-ups! ^^' | |
| 7 | TODO: | |
| 8 | - Kanji text is cutted in half when font_size is 1 / interlace is disabled, different data used? (check Back to the Future); | |
| 9 | - Find real CRTC registers | |
| 10 | - Some games doesn't set proper registers if you have interlace enabled, is there any real reason? | |
| 11 | - Implement external ROM hook-up; | |
| 12 | - FDC loading without the IPLPRO doesn't work at all, why? | |
| 13 | - reverse / blanking tvram attributes; | |
| 14 | - clean-ups! ^^' | |
| 15 | 15 | |
| 16 | 16 | per-game/program specific TODO: |
| 17 | - Basic: vertical scrolling returns wrap-around that shouldn't wrap; | |
| 18 | - Basic: loading has an alignment bug with the bitmap | |
| 19 | - LayDock: hangs by reading the FDC status and expecting it to become 0x81; | |
| 20 | - Mappy: TVRAM layer is double x sized than it should be; | |
| 21 | - Marchen Veil I: dies with garbage on screen; | |
| 22 | - Moon Child: needs mixed 3+3bpp tvram supported; | |
| 23 | - Moon Child: appears to be a network / system link game, obviously doesn't work with current MAME / MESS framework; | |
| 24 | - Mugen no Shinzou: returns an HW error if you attempt to start a play; | |
| 25 | - Mugen no Shinzou II - The Prince of Darkness: dies on IPLPRO loading, presumably a wd17xx core bug; | |
| 26 | - Multiplan: random hangs/crashes after you set the RTC, sometimes it loads properly; | |
| 27 | - Murder Club: has lots of CG artifacts; | |
| 28 | - Penguin Kun Wars: has a bug with window effects ("Push space or trigger" msg on the bottom"), needs investigation; | |
| 29 | - Relics: doesn't boot, sets fdc register 0xdc bit 2 to 1 | |
| 30 | - Sound Gal Music Editor: dies with bad code, another wd17xx core bug; | |
| 31 | - Telephone Soft: shows garbage with the CG layer; | |
| 32 | - The Tower of Druaga: has a small priority/layer clearance bug at the digital / analog screen select; | |
| 33 | - Xevious: has issues with the window effects, it should actually be applied on TV layer and not CG. | |
| 34 | - Ys 3: has garbage on top / bottom (note: you have to load both disks at start-up otherwise it refuses to run) | |
| 35 | - Yukar K2 (normal version): moans about something, DFJustin: "please put the system disk back to normal", disk write-protected? | |
| 17 | - Basic: vertical scrolling returns wrap-around that shouldn't wrap; | |
| 18 | - Basic: loading has an alignment bug with the bitmap | |
| 19 | - LayDock: hangs by reading the FDC status and expecting it to become 0x81; | |
| 20 | - Mappy: TVRAM layer is double x sized than it should be; | |
| 21 | - Marchen Veil I: dies with garbage on screen; | |
| 22 | - Moon Child: needs mixed 3+3bpp tvram supported; | |
| 23 | - Moon Child: appears to be a network / system link game, obviously doesn't work with current MAME / MESS framework; | |
| 24 | - Mugen no Shinzou: returns an HW error if you attempt to start a play; | |
| 25 | - Mugen no Shinzou II - The Prince of Darkness: dies on IPLPRO loading, presumably a wd17xx core bug; | |
| 26 | - Multiplan: random hangs/crashes after you set the RTC, sometimes it loads properly; | |
| 27 | - Murder Club: has lots of CG artifacts; | |
| 28 | - Penguin Kun Wars: has a bug with window effects ("Push space or trigger" msg on the bottom"), needs investigation; | |
| 29 | - Relics: doesn't boot, sets fdc register 0xdc bit 2 to 1 | |
| 30 | - Sound Gal Music Editor: dies with bad code, another wd17xx core bug; | |
| 31 | - Telephone Soft: shows garbage with the CG layer; | |
| 32 | - The Tower of Druaga: has a small priority/layer clearance bug at the digital / analog screen select; | |
| 33 | - Xevious: has issues with the window effects, it should actually be applied on TV layer and not CG. | |
| 34 | - Ys 3: has garbage on top / bottom (note: you have to load both disks at start-up otherwise it refuses to run) | |
| 35 | - Yukar K2 (normal version): moans about something, DFJustin: "please put the system disk back to normal", disk write-protected? | |
| 36 | 36 | |
| 37 | 37 | memory map: |
| 38 | 38 | 0x00000-0x3ffff Work RAM |
| r8990 | r8991 | |
| 285 | 285 | |
| 286 | 286 | base_addr = text_reg[1] | ((text_reg[2] & 0x7) << 8); |
| 287 | 287 | |
| 288 | // | |
| 288 | // popmessage("%02x",text_reg[9]); | |
| 289 | 289 | |
| 290 | 290 | if(text_col_size) |
| 291 | 291 | draw_80x25(machine,bitmap,cliprect,base_addr); |
| r8990 | r8991 | |
| 297 | 297 | |
| 298 | 298 | switch(tv_mode & 3) |
| 299 | 299 | { |
| 300 | // | |
| 300 | // case 0: mixed 6bpp mode | |
| 301 | 301 | case 1: |
| 302 | 302 | draw_40x25(machine,bitmap,cliprect,0,base_addr); |
| 303 | 303 | break; |
| r8990 | r8991 | |
| 334 | 334 | |
| 335 | 335 | /* check window boundaries */ |
| 336 | 336 | //if(res_x < cg_hs || res_x >= cg_he || res_y < cg_vs || res_y >= cg_ve) |
| 337 | // | |
| 337 | // continue; | |
| 338 | 338 | |
| 339 | 339 | /* TODO: very preliminary, just Yukar K2 uses this so far*/ |
| 340 | 340 | pen_bit[0] = (vram[count + 0x00000]>>(xi)) & 1 ? 7 : 0; // B |
| r8990 | r8991 | |
| 515 | 515 | draw_cg_screen(screen->machine,bitmap,cliprect,0); |
| 516 | 516 | draw_tv_screen(screen->machine,bitmap,cliprect); |
| 517 | 517 | draw_cg_screen(screen->machine,bitmap,cliprect,1); |
| 518 | // | |
| 518 | // popmessage("%02x (%02x %02x) (%02x %02x) (%02x %02x) (%02x %02x)",cg_reg[0x0f],cg_reg[0x10],cg_reg[0x11],cg_reg[0x12],cg_reg[0x13],cg_reg[0x14],cg_reg[0x15],cg_reg[0x16],cg_reg[0x17]); | |
| 519 | 519 | |
| 520 | 520 | return 0; |
| 521 | 521 | } |
| r8990 | r8991 | |
| 615 | 615 | UINT8 *ram = memory_region(machine, "maincpu"); |
| 616 | 616 | UINT8 cur_bank = bank_val[bank_num]; |
| 617 | 617 | |
| 618 | // if(cur_bank >= 0x30 && cur_bank <= 0x33) | |
| 619 | // printf("CG REG = %02x %02x %02x %02x | offset = %04x | data = %02x\n",cg_reg[0],cg_reg[1],cg_reg[2],cg_reg[3],offset,data); | |
| 618 | // if(cur_bank >= 0x30 && cur_bank <= 0x33) | |
| 619 | // printf("CG REG = %02x %02x %02x %02x | offset = %04x | data = %02x\n",cg_reg[0],cg_reg[1],cg_reg[2],cg_reg[3],offset,data); | |
| 620 | 620 | |
| 621 | 621 | switch(cur_bank) |
| 622 | 622 | { |
| r8990 | r8991 | |
| 756 | 756 | |
| 757 | 757 | static WRITE8_HANDLER( mz2500_bank_addr_w ) |
| 758 | 758 | { |
| 759 | // | |
| 759 | // printf("%02x\n",data); | |
| 760 | 760 | bank_addr = data & 7; |
| 761 | 761 | } |
| 762 | 762 | |
| r8990 | r8991 | |
| 897 | 897 | if(text_reg_index >= 0x80 && text_reg_index <= 0x8f) //Bitmap 16 clut registers |
| 898 | 898 | { |
| 899 | 899 | /* |
| 900 | ---x ---- priority | |
| 901 | ---- xxxx clut number | |
| 902 | */ | |
| 900 | ---x ---- priority | |
| 901 | ---- xxxx clut number | |
| 902 | */ | |
| 903 | 903 | clut16[text_reg_index & 0xf] = data & 0x1f; |
| 904 | 904 | //printf("%02x -> [%02x]\n",text_reg[text_reg_index],text_reg_index); |
| 905 | 905 | |
| r8990 | r8991 | |
| 947 | 947 | if(irq_sel & 0x10) |
| 948 | 948 | irq_vector[3] = data; //RP5c15 |
| 949 | 949 | |
| 950 | // | |
| 950 | // popmessage("%02x %02x %02x %02x",irq_vector[0],irq_vector[1],irq_vector[2],irq_vector[3]); | |
| 951 | 951 | } |
| 952 | 952 | |
| 953 | 953 | static WRITE8_HANDLER( mz2500_fdc_w ) |
| r8990 | r8991 | |
| 1761 | 1761 | static WRITE8_DEVICE_HANDLER( opn_porta_w ) |
| 1762 | 1762 | { |
| 1763 | 1763 | /* |
| 1764 | ---- x--- mouse select | |
| 1765 | ---- -x-- palette bit (16/4096 colors) | |
| 1766 | ---- --x- floppy reverse bit (controls wd17xx bits in command registers) | |
| 1767 | */ | |
| 1764 | ---- x--- mouse select | |
| 1765 | ---- -x-- palette bit (16/4096 colors) | |
| 1766 | ---- --x- floppy reverse bit (controls wd17xx bits in command registers) | |
| 1767 | */ | |
| 1768 | 1768 | |
| 1769 | 1769 | fdc_reverse = (data & 2) ? 0x00 : 0xff; |
| 1770 | 1770 | pal_select = (data & 4) ? 1 : 0; |
| r8990 | r8991 | |
| 1831 | 1831 | static void mz2500_rtc_alarm_irq(int state) |
| 1832 | 1832 | { |
| 1833 | 1833 | /* TODO: doesn't work yet */ |
| 1834 | // if(irq_mask[3] && state & 1) | |
| 1835 | // cputag_set_input_line_and_vector(device, "maincpu", 0, HOLD_LINE,irq_vector[3]); | |
| 1834 | // if(irq_mask[3] && state & 1) | |
| 1835 | // cputag_set_input_line_and_vector(device, "maincpu", 0, HOLD_LINE,irq_vector[3]); | |
| 1836 | 1836 | } |
| 1837 | 1837 | |
| 1838 | 1838 | static const struct rp5c15_interface rtc_intf = |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | TK-80BS (c) 1980 NEC | |
| 4 | 4 | |
| 5 | ||
| 5 | preliminary driver by Angelo Salese | |
| 6 | 6 | |
| 7 | TODO: | |
| 8 | - (try to) dump proper roms, the whole driver is based off fake roms; | |
| 9 | - Remove the PPI hack; | |
| 10 | - BASIC doesn't seem to work properly; | |
| 7 | TODO: | |
| 8 | - (try to) dump proper roms, the whole driver is based off fake roms; | |
| 9 | - Remove the PPI hack; | |
| 10 | - BASIC doesn't seem to work properly; | |
| 11 | 11 | |
| 12 | 12 | ****************************************************************************/ |
| 13 | 13 | |
| r8990 | r8991 | |
| 76 | 76 | /* FIXME: current i8255 core doesn't seem to like this system at all, so we use custom code here for now */ |
| 77 | 77 | static READ8_HANDLER( ppi_custom_r ) |
| 78 | 78 | { |
| 79 | // | |
| 79 | // printf("%02x\n",offset); | |
| 80 | 80 | |
| 81 | 81 | switch(offset+0x7dfc) |
| 82 | 82 | { |
| r8990 | r8991 | |
| 101 | 101 | static ADDRESS_MAP_START(tk80bs_mem, ADDRESS_SPACE_PROGRAM, 8) |
| 102 | 102 | ADDRESS_MAP_UNMAP_HIGH |
| 103 | 103 | AM_RANGE(0x0000, 0x07ff) AM_ROM |
| 104 | // | |
| 104 | // AM_RANGE(0x0c00, 0x7bff) AM_ROM // ext | |
| 105 | 105 | AM_RANGE(0x7df8, 0x7df9) AM_NOP // i8251 sio |
| 106 | // | |
| 106 | // AM_RANGE(0x7dfc, 0x7dff) AM_DEVREADWRITE("ppi8255_0", i8255a_r, i8255a_w) | |
| 107 | 107 | AM_RANGE(0x7dfc, 0x7dff) AM_READWRITE(ppi_custom_r,ppi_custom_w) |
| 108 | 108 | AM_RANGE(0x7e00, 0x7fff) AM_RAM AM_BASE(&vram) // video ram |
| 109 | 109 | AM_RANGE(0x8000, 0xcfff) AM_RAM // RAM |
| r8990 | r8991 | |
| 248 | 248 | if(!shift_press_flag) // shift not pressed |
| 249 | 249 | { |
| 250 | 250 | //if(scancode >= 0x41 && scancode < 0x5b) |
| 251 | // | |
| 251 | // scancode += 0x20; // lowercase doesn't exist here | |
| 252 | 252 | } |
| 253 | 253 | else |
| 254 | 254 | { |
| r8990 | r8991 | |
| 335 | 335 | /* basic machine hardware */ |
| 336 | 336 | MDRV_CPU_ADD("maincpu",I8080, XTAL_1MHz) |
| 337 | 337 | MDRV_CPU_PROGRAM_MAP(tk80_mem) |
| 338 | MDRV_CPU_IO_MAP(tk80_io) | |
| 338 | MDRV_CPU_IO_MAP(tk80_io) | |
| 339 | 339 | |
| 340 | 340 | MDRV_MACHINE_RESET(tk80) |
| 341 | ||
| 341 | ||
| 342 | 342 | /* video hardware */ |
| 343 | 343 | MDRV_SCREEN_ADD("screen", RASTER) |
| 344 | 344 | MDRV_SCREEN_REFRESH_RATE(50) |
| r8990 | r8991 | |
| 358 | 358 | MDRV_CPU_ADD("maincpu",I8080, XTAL_1MHz) //unknown clock |
| 359 | 359 | MDRV_CPU_PROGRAM_MAP(tk80bs_mem) |
| 360 | 360 | |
| 361 | // | |
| 361 | // MDRV_I8255A_ADD( "ppi8255_0", ppi8255_intf_0 ) | |
| 362 | 362 | |
| 363 | 363 | MDRV_MACHINE_START(tk80bs) |
| 364 | 364 | MDRV_MACHINE_RESET(tk80bs) |
| r8990 | r8991 | |
| 414 | 414 | /* Driver */ |
| 415 | 415 | |
| 416 | 416 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 417 | COMP( 1976, tk80, | |
| 417 | COMP( 1976, tk80, | |
| 418 | 418 | COMP( 1980, tk80bs, tk80, 0, tk80bs, tk80bs, 0, "Nippon Electronic Company", "TK-80BS", GAME_NOT_WORKING | GAME_NO_SOUND) |
| 419 | 419 |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | Multi 8 (c) 1983 Mitsubishi | |
| 4 | 4 | |
| 5 | ||
| 5 | preliminary driver by Angelo Salese | |
| 6 | 6 | |
| 7 | TODO: | |
| 8 | - dunno how to trigger the text color mode in BASIC, I just modify | |
| 9 | $f0b1 to 1 for now | |
| 10 | - bitmap B/W mode is untested | |
| 7 | TODO: | |
| 8 | - dunno how to trigger the text color mode in BASIC, I just modify | |
| 9 | $f0b1 to 1 for now | |
| 10 | - bitmap B/W mode is untested | |
| 11 | 11 | |
| 12 | 12 | ****************************************************************************/ |
| 13 | 13 | |
| r8990 | r8991 | |
| 30 | 30 | cursor_addr = cursor_raster = 0; |
| 31 | 31 | for (bw_mode = 0; bw_mode < 8; bw_mode++) pen_clut[bw_mode]=0; |
| 32 | 32 | vram_bank = 8; |
| 33 | bw_mode = 0; | |
| 33 | bw_mode = 0; | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | 36 | static VIDEO_UPDATE( multi8 ) |
| r8990 | r8991 | |
| 168 | 168 | |
| 169 | 169 | static READ8_HANDLER( key_status_r ) |
| 170 | 170 | { |
| 171 | if(mcu_init == 0){ | |
| 171 | if(mcu_init == 0){ | |
| 172 | 172 | if(mcu_init == 1){ mcu_init++; return 1; } |
| 173 | 173 | if(mcu_init == 2){ mcu_init++; return 0; } |
| 174 | 174 | |
| r8990 | r8991 | |
| 237 | 237 | ADDRESS_MAP_END |
| 238 | 238 | |
| 239 | 239 | static ADDRESS_MAP_START( multi8_io , ADDRESS_SPACE_IO, 8) |
| 240 | // | |
| 240 | // ADDRESS_MAP_UNMAP_HIGH | |
| 241 | 241 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 242 | 242 | AM_RANGE(0x00, 0x00) AM_READ(key_input_r) AM_WRITENOP//keyboard |
| 243 | 243 | AM_RANGE(0x01, 0x01) AM_READ(key_status_r) AM_WRITENOP//keyboard |
| 244 | 244 | AM_RANGE(0x18, 0x19) AM_DEVWRITE("ymsnd", ym2203_w) |
| 245 | // | |
| 245 | // AM_RANGE(0x18, 0x18) //opn read 0 | |
| 246 | 246 | AM_RANGE(0x1a, 0x1a) AM_DEVREAD("ymsnd", ym2203_r) |
| 247 | 247 | AM_RANGE(0x1c, 0x1d) AM_WRITE(multi8_6845_w) |
| 248 | // AM_RANGE(0x20, 0x21) //sio, cmt | |
| 249 | // AM_RANGE(0x24, 0x27) //pit | |
| 248 | // AM_RANGE(0x20, 0x21) //sio, cmt | |
| 249 | // AM_RANGE(0x24, 0x27) //pit | |
| 250 | 250 | AM_RANGE(0x28, 0x2b) AM_DEVREADWRITE("ppi8255_0", i8255a_r, i8255a_w) |
| 251 | // | |
| 251 | // AM_RANGE(0x2c, 0x2d) //i8259 | |
| 252 | 252 | AM_RANGE(0x30, 0x37) AM_READWRITE(pal_r,pal_w) |
| 253 | // AM_RANGE(0x40, 0x41) //kanji regs | |
| 254 | // AM_RANGE(0x70, 0x74) //upd765a fdc | |
| 255 | // AM_RANGE(0x78, 0x78) //memory banking | |
| 253 | // AM_RANGE(0x40, 0x41) //kanji regs | |
| 254 | // AM_RANGE(0x70, 0x74) //upd765a fdc | |
| 255 | // AM_RANGE(0x78, 0x78) //memory banking | |
| 256 | 256 | ADDRESS_MAP_END |
| 257 | 257 | |
| 258 | 258 | /* Input ports */ |
| r8990 | r8991 | |
| 470 | 470 | static WRITE8_DEVICE_HANDLER( portb_w ) |
| 471 | 471 | { |
| 472 | 472 | /* |
| 473 | x--- ---- color mode | |
| 474 | -x-- ---- screen width (80 / 40) | |
| 475 | ---- x--- memory bank status | |
| 476 | ---- -xxx page screen graphics in B/W mode | |
| 477 | */ | |
| 478 | // address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 473 | x--- ---- color mode | |
| 474 | -x-- ---- screen width (80 / 40) | |
| 475 | ---- x--- memory bank status | |
| 476 | ---- -xxx page screen graphics in B/W mode | |
| 477 | */ | |
| 478 | // address_space *space = cputag_get_address_space(device->machine, "maincpu", ADDRESS_SPACE_PROGRAM); | |
| 479 | 479 | |
| 480 | // | |
| 480 | // printf("Port B w = %02x %04x\n",data,cpu_get_pc(space->cpu)); | |
| 481 | 481 | |
| 482 | 482 | { |
| 483 | 483 | if((display_reg & 0x40) != (data & 0x40)) |
| r8990 | r8991 | |
| 500 | 500 | |
| 501 | 501 | static WRITE8_DEVICE_HANDLER( portc_w ) |
| 502 | 502 | { |
| 503 | // | |
| 503 | // printf("Port C w = %02x\n",data); | |
| 504 | 504 | vram_bank = data & 0x1f; |
| 505 | 505 | |
| 506 | 506 | if(data & 0x20 && data != 0xff) |
| 507 | 507 | printf("Work RAM bank selected!\n"); |
| 508 | // | |
| 508 | // fatalerror("Work RAM bank selected"); | |
| 509 | 509 | } |
| 510 | 510 | |
| 511 | 511 | |
| r8990 | r8991 | |
| 603 | 603 | /* Driver */ |
| 604 | 604 | |
| 605 | 605 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 606 | COMP( 1983, multi8, 0, 0, | |
| 606 | COMP( 1983, multi8, 0, 0, | |
| 607 | 607 |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | P112 Single Board Computer | |
| 4 | ||
| 3 | P112 Single Board Computer | |
| 4 | ||
| 5 | 5 | 30/08/2010 Skeleton driver |
| 6 | ||
| 6 | ||
| 7 | 7 | ****************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "emu.h" |
| r8990 | r8991 | |
| 85 | 85 | /* Driver */ |
| 86 | 86 | |
| 87 | 87 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 88 | COMP( 1996, p112, 0, 0, p112, | |
| 88 | COMP( 1996, p112, 0, 0, p112, |
| r8990 | r8991 | |
|---|---|---|
| 3 | 3 | Schleicher MES |
| 4 | 4 | |
| 5 | 5 | 30/08/2010 Skeleton driver |
| 6 | ||
| 6 | ||
| 7 | 7 | ****************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "emu.h" |
| r8990 | r8991 | |
| 70 | 70 | |
| 71 | 71 | /* Driver */ |
| 72 | 72 | |
| 73 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 74 | COMP( 198?, mes, 0, 0, mes, mes, 0, "Schleicher", "MES", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 73 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 74 | COMP( 198?, mes, 0, 0, mes, mes, 0, "Schleicher", "MES", GAME_NOT_WORKING | GAME_NO_SOUND) |
| r8990 | r8991 | |
|---|---|---|
| 824 | 824 | set_audio_cpu_rom_source(space, bit); /* this is a guess */ |
| 825 | 825 | break; |
| 826 | 826 | case 0x05: neogeo_set_fixed_layer_source(space->machine, bit); break; |
| 827 | // | |
| 827 | // case 0x06: set_save_ram_unlock(space->machine, bit); break; | |
| 828 | 828 | case 0x07: neogeo_set_palette_bank(space->machine, bit); break; |
| 829 | 829 | |
| 830 | 830 | case 0x02: /* unknown - HC32 middle pin 1 */ |
| r8990 | r8991 | |
| 843 | 843 | * |
| 844 | 844 | * DMA |
| 845 | 845 | |
| 846 | FF0061 Write 0x40 means start DMA transfer | |
| 847 | FF0064 Source address (in copy mode), Target address (in filll mode) | |
| 848 | FF0068 Target address (in copy mode) | |
| 849 | FF006C Fill word | |
| 850 | FF0070 Words count | |
| 851 | FF007E \ | |
| 852 | ...... | DMA programming words? NeoGeoCD uses Sanyo Puppet LC8359 chip to | |
| 853 | FF008E / interface with CD, and do DMA transfers | |
| 846 | FF0061 Write 0x40 means start DMA transfer | |
| 847 | FF0064 Source address (in copy mode), Target address (in filll mode) | |
| 848 | FF0068 Target address (in copy mode) | |
| 849 | FF006C Fill word | |
| 850 | FF0070 Words count | |
| 851 | FF007E \ | |
| 852 | ...... | DMA programming words? NeoGeoCD uses Sanyo Puppet LC8359 chip to | |
| 853 | FF008E / interface with CD, and do DMA transfers | |
| 854 | 854 | |
| 855 | ||
| 855 | Memory access control | |
| 856 | 856 | |
| 857 | FF011C DIP SWITCH (Region code) | |
| 858 | FF0105 Area Selector (5 = FIX, 0 = SPR, 4 = Z80, 1 = PCM) | |
| 859 | FF01A1 Sprite bank selector | |
| 860 | FF01A3 PCM bank selector | |
| 861 | FF0120 Prepare sprite area for transfer | |
| 862 | FF0122 Prepare PCM area for transfer | |
| 863 | FF0126 Prepare Z80 area for transfer | |
| 864 | FF0128 Prepare Fix area for transfer | |
| 865 | FF0140 Terminate work on Spr Area (Sprites must be decoded here) | |
| 866 | FF0142 Terminate work on Pcm Area | |
| 867 | FF0146 Terminate work on Z80 Area (Z80 needs to be reset) | |
| 868 | FF0148 Terminate work on Fix Area | |
| 857 | FF011C DIP SWITCH (Region code) | |
| 858 | FF0105 Area Selector (5 = FIX, 0 = SPR, 4 = Z80, 1 = PCM) | |
| 859 | FF01A1 Sprite bank selector | |
| 860 | FF01A3 PCM bank selector | |
| 861 | FF0120 Prepare sprite area for transfer | |
| 862 | FF0122 Prepare PCM area for transfer | |
| 863 | FF0126 Prepare Z80 area for transfer | |
| 864 | FF0128 Prepare Fix area for transfer | |
| 865 | FF0140 Terminate work on Spr Area (Sprites must be decoded here) | |
| 866 | FF0142 Terminate work on Pcm Area | |
| 867 | FF0146 Terminate work on Z80 Area (Z80 needs to be reset) | |
| 868 | FF0148 Terminate work on Fix Area | |
| 869 | 869 | |
| 870 | CD-ROM: | |
| 871 | 0xff0102 == 0xF0 start cd transfer | |
| 872 | int m=bcd(fast_r8(0x10f6c8)); | |
| 873 | int s=bcd(fast_r8(0x10f6c9)); | |
| 874 | int f=bcd(fast_r8(0x10f6ca)); | |
| 875 | int seccount=fast_r16(0x10f688); | |
| 870 | CD-ROM: | |
| 871 | 0xff0102 == 0xF0 start cd transfer | |
| 872 | int m=bcd(fast_r8(0x10f6c8)); | |
| 873 | int s=bcd(fast_r8(0x10f6c9)); | |
| 874 | int f=bcd(fast_r8(0x10f6ca)); | |
| 875 | int seccount=fast_r16(0x10f688); | |
| 876 | 876 | |
| 877 | inisec=((m*60)+s)*75+f; | |
| 878 | inisec-=150; | |
| 879 | dstaddr=0x111204; // this must come from somewhere | |
| 877 | inisec=((m*60)+s)*75+f; | |
| 878 | inisec-=150; | |
| 879 | dstaddr=0x111204; // this must come from somewhere | |
| 880 | 880 | |
| 881 | ||
| 881 | the value @ 0x10f688 is decremented each time a sector is read until it's 0. | |
| 882 | 882 | |
| 883 | 883 | * |
| 884 | 884 | */ |
| r8990 | r8991 | |
| 887 | 887 | { |
| 888 | 888 | // TODO: Proper DMA timing and control |
| 889 | 889 | int count; |
| 890 | // | |
| 890 | // UINT16 word; | |
| 891 | 891 | |
| 892 | 892 | switch(neocd_ctrl.dma_mode[0]) |
| 893 | 893 | { |
| r8990 | r8991 | |
| 1477 | 1477 | #define STANDARD_IN2 \ |
| 1478 | 1478 | PORT_START("IN2") \ |
| 1479 | 1479 | PORT_BIT( 0x00ff, IP_ACTIVE_LOW, IPT_UNUSED ) \ |
| 1480 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1480 | PORT_BIT( 0x0100, IP_ACTIVE_LOW, IPT_START1 ) | |
| 1481 | 1481 | PORT_BIT( 0x0200, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_NAME("1P Select") PORT_CODE(KEYCODE_5) PORT_PLAYER(1) \ |
| 1482 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1482 | PORT_BIT( 0x0400, IP_ACTIVE_LOW, IPT_START2 ) | |
| 1483 | 1483 | PORT_BIT( 0x0800, IP_ACTIVE_LOW, IPT_BUTTON5) PORT_NAME("2P Select") PORT_CODE(KEYCODE_6) PORT_PLAYER(2) \ |
| 1484 | 1484 | PORT_BIT( 0x7000, IP_ACTIVE_HIGH, IPT_SPECIAL ) PORT_CUSTOM(get_memcard_status, NULL) \ |
| 1485 | 1485 | PORT_BIT( 0x8000, IP_ACTIVE_HIGH, IPT_UNKNOWN ) /* Matrimelee expects this bit to be active high when on an AES */ |
| r8990 | r8991 | |
| 1758 | 1758 | ROMX_LOAD("neo-po.bin", 0x00000, 0x020000, CRC(16d0c132) SHA1(4e4a440cae46f3889d20234aebd7f8d5f522e22c), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(1)) /* AES Console (Japan) Bios */ |
| 1759 | 1759 | ROM_SYSTEM_BIOS( 1, "asia-aes", "Asia AES" ) |
| 1760 | 1760 | ROMX_LOAD("neo-epo.bin", 0x00000, 0x020000, CRC(d27a71f1) SHA1(1b3b22092f30c4d1b2c15f04d1670eb1e9fbea07), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(2)) /* AES Console (Asia?) Bios */ |
| 1761 | // ROM_SYSTEM_BIOS( 2, "uni-bios_2_3","Universe Bios (Hack, Ver. 2.3)" ) | |
| 1762 | // ROMX_LOAD( "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(3) ) /* Universe Bios v2.3 (hack) */ | |
| 1761 | // ROM_SYSTEM_BIOS( 2, "uni-bios_2_3","Universe Bios (Hack, Ver. 2.3)" ) | |
| 1762 | // ROMX_LOAD( "uni-bios_2_3.rom", 0x00000, 0x020000, CRC(27664eb5) SHA1(5b02900a3ccf3df168bdcfc98458136fd2b92ac0), ROM_GROUPWORD | ROM_REVERSE | ROM_BIOS(3) ) /* Universe Bios v2.3 (hack) */ | |
| 1763 | 1763 | |
| 1764 | 1764 | ROM_REGION( 0x200000, "maincpu", ROMREGION_ERASEFF ) |
| 1765 | 1765 |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /************************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | Basic Master Level 3 (MB-6890) (c) 1980 Hitachi | |
| 4 | 4 | |
| 5 | ||
| 5 | preliminary driver by Angelo Salese | |
| 6 | 6 | |
| 7 | TODO: | |
| 8 | - no documentation, the entire driver is just a bunch of educated | |
| 7 | TODO: | |
| 8 | - no documentation, the entire driver is just a bunch of educated | |
| 9 | 9 | guesses ... |
| 10 | - keyboard shift key is ugly mapped. | |
| 11 | - understand how to load a tape | |
| 12 | - every time that you switch with NEW ON command, there's a "device i/o error" if | |
| 13 | the hres_reg bit 5 is active. | |
| 14 | - LINE command doesn't work? It says "type mismatch" | |
| 10 | - keyboard shift key is ugly mapped. | |
| 11 | - understand how to load a tape | |
| 12 | - every time that you switch with NEW ON command, there's a "device i/o error" if | |
| 13 | the hres_reg bit 5 is active. | |
| 14 | - LINE command doesn't work? It says "type mismatch" | |
| 15 | 15 | |
| 16 | NOTES: | |
| 17 | - NEW ON changes the video mode, they are: | |
| 18 | 0: 320 x 200, bit 5 active | |
| 19 | 1: 320 x 200, bit 5 unactive | |
| 20 | 2: 320 x 375, bit 5 active | |
| 21 | 3: 320 x 375, bit 5 unactive | |
| 22 | 4: 640 x 200, bit 5 active | |
| 23 | 5: 640 x 200, bit 5 unactive | |
| 24 | 6: 640 x 375, bit 5 active | |
| 25 | 7: 640 x 375, bit 5 unactive | |
| 26 | 8-15: same as above plus sets bit 4 | |
| 27 | 16-31: same as above plus shows the bar at the bottom | |
| 16 | NOTES: | |
| 17 | - NEW ON changes the video mode, they are: | |
| 18 | 0: 320 x 200, bit 5 active | |
| 19 | 1: 320 x 200, bit 5 unactive | |
| 20 | 2: 320 x 375, bit 5 active | |
| 21 | 3: 320 x 375, bit 5 unactive | |
| 22 | 4: 640 x 200, bit 5 active | |
| 23 | 5: 640 x 200, bit 5 unactive | |
| 24 | 6: 640 x 375, bit 5 active | |
| 25 | 7: 640 x 375, bit 5 unactive | |
| 26 | 8-15: same as above plus sets bit 4 | |
| 27 | 16-31: same as above plus shows the bar at the bottom | |
| 28 | 28 | |
| 29 | 29 | **************************************************************************************/ |
| 30 | 30 | |
| r8990 | r8991 | |
| 55 | 55 | width = (hres_reg & 0x80) ? 80 : 40; |
| 56 | 56 | height = (vres_reg & 0x08) ? 1 : 0; |
| 57 | 57 | |
| 58 | // | |
| 58 | // popmessage("%02x %02x",hres_reg,vres_reg); | |
| 59 | 59 | |
| 60 | 60 | for(y=0;y<25;y++) |
| 61 | 61 | { |
| r8990 | r8991 | |
| 167 | 167 | |
| 168 | 168 | if(offset == 0x19) return io_latch; |
| 169 | 169 | if(offset == 0xc4) return 0xff; //some video modes wants this to be high |
| 170 | // | |
| 170 | // if(offset == 0xc5 || offset == 0xca) return mame_rand(space->machine); //tape related | |
| 171 | 171 | if(offset == 0xc8) return 0; //??? checks bit 7, scrolls vertically if active high |
| 172 | 172 | if(offset == 0xc9) return 0x11; //0x01 put 320 x 200 mode, 0x07 = 640 x 375 |
| 173 | 173 | |
| 174 | 174 | /* one of these sets something, apparently available RAM space is smaller if one of these bits is zero (?) */ |
| 175 | // if(offset == 0x40) return 0 ? 0xff : 0x00; | |
| 176 | // if(offset == 0x42) return 0 ? 0xff : 0x00; | |
| 177 | // if(offset == 0x44) return 0 ? 0xff : 0x00; | |
| 178 | // if(offset == 0x46) return 0 ? 0xff : 0x00; | |
| 175 | // if(offset == 0x40) return 0 ? 0xff : 0x00; | |
| 176 | // if(offset == 0x42) return 0 ? 0xff : 0x00; | |
| 177 | // if(offset == 0x44) return 0 ? 0xff : 0x00; | |
| 178 | // if(offset == 0x46) return 0 ? 0xff : 0x00; | |
| 179 | 179 | |
| 180 | 180 | if(offset == 0xd8) return attr_latch; |
| 181 | 181 | if(offset == 0xe0) return bml3_keyboard_r(space,0); |
| 182 | 182 | |
| 183 | // | |
| 183 | // if(offset == 0xcb) | |
| 184 | 184 | |
| 185 | // | |
| 185 | // if(offset == 0x40 || offset == 0x42 || offset == 0x44 || offset == 0x46) | |
| 186 | 186 | |
| 187 | 187 | if(offset < 0xf0) |
| 188 | 188 | { |
| r8990 | r8991 | |
| 214 | 214 | static WRITE8_HANDLER( bml3_hres_reg_w ) |
| 215 | 215 | { |
| 216 | 216 | /* |
| 217 | x--- ---- width (1) 80 / (0) 40 | |
| 218 | -x-- ---- used in some modes, unknown purpose | |
| 219 | --x- ---- used in some modes, unknown purpose (also wants $ffc4 to be 0xff), color / monochrome switch? | |
| 220 | */ | |
| 217 | x--- ---- width (1) 80 / (0) 40 | |
| 218 | -x-- ---- used in some modes, unknown purpose | |
| 219 | --x- ---- used in some modes, unknown purpose (also wants $ffc4 to be 0xff), color / monochrome switch? | |
| 220 | */ | |
| 221 | 221 | |
| 222 | 222 | hres_reg = data; |
| 223 | 223 | |
| r8990 | r8991 | |
| 227 | 227 | static WRITE8_HANDLER( bml3_vres_reg_w ) |
| 228 | 228 | { |
| 229 | 229 | /* |
| 230 | ---- x--- char height | |
| 231 | */ | |
| 230 | ---- x--- char height | |
| 231 | */ | |
| 232 | 232 | vres_reg = data; |
| 233 | 233 | |
| 234 | 234 | m6845_change_clock(space->machine,(hres_reg & 0x80) | (vres_reg & 0x08)); |
| r8990 | r8991 | |
| 236 | 236 | |
| 237 | 237 | static WRITE8_HANDLER( bml3_io_w ) |
| 238 | 238 | { |
| 239 | if(offset == 0x19) { io_latch = data; } //??? | |
| 240 | // else if(offset == 0xc4) { /* system latch, writes 0x53 -> 0x51 when a tape is loaded */} | |
| 241 | else if(offset == 0xc6 || offset == 0xc7) { bml3_6845_w(space,offset-0xc6,data); } | |
| 239 | if(offset == 0x19) { io_latch = data; } //??? | |
| 240 | // else if(offset == 0xc4) { /* system latch, writes 0x53 -> 0x51 when a tape is loaded */} | |
| 241 | else if(offset == 0xc6 || offset == 0xc7) { bml3_6845_w(space,offset-0xc6,data); } | |
| 242 | 242 | else if(offset == 0xd0) { bml3_hres_reg_w(space,0,data); } |
| 243 | 243 | else if(offset == 0xd3) { beep_set_state(space->machine->device("beeper"),!(data & 0x80)); } |
| 244 | 244 | else if(offset == 0xd6) { bml3_vres_reg_w(space,0,data); } |
| 245 | else if(offset == 0xd8) | |
| 245 | else if(offset == 0xd8) | |
| 246 | 246 | else |
| 247 | 247 | { |
| 248 | 248 | logerror("I/O write %02x -> [%02x] at PC=%04x\n",data,offset,cpu_get_pc(space->cpu)); |
| r8990 | r8991 | |
| 312 | 312 | PORT_BIT(0x10000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("9") PORT_CODE(KEYCODE_9) PORT_CHAR('9') |
| 313 | 313 | PORT_BIT(0x20000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("7 PAD") PORT_CODE(KEYCODE_7_PAD) PORT_CHAR('7') |
| 314 | 314 | PORT_BIT(0x40000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("X7") //backspace |
| 315 | PORT_BIT(0x80000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("\xC2\xA5") //PORT_NAME(" | |
| 315 | PORT_BIT(0x80000000,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("\xC2\xA5") //PORT_NAME("?") | |
| 316 | 316 | |
| 317 | 317 | PORT_START("key2") //0x20-0x3f |
| 318 | 318 | PORT_BIT(0x00000001,IP_ACTIVE_HIGH,IPT_KEYBOARD) PORT_NAME("U") PORT_CODE(KEYCODE_U) |
| r8990 | r8991 | |
| 466 | 466 | /* basic machine hardware */ |
| 467 | 467 | MDRV_CPU_ADD("maincpu",M6809, XTAL_1MHz) |
| 468 | 468 | MDRV_CPU_PROGRAM_MAP(bml3_mem) |
| 469 | // MDRV_CPU_VBLANK_INT("screen", bml3_irq ) | |
| 470 | // MDRV_CPU_PERIODIC_INT(bml3_firq,45) | |
| 469 | // MDRV_CPU_VBLANK_INT("screen", bml3_irq ) | |
| 470 | // MDRV_CPU_PERIODIC_INT(bml3_firq,45) | |
| 471 | 471 | |
| 472 | 472 | MDRV_MACHINE_START(bml3) |
| 473 | ||
| 473 | ||
| 474 | 474 | |
| 475 | ||
| 475 | ||
| 476 | 476 | MDRV_SCREEN_ADD("screen", RASTER) |
| 477 | 477 | MDRV_SCREEN_REFRESH_RATE(60) |
| 478 | 478 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ |
| r8990 | r8991 | |
| 497 | 497 | /* ROM definition */ |
| 498 | 498 | ROM_START( bml3 ) |
| 499 | 499 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 500 | // | |
| 500 | // ROM_LOAD( "l3bas.rom", 0xa000, 0x6000, BAD_DUMP CRC(d81baa07) SHA1(a8fd6b29d8c505b756dbf5354341c48f9ac1d24d)) //original, 24k isn't a proper rom size! | |
| 501 | 501 | /* Handcrafted ROMs, rom labels and contents might not match */ |
| 502 | 502 | ROM_LOAD( "598 p16611.ic3", 0xa000, 0x2000, BAD_DUMP CRC(954b9bad) SHA1(047948fac6808717c60a1d0ac9205a5725362430)) |
| 503 | 503 | ROM_LOAD( "599 p16561.ic4", 0xc000, 0x2000, BAD_DUMP CRC(b27a48f5) SHA1(94cb616df4caa6415c5076f9acdf675acb7453e2)) |
| r8990 | r8991 | |
| 513 | 513 | /* Driver */ |
| 514 | 514 | |
| 515 | 515 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 516 | COMP( 1980, bml3, | |
| 516 | COMP( 1980, bml3, | |
| 517 | 517 |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | ||
| 2 | ||
| 3 | 3 | mc-CP/M-Computer |
| 4 | 4 | |
| 5 | 5 | 31/08/2010 Skeleton driver. |
| r8990 | r8991 | |
| 18 | 18 | |
| 19 | 19 | static ADDRESS_MAP_START( mccpm_io , ADDRESS_SPACE_IO, 8) |
| 20 | 20 | ADDRESS_MAP_UNMAP_HIGH |
| 21 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 21 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 22 | 22 | ADDRESS_MAP_END |
| 23 | 23 | |
| 24 | 24 | /* Input ports */ |
| r8990 | r8991 | |
| 26 | 26 | INPUT_PORTS_END |
| 27 | 27 | |
| 28 | 28 | |
| 29 | static MACHINE_RESET(mccpm) | |
| 30 | { | |
| 29 | static MACHINE_RESET(mccpm) | |
| 30 | { | |
| 31 | 31 | UINT8* bios = memory_region(machine, "maincpu"); |
| 32 | 32 | |
| 33 | 33 | memcpy(mccpm_ram,bios, 0x1000); |
| r8990 | r8991 | |
| 46 | 46 | /* basic machine hardware */ |
| 47 | 47 | MDRV_CPU_ADD("maincpu",Z80, XTAL_4MHz) |
| 48 | 48 | MDRV_CPU_PROGRAM_MAP(mccpm_mem) |
| 49 | MDRV_CPU_IO_MAP(mccpm_io) | |
| 49 | MDRV_CPU_IO_MAP(mccpm_io) | |
| 50 | 50 | |
| 51 | 51 | MDRV_MACHINE_RESET(mccpm) |
| 52 | ||
| 52 | ||
| 53 | 53 | /* video hardware */ |
| 54 | 54 | MDRV_SCREEN_ADD("screen", RASTER) |
| 55 | 55 | MDRV_SCREEN_REFRESH_RATE(50) |
| r8990 | r8991 | |
| 73 | 73 | /* Driver */ |
| 74 | 74 | |
| 75 | 75 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 76 | COMP( 1981, mccpm, 0, 0, mccpm, | |
| 76 | COMP( 1981, mccpm, 0, 0, mccpm, | |
| 77 | 77 |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | Systec Z80 | |
| 4 | ||
| 5 | More data : | |
| 6 | http://www.hd64180-cpm.de/html/systecz80.html | |
| 3 | Systec Z80 | |
| 7 | 4 | |
| 5 | More data : | |
| 6 | http://www.hd64180-cpm.de/html/systecz80.html | |
| 7 | ||
| 8 | 8 | 30/08/2010 Skeleton driver |
| 9 | 9 | |
| 10 | ||
| 10 | Systec Platine 1 | |
| 11 | 11 | |
| 12 | SYSTEC 155.1L | |
| 13 | EPROM 2764 CP/M LOADER 155 / 9600 Baud | |
| 14 | Z8400APS CPU | |
| 15 | Z8420APS PIO | |
| 16 | Z8430APS CTC | |
| 17 | Z8470APS DART | |
| 12 | SYSTEC 155.1L | |
| 13 | EPROM 2764 CP/M LOADER 155 / 9600 Baud | |
| 14 | Z8400APS CPU | |
| 15 | Z8420APS PIO | |
| 16 | Z8430APS CTC | |
| 17 | Z8470APS DART | |
| 18 | 18 | |
| 19 | ||
| 19 | Systec Platine 2 | |
| 20 | 20 | |
| 21 | SYSTEC 100.3B | |
| 22 | MB8877A FDC Controller | |
| 23 | FDC9229BT SMC 8608 | |
| 24 | Z8410APS DMA | |
| 25 | Z8420APS PIO | |
| 21 | SYSTEC 100.3B | |
| 22 | MB8877A FDC Controller | |
| 23 | FDC9229BT SMC 8608 | |
| 24 | Z8410APS DMA | |
| 25 | Z8420APS PIO | |
| 26 | 26 | |
| 27 | ||
| 27 | MB8877A Compatible FD1793 | |
| 28 | 28 | ****************************************************************************/ |
| 29 | 29 | |
| 30 | 30 | #include "emu.h" |
| r8990 | r8991 | |
| 89 | 89 | |
| 90 | 90 | /* Driver */ |
| 91 | 91 | |
| 92 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 93 | COMP( 19??, systec, 0, 0, systec, systec, 0, "Systec", "Systec Z80", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 92 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 93 | COMP( 19??, systec, 0, 0, systec, systec, 0, "Systec", "Systec Z80", GAME_NOT_WORKING | GAME_NO_SOUND) |
| r8990 | r8991 | |
|---|---|---|
| 433 | 433 | return IMAGE_INIT_FAIL; |
| 434 | 434 | } |
| 435 | 435 | exe_size = quickload_size; |
| 436 | space->set_direct_update_handler(direct_update_delegate_create_static(psx_setopbase, *image.device().machine)); | |
| 436 | space->set_direct_update_handler(direct_update_delegate_create_static(psx_setopbase, *image.device().machine)); | |
| 437 | 437 | |
| 438 | 438 | return IMAGE_INIT_PASS; |
| 439 | 439 | } |
| r8990 | r8991 | |
|---|---|---|
| 564 | 564 | |
| 565 | 565 | MDRV_MACHINE_START(samcoupe) |
| 566 | 566 | MDRV_MACHINE_RESET(samcoupe) |
| 567 | ||
| 567 | ||
| 568 | 568 | /* video hardware */ |
| 569 | 569 | MDRV_SCREEN_ADD("screen", RASTER) |
| 570 | 570 | MDRV_SCREEN_RAW_PARAMS(SAMCOUPE_XTAL_X1/2, SAM_TOTAL_WIDTH, 0, SAM_BORDER_LEFT + SAM_SCREEN_WIDTH + SAM_BORDER_RIGHT, SAM_TOTAL_HEIGHT, 0, SAM_BORDER_TOP + SAM_SCREEN_HEIGHT + SAM_BORDER_BOTTOM) |
| r8990 | r8991 | |
|---|---|---|
| 269 | 269 | { |
| 270 | 270 | UINT32 size; |
| 271 | 271 | UINT8 *ptr = memory_region(image.device().machine, "maincpu"); |
| 272 | ||
| 272 | ||
| 273 | 273 | if (image.software_entry() == NULL) |
| 274 | 274 | { |
| 275 | 275 | size = image.length(); |
| r8990 | r8991 | |
| 281 | 281 | size = image.get_software_region_length("rom"); |
| 282 | 282 | memcpy(ptr + cartridge_base, image.get_software_region("rom"), size); |
| 283 | 283 | } |
| 284 | ||
| 284 | ||
| 285 | 285 | return IMAGE_INIT_PASS; |
| 286 | 286 | } |
| 287 | 287 |
| r8990 | r8991 | |
|---|---|---|
| 15 | 15 | running_device *beta = machine->device(BETA_DISK_TAG); |
| 16 | 16 | UINT16 pc = cpu_get_reg(machine->device("maincpu"), STATE_GENPCBASE); |
| 17 | 17 | address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 18 | ||
| 18 | ||
| 19 | 19 | if (beta->started() && betadisk_is_active(beta)) |
| 20 | 20 | { |
| 21 | 21 | if (pc >= 0x4000) |
| r8990 | r8991 | |
| 114 | 114 | } |
| 115 | 115 | |
| 116 | 116 | space->set_direct_update_handler(direct_update_delegate_create_static(atm_direct, *machine)); |
| 117 | ||
| 117 | ||
| 118 | 118 | memset(messram,0,128*1024); |
| 119 | 119 | |
| 120 | 120 | /* Bank 5 is always in 0x4000 - 0x7fff */ |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /***************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | Casio Loopy (c) 1995 Casio | |
| 4 | 4 | |
| 5 | ||
| 5 | skeleton driver | |
| 6 | 6 | |
| 7 | Note: | |
| 8 | - just a placeholder for any HW discovery, until we decap/trojan the BIOS, | |
| 9 | the idea is to understand the HW enough to extract the SH-1 internal BIOS | |
| 10 | data via a trojan; | |
| 7 | Note: | |
| 8 | - just a placeholder for any HW discovery, until we decap/trojan the BIOS, | |
| 9 | the idea is to understand the HW enough to extract the SH-1 internal BIOS | |
| 10 | data via a trojan; | |
| 11 | 11 | |
| 12 | 12 | ******************************************************************************/ |
| 13 | 13 |
| r8990 | r8991 | |
|---|---|---|
| 200 | 200 | |
| 201 | 201 | //static READ8_HANDLER( keyboard_x0_r ) |
| 202 | 202 | //{ |
| 203 | // | |
| 203 | // /* | |
| 204 | 204 | // |
| 205 | 205 | // bit description |
| 206 | 206 | // |
| r8990 | r8991 | |
| 215 | 215 | // |
| 216 | 216 | // */ |
| 217 | 217 | // |
| 218 | // | |
| 218 | // tandy2k_state *state = space->machine->driver_data<tandy2k_state>(); | |
| 219 | 219 | // |
| 220 | // | |
| 220 | // UINT8 data = 0xff; | |
| 221 | 221 | // |
| 222 | // if (!BIT(state->keylatch, 0)) data &= input_port_read(space->machine, "Y0"); | |
| 223 | // if (!BIT(state->keylatch, 1)) data &= input_port_read(space->machine, "Y1"); | |
| 224 | // if (!BIT(state->keylatch, 2)) data &= input_port_read(space->machine, "Y2"); | |
| 225 | // if (!BIT(state->keylatch, 3)) data &= input_port_read(space->machine, "Y3"); | |
| 226 | // if (!BIT(state->keylatch, 4)) data &= input_port_read(space->machine, "Y4"); | |
| 227 | // if (!BIT(state->keylatch, 5)) data &= input_port_read(space->machine, "Y5"); | |
| 228 | // if (!BIT(state->keylatch, 6)) data &= input_port_read(space->machine, "Y6"); | |
| 229 | // if (!BIT(state->keylatch, 7)) data &= input_port_read(space->machine, "Y7"); | |
| 230 | // if (!BIT(state->keylatch, 8)) data &= input_port_read(space->machine, "Y8"); | |
| 231 | // if (!BIT(state->keylatch, 9)) data &= input_port_read(space->machine, "Y9"); | |
| 232 | // if (!BIT(state->keylatch, 10)) data &= input_port_read(space->machine, "Y10"); | |
| 233 | // if (!BIT(state->keylatch, 11)) data &= input_port_read(space->machine, "Y11"); | |
| 222 | // if (!BIT(state->keylatch, 0)) data &= input_port_read(space->machine, "Y0"); | |
| 223 | // if (!BIT(state->keylatch, 1)) data &= input_port_read(space->machine, "Y1"); | |
| 224 | // if (!BIT(state->keylatch, 2)) data &= input_port_read(space->machine, "Y2"); | |
| 225 | // if (!BIT(state->keylatch, 3)) data &= input_port_read(space->machine, "Y3"); | |
| 226 | // if (!BIT(state->keylatch, 4)) data &= input_port_read(space->machine, "Y4"); | |
| 227 | // if (!BIT(state->keylatch, 5)) data &= input_port_read(space->machine, "Y5"); | |
| 228 | // if (!BIT(state->keylatch, 6)) data &= input_port_read(space->machine, "Y6"); | |
| 229 | // if (!BIT(state->keylatch, 7)) data &= input_port_read(space->machine, "Y7"); | |
| 230 | // if (!BIT(state->keylatch, 8)) data &= input_port_read(space->machine, "Y8"); | |
| 231 | // if (!BIT(state->keylatch, 9)) data &= input_port_read(space->machine, "Y9"); | |
| 232 | // if (!BIT(state->keylatch, 10)) data &= input_port_read(space->machine, "Y10"); | |
| 233 | // if (!BIT(state->keylatch, 11)) data &= input_port_read(space->machine, "Y11"); | |
| 234 | 234 | // |
| 235 | // | |
| 235 | // return ~data; | |
| 236 | 236 | //} |
| 237 | 237 | // |
| 238 | 238 | //static WRITE8_HANDLER( keyboard_y0_w ) |
| 239 | 239 | //{ |
| 240 | // | |
| 240 | // /* | |
| 241 | 241 | // |
| 242 | 242 | // bit description |
| 243 | 243 | // |
| r8990 | r8991 | |
| 252 | 252 | // |
| 253 | 253 | // */ |
| 254 | 254 | // |
| 255 | // | |
| 255 | // tandy2k_state *state = space->machine->driver_data<tandy2k_state>(); | |
| 256 | 256 | // |
| 257 | // /* keyboard row select */ | |
| 258 | // state->keylatch = (state->keylatch & 0xff00) | data; | |
| 257 | // /* keyboard row select */ | |
| 258 | // state->keylatch = (state->keylatch & 0xff00) | data; | |
| 259 | 259 | //} |
| 260 | 260 | // |
| 261 | 261 | //static WRITE8_HANDLER( keyboard_y8_w ) |
| 262 | 262 | //{ |
| 263 | // | |
| 263 | // /* | |
| 264 | 264 | // |
| 265 | 265 | // bit description |
| 266 | 266 | // |
| r8990 | r8991 | |
| 275 | 275 | // |
| 276 | 276 | // */ |
| 277 | 277 | // |
| 278 | // | |
| 278 | // tandy2k_state *state = space->machine->driver_data<tandy2k_state>(); | |
| 279 | 279 | // |
| 280 | // /* keyboard row select */ | |
| 281 | // state->keylatch = ((data & 0x0f) << 8) | (state->keylatch & 0xff); | |
| 280 | // /* keyboard row select */ | |
| 281 | // state->keylatch = ((data & 0x0f) << 8) | (state->keylatch & 0xff); | |
| 282 | 282 | //} |
| 283 | 283 | |
| 284 | 284 | /* Memory Maps */ |
| r8990 | r8991 | |
| 320 | 320 | ADDRESS_MAP_END |
| 321 | 321 | |
| 322 | 322 | //static ADDRESS_MAP_START( keyboard_io, ADDRESS_SPACE_IO, 8 ) |
| 323 | // AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(keyboard_y0_w) | |
| 324 | // AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(keyboard_y8_w) | |
| 325 | // AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(keyboard_x0_r) | |
| 323 | // AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(keyboard_y0_w) | |
| 324 | // AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(keyboard_y8_w) | |
| 325 | // AM_RANGE(MCS48_PORT_BUS, MCS48_PORT_BUS) AM_READ(keyboard_x0_r) | |
| 326 | 326 | //ADDRESS_MAP_END |
| 327 | 327 | |
| 328 | 328 | /* Input Ports */ |
| r8990 | r8991 | |
|---|---|---|
| 3 | 3 | Robotron K8915 |
| 4 | 4 | |
| 5 | 5 | 30/08/2010 Skeleton driver |
| 6 | ||
| 6 | ||
| 7 | 7 | ****************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "emu.h" |
| r8990 | r8991 | |
| 71 | 71 | |
| 72 | 72 | /* Driver */ |
| 73 | 73 | |
| 74 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 75 | COMP( 1982, k8915, 0, 0, k8915, k8915, 0, "Robotron", "K8915", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 74 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 75 | COMP( 1982, k8915, 0, 0, k8915, k8915, 0, "Robotron", "K8915", GAME_NOT_WORKING | GAME_NO_SOUND) |
| r8990 | r8991 | |
|---|---|---|
| 3 | 3 | Cromemco C-10 Personal Computer |
| 4 | 4 | |
| 5 | 5 | 30/08/2010 Skeleton driver |
| 6 | ||
| 6 | ||
| 7 | 7 | ****************************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "emu.h" |
| r8990 | r8991 | |
| 90 | 90 | ROM_REGION( 0x10000, "maincpu", ROMREGION_ERASEFF ) |
| 91 | 91 | ROM_LOAD( "c10_cros.bin", 0x0000, 0x4000, CRC(2ccf5983) SHA1(52f7c497f5284bf5df9eb0d6e9142bb1869d8c24)) |
| 92 | 92 | ROM_REGION( 0x2000, "chargen", 0 ) |
| 93 | ROM_LOAD( "c10_char.bin", 0x0000, 0x2000, CRC(cb530b6f) SHA1(95590bbb433db9c4317f535723b29516b9b9fcbf)) | |
| 93 | ROM_LOAD( "c10_char.bin", 0x0000, 0x2000, CRC(cb530b6f) SHA1(95590bbb433db9c4317f535723b29516b9b9fcbf)) | |
| 94 | 94 | ROM_END |
| 95 | 95 | |
| 96 | 96 | /* Driver */ |
| 97 | 97 | |
| 98 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 99 | COMP( 1982, c10, 0, 0, c10, c10, 0, "Cromemco", "C-10", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 98 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 99 | COMP( 1982, c10, 0, 0, c10, c10, 0, "Cromemco", "C-10", GAME_NOT_WORKING | GAME_NO_SOUND) |
| r8990 | r8991 | |
|---|---|---|
| 238 | 238 | DEVCB_NULL, /* in_a_func */ |
| 239 | 239 | DEVCB_HANDLER(jr100_via_read_b), /* in_b_func */ |
| 240 | 240 | DEVCB_NULL, /* in_ca1_func */ |
| 241 | DEVCB_NULL, /* in_cb1_func */ | |
| 242 | DEVCB_NULL, /* in_ca2_func */ | |
| 243 | DEVCB_NULL, /* in_cb2_func */ | |
| 241 | DEVCB_NULL, /* in_cb1_func */ | |
| 242 | DEVCB_NULL, /* in_ca2_func */ | |
| 243 | DEVCB_NULL, /* in_cb2_func */ | |
| 244 | 244 | DEVCB_HANDLER(jr100_via_write_a), /* out_a_func */ |
| 245 | 245 | DEVCB_HANDLER(jr100_via_write_b), /* out_b_func */ |
| 246 | DEVCB_NULL, | |
| 246 | DEVCB_NULL, | |
| 247 | 247 | DEVCB_NULL, /* out_cb1_func */ |
| 248 | DEVCB_NULL, /* out_ca2_func */ | |
| 249 | DEVCB_LINE(jr100_via_write_cb2), /* out_cb2_func */ | |
| 250 | DEVCB_NULL /* irq_func */ | |
| 248 | DEVCB_NULL, /* out_ca2_func */ | |
| 249 | DEVCB_LINE(jr100_via_write_cb2), /* out_cb2_func */ | |
| 250 | DEVCB_NULL /* irq_func */ | |
| 251 | 251 | }; |
| 252 | 252 | static const cassette_config jr100_cassette_config = |
| 253 | 253 | { |
| r8990 | r8991 | |
| 307 | 307 | pos += len; // skip name |
| 308 | 308 | UINT32 start_address = readByLittleEndian(buf,pos); pos+= 4; |
| 309 | 309 | UINT32 code_length = readByLittleEndian(buf,pos); pos+= 4; |
| 310 | UINT32 flag | |
| 310 | UINT32 flag | |
| 311 | 311 | |
| 312 | 312 | UINT32 end_address = start_address + code_length - 1; |
| 313 | 313 | // copy code |
| r8990 | r8991 | |
| 380 | 380 | |
| 381 | 381 | /* Driver */ |
| 382 | 382 | |
| 383 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 384 | //COMP( 1981, jr100, 0, 0, jr100, jr100, 0, "National", "JR-100", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 385 | COMP( 1981, jr100u, 0, 0, jr100, jr100, 0, "Panasonic", "JR-100U", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 383 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 384 | //COMP( 1981, jr100, 0, 0, jr100, jr100, 0, "National", "JR-100", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 385 | COMP( 1981, jr100u, 0, 0, jr100, jr100, 0, "Panasonic", "JR-100U", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 386 | 386 |
| r8990 | r8991 | |
|---|---|---|
| 3 | 3 | CZK-80 |
| 4 | 4 | |
| 5 | 5 | 30/08/2010 Skeleton driver |
| 6 | ||
| 7 | On main board there are Z80A CPU, Z80A PIO, Z80A DART and Z80A CTC | |
| 8 | there is 8K ROM and XTAL 16MHz | |
| 9 | FDC board contains Z80A DMA and NEC 765A (XTAL on it is 8MHZ) | |
| 10 | Mega board contains 74LS612 and memory chips | |
| 11 | 6 | |
| 7 | On main board there are Z80A CPU, Z80A PIO, Z80A DART and Z80A CTC | |
| 8 | there is 8K ROM and XTAL 16MHz | |
| 9 | FDC board contains Z80A DMA and NEC 765A (XTAL on it is 8MHZ) | |
| 10 | Mega board contains 74LS612 and memory chips | |
| 11 | ||
| 12 | 12 | ****************************************************************************/ |
| 13 | 13 | |
| 14 | 14 | #include "emu.h" |
| r8990 | r8991 | |
| 78 | 78 | |
| 79 | 79 | /* Driver */ |
| 80 | 80 | |
| 81 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 82 | COMP( 198?, czk80, 0, 0, czk80, czk80, 0, "<unknown>", "CZK-80", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 81 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 82 | COMP( 198?, czk80, 0, 0, czk80, czk80, 0, "<unknown>", "CZK-80", GAME_NOT_WORKING | GAME_NO_SOUND) |
| r8990 | r8991 | |
|---|---|---|
| 443 | 443 | MDRV_CPU_ADD("maincpu", M68EC020, AMIGA_68EC020_NTSC_CLOCK) /* 14.3 Mhz */ |
| 444 | 444 | MDRV_CPU_PROGRAM_MAP(a1200_map) |
| 445 | 445 | |
| 446 | // | |
| 446 | // MDRV_CPU_ADD("keyboard_mpu", MC68HC05) | |
| 447 | 447 | |
| 448 | 448 | MDRV_MACHINE_RESET(amiga) |
| 449 | 449 |
| r8990 | r8991 | |
|---|---|---|
| 303 | 303 | |
| 304 | 304 | ROM_START(apple2gsr1) |
| 305 | 305 | ROM_REGION(0xc00,"keyboard",0) |
| 306 | ROM_LOAD( "341s0345.bin", 0x000000, 0x000c00, CRC(48cd5779) SHA1(97e421f5247c00a0ca34cd08b6209df573101480) ) | |
| 306 | ROM_LOAD( "341s0345.bin", 0x000000, 0x000c00, CRC(48cd5779) SHA1(97e421f5247c00a0ca34cd08b6209df573101480) ) | |
| 307 | 307 | |
| 308 | 308 | ROM_REGION(0x1000,"gfx1",0) |
| 309 | 309 | ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89)) /* need label/part number */ |
| r8990 | r8991 | |
| 314 | 314 | |
| 315 | 315 | ROM_START(apple2gsr0) |
| 316 | 316 | ROM_REGION(0xc00,"keyboard",0) |
| 317 | ROM_LOAD( "341s0345.bin", 0x000000, 0x000c00, CRC(48cd5779) SHA1(97e421f5247c00a0ca34cd08b6209df573101480) ) | |
| 317 | ROM_LOAD( "341s0345.bin", 0x000000, 0x000c00, CRC(48cd5779) SHA1(97e421f5247c00a0ca34cd08b6209df573101480) ) | |
| 318 | 318 | |
| 319 | 319 | ROM_REGION(0x1000,"gfx1",0) |
| 320 | 320 | ROM_LOAD ( "apple2gs.chr", 0x0000, 0x1000, CRC(91e53cd8) SHA1(34e2443e2ef960a36c047a09ed5a93f471797f89)) |
| r8990 | r8991 | |
|---|---|---|
| 322 | 322 | |
| 323 | 323 | //static READ8_HANDLER( keyboard_busy_r ) |
| 324 | 324 | //{ |
| 325 | // | |
| 325 | // trs80m2_state *state = space->machine->driver_data<trs80m2_state>(); | |
| 326 | 326 | // |
| 327 | // | |
| 327 | // return state->kbirq; | |
| 328 | 328 | //} |
| 329 | 329 | // |
| 330 | 330 | //static READ8_HANDLER( keyboard_data_r ) |
| 331 | 331 | //{ |
| 332 | // | |
| 332 | // trs80m2_state *state = space->machine->driver_data<trs80m2_state>(); | |
| 333 | 333 | // |
| 334 | // | |
| 334 | // static const char *const KEY_ROW[] = { "ROW0", "ROW1", "ROW2", "ROW3", "ROW4", "ROW5", "ROW6", "ROW7", "ROW8", "ROW9", "ROW10", "ROW11" }; | |
| 335 | 335 | // |
| 336 | // | |
| 336 | // return input_port_read(space->machine, KEY_ROW[state->key_latch]); | |
| 337 | 337 | //} |
| 338 | 338 | // |
| 339 | 339 | //static WRITE8_HANDLER( keyboard_ctrl_w ) |
| 340 | 340 | //{ |
| 341 | // | |
| 341 | // /* | |
| 342 | 342 | // |
| 343 | 343 | // bit description |
| 344 | 344 | // |
| r8990 | r8991 | |
| 353 | 353 | // |
| 354 | 354 | // */ |
| 355 | 355 | // |
| 356 | // | |
| 356 | // trs80m2_state *state = space->machine->driver_data<trs80m2_state>(); | |
| 357 | 357 | // |
| 358 | // int kbdata = BIT(data, 0); | |
| 359 | // int kbclk = BIT(data, 1); | |
| 358 | // int kbdata = BIT(data, 0); | |
| 359 | // int kbclk = BIT(data, 1); | |
| 360 | 360 | // |
| 361 | // if (state->key_bit == 8) | |
| 362 | // { | |
| 363 | // if (!state->kbdata && kbdata) | |
| 364 | // { | |
| 365 | // /* trigger keyboard interrupt */ | |
| 366 | // state->kbirq = 0; | |
| 367 | // z80ctc_trg3_w(state->z80ctc, state->kbirq); | |
| 368 | // } | |
| 369 | // } | |
| 370 | // else | |
| 371 | // { | |
| 372 | // if (!state->kbclk && kbclk) | |
| 373 | // { | |
| 374 | // /* shift in keyboard data bit */ | |
| 375 | // state->key_data <<= 1; | |
| 376 | // state->key_data |= kbdata; | |
| 377 | // state->key_bit++; | |
| 378 | // } | |
| 379 | // } | |
| 361 | // if (state->key_bit == 8) | |
| 362 | // { | |
| 363 | // if (!state->kbdata && kbdata) | |
| 364 | // { | |
| 365 | // /* trigger keyboard interrupt */ | |
| 366 | // state->kbirq = 0; | |
| 367 | // z80ctc_trg3_w(state->z80ctc, state->kbirq); | |
| 368 | // } | |
| 369 | // } | |
| 370 | // else | |
| 371 | // { | |
| 372 | // if (!state->kbclk && kbclk) | |
| 373 | // { | |
| 374 | // /* shift in keyboard data bit */ | |
| 375 | // state->key_data <<= 1; | |
| 376 | // state->key_data |= kbdata; | |
| 377 | // state->key_bit++; | |
| 378 | // } | |
| 379 | // } | |
| 380 | 380 | // |
| 381 | // state->kbdata = kbdata; | |
| 382 | // state->kbclk = kbclk; | |
| 381 | // state->kbdata = kbdata; | |
| 382 | // state->kbclk = kbclk; | |
| 383 | 383 | //} |
| 384 | 384 | // |
| 385 | 385 | //static WRITE8_HANDLER( keyboard_latch_w ) |
| 386 | 386 | //{ |
| 387 | // | |
| 387 | // /* | |
| 388 | 388 | // |
| 389 | 389 | // bit description |
| 390 | 390 | // |
| r8990 | r8991 | |
| 399 | 399 | // |
| 400 | 400 | // */ |
| 401 | 401 | // |
| 402 | // | |
| 402 | // trs80m2_state *state = space->machine->driver_data<trs80m2_state>(); | |
| 403 | 403 | // |
| 404 | // | |
| 404 | // state->key_latch = BITSWAP8(data, 7, 6, 5, 4, 0, 1, 2, 3) & 0x0f; | |
| 405 | 405 | //} |
| 406 | 406 | |
| 407 | 407 | /* Memory Maps */ |
| r8990 | r8991 | |
| 427 | 427 | ADDRESS_MAP_END |
| 428 | 428 | |
| 429 | 429 | //static ADDRESS_MAP_START( trs80m2_keyboard_io, ADDRESS_SPACE_IO, 8 ) |
| 430 | // AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(keyboard_busy_r) | |
| 431 | // AM_RANGE(MCS48_PORT_P0, MCS48_PORT_P0) AM_READ(keyboard_data_r) | |
| 432 | // AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(keyboard_ctrl_w) | |
| 433 | // AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(keyboard_latch_w) | |
| 430 | // AM_RANGE(MCS48_PORT_T1, MCS48_PORT_T1) AM_READ(keyboard_busy_r) | |
| 431 | // AM_RANGE(MCS48_PORT_P0, MCS48_PORT_P0) AM_READ(keyboard_data_r) | |
| 432 | // AM_RANGE(MCS48_PORT_P1, MCS48_PORT_P1) AM_WRITE(keyboard_ctrl_w) | |
| 433 | // AM_RANGE(MCS48_PORT_P2, MCS48_PORT_P2) AM_WRITE(keyboard_latch_w) | |
| 434 | 434 | //ADDRESS_MAP_END |
| 435 | 435 | |
| 436 | 436 | //static ADDRESS_MAP_START( m68000_mem, ADDRESS_SPACE_PROGRAM, 16 ) |
| r8990 | r8991 | |
|---|---|---|
| 849 | 849 | static void xegs_mmu(running_machine *machine, UINT8 new_mmu) |
| 850 | 850 | { |
| 851 | 851 | UINT8 *base2, *base3, *base4; |
| 852 | ||
| 852 | ||
| 853 | 853 | /* check if memory C000-FFFF changed */ |
| 854 | 854 | if( new_mmu & 0x01 ) |
| 855 | 855 | { |
| r8990 | r8991 | |
| 871 | 871 | } |
| 872 | 872 | memory_set_bankptr(machine, "bank3", base3); |
| 873 | 873 | memory_set_bankptr(machine, "bank4", base4); |
| 874 | ||
| 875 | ||
| 874 | ||
| 875 | ||
| 876 | 876 | /* check if self-test ROM changed */ |
| 877 | 877 | if( new_mmu & 0x80 ) |
| 878 | 878 | { |
| r8990 | r8991 | |
| 1239 | 1239 | |
| 1240 | 1240 | /* Software lists */ |
| 1241 | 1241 | MDRV_SOFTWARE_LIST_ADD("cart_list","a5200") |
| 1242 | ||
| 1242 | ||
| 1243 | 1243 | /* internal ram */ |
| 1244 | 1244 | MDRV_RAM_MODIFY("messram") |
| 1245 | 1245 | MDRV_RAM_DEFAULT_SIZE("16K") |
| r8990 | r8991 | |
|---|---|---|
| 91 | 91 | case 0x800: // VERSION |
| 92 | 92 | // LC/LCII return 0xe8 (V8 ASIC ASC emulation) |
| 93 | 93 | if ((mac->mac_model == MODEL_MAC_LC) || (mac->mac_model == MODEL_MAC_LC_II)) |
| 94 | | |
| 94 | | |
| 95 | 95 | return 0xe8; |
| 96 | 96 | } |
| 97 | 97 | |
| r8990 | r8991 | |
| 105 | 105 | |
| 106 | 106 | case 0x804: |
| 107 | 107 | if ((mac->mac_model == MODEL_MAC_LC) || (mac->mac_model == MODEL_MAC_LC_II)) |
| 108 | | |
| 108 | | |
| 109 | 109 | return 3; |
| 110 | 110 | } |
| 111 | 111 | break; |
| r8990 | r8991 | |
|---|---|---|
| 535 | 535 | { |
| 536 | 536 | UINT32 size; |
| 537 | 537 | UINT8 *ptr = memory_region(image.device().machine, "maincpu"); |
| 538 | ||
| 538 | ||
| 539 | 539 | if (image.software_entry() == NULL) |
| 540 | 540 | { |
| 541 | 541 | size = image.length(); |
| r8990 | r8991 | |
| 547 | 547 | size = image.get_software_region_length("rom"); |
| 548 | 548 | memcpy(ptr + 0x2000, image.get_software_region("rom"), size); |
| 549 | 549 | } |
| 550 | ||
| 550 | ||
| 551 | 551 | return IMAGE_INIT_PASS; |
| 552 | 552 | } |
| 553 | 553 | |
| r8990 | r8991 | |
| 658 | 658 | ROM_SYSTEM_BIOS(0, "int", "International") |
| 659 | 659 | ROMX_LOAD("sordint.rom", 0x0000, 0x2000, CRC(78848d39) SHA1(ac042c4ae8272ad6abe09ae83492ef9a0026d0b2),ROM_BIOS(1)) |
| 660 | 660 | ROM_SYSTEM_BIOS(1, "jap", "Japanese") |
| 661 | ROMX_LOAD("sordjap.rom", 0x0000, 0x2000, CRC(92cf9353) SHA1(b0a4b3658fde68cb1f344dfb095bac16a78e9b3e),ROM_BIOS(2)) | |
| 661 | ROMX_LOAD("sordjap.rom", 0x0000, 0x2000, CRC(92cf9353) SHA1(b0a4b3658fde68cb1f344dfb095bac16a78e9b3e),ROM_BIOS(2)) | |
| 662 | 662 | ROM_END |
| 663 | 663 | |
| 664 | 664 |
| r8990 | r8991 | |
|---|---|---|
| 15 | 15 | running_device *beta = machine->device(BETA_DISK_TAG); |
| 16 | 16 | UINT16 pc = cpu_get_reg(machine->device("maincpu"), STATE_GENPCBASE); |
| 17 | 17 | address_space *space = cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM); |
| 18 | ||
| 18 | ||
| 19 | 19 | if (beta->started() && betadisk_is_active(beta)) |
| 20 | 20 | { |
| 21 | 21 | if (pc >= 0x4000) |
| r8990 | r8991 | |
| 38 | 38 | if (state->ROMSelection == 3) { |
| 39 | 39 | if (beta->started()) { |
| 40 | 40 | direct.explicit_configure(0x0000, 0x3fff, 0x3fff, memory_region(machine, "beta:beta")); |
| 41 | memory_set_bankptr(machine, "bank1", memory_region(machine, "beta:beta")); | |
| 41 | memory_set_bankptr(machine, "bank1", memory_region(machine, "beta:beta")); | |
| 42 | 42 | } |
| 43 | 43 | } else { |
| 44 | direct.explicit_configure(0x0000, 0x3fff, 0x3fff, memory_region(machine, "maincpu") + 0x010000 + (state->ROMSelection<<14)); | |
| 45 | memory_set_bankptr(machine, "bank1", memory_region(machine, "maincpu") + 0x010000 + (state->ROMSelection<<14)); | |
| 46 | } | |
| 44 | direct.explicit_configure(0x0000, 0x3fff, 0x3fff, memory_region(machine, "maincpu") + 0x010000 + (state->ROMSelection<<14)); | |
| 45 | memory_set_bankptr(machine, "bank1", memory_region(machine, "maincpu") + 0x010000 + (state->ROMSelection<<14)); | |
| 46 | } | |
| 47 | 47 | return ~0; |
| 48 | 48 | } |
| 49 | 49 | return address; |
| r8990 | r8991 | |
|---|---|---|
| 41 | 41 | */ |
| 42 | 42 | |
| 43 | 43 | /* |
| 44 | ||
| 45 | Undumped cartridges: | |
| 46 | ||
| 47 | 80-1410 Super Science | |
| 48 | 80-1533 Famous Things & Places | |
| 49 | 80-0989 Bible Knowledge | |
| 50 | 80-1001 Fantasy Trivia | |
| 51 | 80-1002 General Knowledge II | |
| 52 | 80-1003 Sports History | |
| 53 | 80-2314 Familiar Faces | |
| 54 | 80-2315 Historical Happenings | |
| 55 | 80-2333 Arts, Entertainment & More | |
| 56 | 80-2334 Customs & Cultures | |
| 57 | 80-1531 32K RAM Memory Expansion Cartridge | |
| 58 | 80-12051 Space Scholar | |
| 59 | 80-12053 Frenzy of Facts | |
| 60 | 80-12052 Spreadsheet Success | |
| 61 | 44 | |
| 45 | Undumped cartridges: | |
| 46 | ||
| 47 | 80-1410 Super Science | |
| 48 | 80-1533 Famous Things & Places | |
| 49 | 80-0989 Bible Knowledge | |
| 50 | 80-1001 Fantasy Trivia | |
| 51 | 80-1002 General Knowledge II | |
| 52 | 80-1003 Sports History | |
| 53 | 80-2314 Familiar Faces | |
| 54 | 80-2315 Historical Happenings | |
| 55 | 80-2333 Arts, Entertainment & More | |
| 56 | 80-2334 Customs & Cultures | |
| 57 | 80-1531 32K RAM Memory Expansion Cartridge | |
| 58 | 80-12051 Space Scholar | |
| 59 | 80-12053 Frenzy of Facts | |
| 60 | 80-12052 Spreadsheet Success | |
| 61 | ||
| 62 | 62 | */ |
| 63 | 63 | |
| 64 | 64 | /* |
| 65 | 65 | |
| 66 | ||
| 66 | TODO: | |
| 67 | 67 | |
| 68 | - identify unknown chips | |
| 69 | - boot animation won't play | |
| 70 | - keyboard | |
| 71 | - mouse | |
| 72 | - sound | |
| 73 | - cartridges | |
| 68 | - identify unknown chips | |
| 69 | - boot animation won't play | |
| 70 | - keyboard | |
| 71 | - mouse | |
| 72 | - sound | |
| 73 | - cartridges | |
| 74 | 74 | |
| 75 | 75 | */ |
| 76 | 76 |
| r8990 | r8991 | |
|---|---|---|
| 67 | 67 | PORT_CATEGORY_ITEM( 0x0010, "Gamepad", 2 ) |
| 68 | 68 | PORT_CATEGORY_ITEM( 0x0030, "Zapper", 6 ) |
| 69 | 69 | PORT_CATEGORY_ITEM( 0x0040, "Arkanoid paddle", 7 ) |
| 70 | // | |
| 70 | // PORT_CATEGORY_ITEM( 0x0050, "Family Trainer", 11 ) | |
| 71 | 71 | PORT_CATEGORY_CLASS( 0x0f00, 0x0000, "P3 Controller") |
| 72 | 72 | PORT_CATEGORY_ITEM( 0x0000, "Unconnected", 0 ) |
| 73 | 73 | PORT_CATEGORY_ITEM( 0x0100, "Gamepad", 3 ) |
| r8990 | r8991 | |
| 410 | 410 | PORT_CATEGORY_ITEM( 0x0010, "Gamepad", 2 ) |
| 411 | 411 | PORT_CATEGORY_ITEM( 0x0030, "Zapper", 6 ) |
| 412 | 412 | PORT_CATEGORY_ITEM( 0x0040, "Arkanoid paddle", 7 ) |
| 413 | // | |
| 413 | // PORT_CATEGORY_ITEM( 0x0050, "Family Trainer", 11 ) | |
| 414 | 414 | PORT_CATEGORY_CLASS( 0x0f00, 0x0000, "P3 Controller") |
| 415 | 415 | PORT_CATEGORY_ITEM( 0x0000, "Unconnected", 0 ) |
| 416 | 416 | PORT_CATEGORY_ITEM( 0x0100, "Gamepad", 3 ) |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | Fidelity Chess Challenger 10 | |
| 4 | ||
| 5 | More data : | |
| 6 | http://home.germany.net/nils.eilers/cc10.htm | |
| 3 | Fidelity Chess Challenger 10 | |
| 7 | 4 | |
| 5 | More data : | |
| 6 | http://home.germany.net/nils.eilers/cc10.htm | |
| 7 | ||
| 8 | 8 | 30/08/2010 Skeleton driver |
| 9 | ||
| 9 | ||
| 10 | 10 | ****************************************************************************/ |
| 11 | 11 | |
| 12 | 12 | #include "emu.h" |
| r8990 | r8991 | |
| 71 | 71 | |
| 72 | 72 | /* Driver */ |
| 73 | 73 | |
| 74 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 75 | COMP( 1978, cc10, 0, 0, cc10, cc10, 0, "Fidelity", "Chess Challenger 10", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 74 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ | |
| 75 | COMP( 1978, cc10, 0, 0, cc10, cc10, 0, "Fidelity", "Chess Challenger 10", GAME_NOT_WORKING | GAME_NO_SOUND) |
| r8990 | r8991 | |
|---|---|---|
| 409 | 409 | ROM_START( mz700j ) |
| 410 | 410 | ROM_REGION( 0x1000, "monitor", 0 ) |
| 411 | 411 | ROM_LOAD( "1z-009b.rom", 0x0000, 0x1000, CRC(ab1fbe6f) SHA1(7b10d7965c541393e33a265bcf71a00314d2db7a)) |
| 412 | ||
| 412 | ||
| 413 | 413 | ROM_REGION( 0x1000, "cgrom", 0 ) |
| 414 | //ROM_LOAD( "mz700fon.jp", 0x0000, 0x1000, CRC(697ec121) SHA1(5eb1d42d273b1fd2cab120486279ab8ff6c85dc7)) | |
| 414 | //ROM_LOAD( "mz700fon.jp", 0x0000, 0x1000, CRC(697ec121) SHA1(5eb1d42d273b1fd2cab120486279ab8ff6c85dc7)) | |
| 415 | 415 | ROM_LOAD( "mz700fon.jpn", 0x0000, 0x1000, CRC(425eedf5) SHA1(bd2cc750f2d2f63e50a59786668509e81a276e32) ) |
| 416 | 416 | ROM_END |
| 417 | 417 | |
| r8990 | r8991 | |
| 421 | 421 | ROM_END |
| 422 | 422 | |
| 423 | 423 | ROM_START( mz1500 ) |
| 424 | ROM_REGION( 0x4000, "monitor", 0 ) | |
| 424 | ROM_REGION( 0x4000, "monitor", 0 ) | |
| 425 | 425 | ROM_LOAD( "9z-502m.rom", 0x0000, 0x2800, CRC(643db428) SHA1(c2ad8af2ef00db32afde54d5741b07de5d4da16a)) |
| 426 | 426 | ROM_REGION( 0x1000, "cgrom", 0 ) |
| 427 | //ROM_LOAD( "mz700fon.jp", 0x0000, 0x1000, CRC(697ec121) SHA1(5eb1d42d273b1fd2cab120486279ab8ff6c85dc7)) | |
| 427 | //ROM_LOAD( "mz700fon.jp", 0x0000, 0x1000, CRC(697ec121) SHA1(5eb1d42d273b1fd2cab120486279ab8ff6c85dc7)) | |
| 428 | 428 | ROM_LOAD( "mz700fon.jpn", 0x0000, 0x1000, CRC(425eedf5) SHA1(bd2cc750f2d2f63e50a59786668509e81a276e32) ) |
| 429 | 429 | ROM_END |
| 430 | 430 |
| r8990 | r8991 | |
|---|---|---|
| 130 | 130 | MDRV_CARTSLOT_NOT_MANDATORY |
| 131 | 131 | MDRV_CARTSLOT_LOAD(vectrex_cart) |
| 132 | 132 | MDRV_CARTSLOT_INTERFACE("vectrex_cart") |
| 133 | ||
| 133 | ||
| 134 | 134 | /* software lists */ |
| 135 | 135 | MDRV_SOFTWARE_LIST_ADD("cart_list","vectrex") |
| 136 | 136 | MACHINE_CONFIG_END |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /************************************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | Toshiba Pasopia 7 (c) 1983 Toshiba | |
| 4 | 4 | |
| 5 | 5 | preliminary driver by Angelo Salese |
| 6 | 6 | |
| 7 | TODO: | |
| 8 | - floppy support (but floppy images are unobtainable at current time) | |
| 9 | - Z80PIO keyboard irq doesn't work at all, kludged keyboard inputs to work for now | |
| 10 | - advanced BASIC commands (width 80, circle, line ...) makes the emulation to go to la-la-land | |
| 11 | - some text garbage pops up in place, first example is when you type "10 for a=0 to n" | |
| 7 | TODO: | |
| 8 | - floppy support (but floppy images are unobtainable at current time) | |
| 9 | - Z80PIO keyboard irq doesn't work at all, kludged keyboard inputs to work for now | |
| 10 | - advanced BASIC commands (width 80, circle, line ...) makes the emulation to go to la-la-land | |
| 11 | - some text garbage pops up in place, first example is when you type "10 for a=0 to n" | |
| 12 | 12 | |
| 13 | 13 | ***************************************************************************************************/ |
| 14 | 14 | |
| r8990 | r8991 | |
| 97 | 97 | keyb_shift_press(KEYCODE_0, '='); |
| 98 | 98 | keyb_shift_press(KEYCODE_1, '!'); |
| 99 | 99 | keyb_shift_press(KEYCODE_2, '"'); |
| 100 | keyb_shift_press(KEYCODE_3, ' | |
| 100 | keyb_shift_press(KEYCODE_3, '?'); | |
| 101 | 101 | keyb_shift_press(KEYCODE_4, '$'); |
| 102 | 102 | keyb_shift_press(KEYCODE_5, '%'); |
| 103 | 103 | keyb_shift_press(KEYCODE_6, '&'); |
| r8990 | r8991 | |
| 197 | 197 | static UINT8 res; |
| 198 | 198 | |
| 199 | 199 | //if(!vram_sel) |
| 200 | // | |
| 200 | // return 0xff; | |
| 201 | 201 | |
| 202 | 202 | if(pal_sel && (plane_reg & 0x70) == 0x00) |
| 203 | 203 | return p7_pal[offset & 0xf]; |
| r8990 | r8991 | |
| 270 | 270 | |
| 271 | 271 | // bank4 is always RAM |
| 272 | 272 | |
| 273 | // | |
| 273 | // printf("%02x\n",data); | |
| 274 | 274 | } |
| 275 | 275 | |
| 276 | 276 | #if 0 |
| r8990 | r8991 | |
| 289 | 289 | UINT8 *pac2_ram2 = memory_region(space->machine, "rampac2"); |
| 290 | 290 | |
| 291 | 291 | /* |
| 292 | select register: | |
| 293 | 4 = ram1; | |
| 294 | 3 = ram2; | |
| 295 | 2 = kanji ROM; | |
| 296 | 1 = joy; | |
| 297 | anything else is nop | |
| 298 | */ | |
| 292 | select register: | |
| 293 | 4 = ram1; | |
| 294 | 3 = ram2; | |
| 295 | 2 = kanji ROM; | |
| 296 | 1 = joy; | |
| 297 | anything else is nop | |
| 298 | */ | |
| 299 | 299 | |
| 300 | 300 | |
| 301 | 301 | switch(offset) |
| r8990 | r8991 | |
| 387 | 387 | |
| 388 | 388 | io_port = offset & 0xff; //trim down to 8-bit bus |
| 389 | 389 | |
| 390 | if(io_port >= 0x08 && io_port <= 0x0b) | |
| 390 | if(io_port >= 0x08 && io_port <= 0x0b) | |
| 391 | 391 | else if(io_port >= 0x0c && io_port <= 0x0f) { return i8255a_r(space->machine->device("ppi8255_1"), (io_port-0x0c) & 3); } |
| 392 | // | |
| 392 | // else if(io_port == 0x10 || io_port == 0x11) { M6845 read } | |
| 393 | 393 | else if(io_port >= 0x18 && io_port <= 0x1b) { return pac2_r(space, io_port-0x18); } |
| 394 | 394 | else if(io_port >= 0x20 && io_port <= 0x23) { return i8255a_r(space->machine->device("ppi8255_2"), (io_port-0x20) & 3); } |
| 395 | 395 | else if(io_port >= 0x28 && io_port <= 0x2b) { return z80ctc_r(space->machine->device("ctc"), io_port-0x28); } |
| 396 | 396 | else if(io_port >= 0x30 && io_port <= 0x33) { return z80pio_cd_ba_r(space->machine->device("z80pio_0"), (io_port-0x30) & 3); } |
| 397 | // else if(io_port == 0x3a) { SN1 } | |
| 398 | // else if(io_port == 0x3b) { SN2 } | |
| 399 | // else if(io_port == 0x3c) { bankswitch } | |
| 400 | // else if(io_port >= 0xe0 && io_port <= 0xe6) { fdc } | |
| 397 | // else if(io_port == 0x3a) { SN1 } | |
| 398 | // else if(io_port == 0x3b) { SN2 } | |
| 399 | // else if(io_port == 0x3c) { bankswitch } | |
| 400 | // else if(io_port >= 0xe0 && io_port <= 0xe6) { fdc } | |
| 401 | 401 | else |
| 402 | 402 | { |
| 403 | 403 | logerror("(PC=%06x) Read i/o address %02x\n",cpu_get_pc(space->cpu),io_port); |
| r8990 | r8991 | |
| 419 | 419 | |
| 420 | 420 | io_port = offset & 0xff; //trim down to 8-bit bus |
| 421 | 421 | |
| 422 | if(io_port >= 0x08 && io_port <= 0x0b) | |
| 422 | if(io_port >= 0x08 && io_port <= 0x0b) | |
| 423 | 423 | else if(io_port >= 0x0c && io_port <= 0x0f) { i8255a_w(space->machine->device("ppi8255_1"), (io_port-0x0c) & 3, data); } |
| 424 | 424 | else if(io_port >= 0x10 && io_port <= 0x11) { pasopia7_6845_w(space, io_port-0x10, data); } |
| 425 | 425 | else if(io_port >= 0x18 && io_port <= 0x1b) { pac2_w(space, io_port-0x18, data); } |
| 426 | 426 | else if(io_port >= 0x20 && io_port <= 0x23) { i8255a_w(space->machine->device("ppi8255_2"), (io_port-0x20) & 3, data); } |
| 427 | 427 | else if(io_port >= 0x28 && io_port <= 0x2b) { z80ctc_w(space->machine->device("ctc"), io_port-0x28,data); } |
| 428 | 428 | else if(io_port >= 0x30 && io_port <= 0x33) { z80pio_cd_ba_w(space->machine->device("z80pio_0"), (io_port-0x30) & 3, data); } |
| 429 | else if(io_port == 0x3a) { sn76496_w(space->machine->device("sn1"), 0, data); } | |
| 430 | else if(io_port == 0x3b) { sn76496_w(space->machine->device("sn2"), 0, data); } | |
| 431 | else if(io_port == 0x3c) { pasopia7_memory_ctrl_w(space,0, data); } | |
| 432 | // else if(io_port >= 0xe0 && io_port <= 0xe6) { fdc } | |
| 429 | else if(io_port == 0x3a) { sn76496_w(space->machine->device("sn1"), 0, data); } | |
| 430 | else if(io_port == 0x3b) { sn76496_w(space->machine->device("sn2"), 0, data); } | |
| 431 | else if(io_port == 0x3c) { pasopia7_memory_ctrl_w(space,0, data); } | |
| 432 | // else if(io_port >= 0xe0 && io_port <= 0xe6) { fdc } | |
| 433 | 433 | else |
| 434 | 434 | { |
| 435 | 435 | logerror("(PC=%06x) Write i/o address %02x = %02x\n",cpu_get_pc(space->cpu),offset,data); |
| r8990 | r8991 | |
| 561 | 561 | static WRITE8_DEVICE_HANDLER( video_misc_w ) |
| 562 | 562 | { |
| 563 | 563 | /* |
| 564 | --x- ---- blinking | |
| 565 | ---x ---- attribute wrap | |
| 566 | ---- x--- pal disable | |
| 567 | ---- xx-- palette selector (both bits enables this, odd hook-up) | |
| 568 | */ | |
| 569 | // if(data & 2) | |
| 570 | // { | |
| 571 | // printf("VIDEO MISC %02x\n",data); | |
| 572 | // debugger_break(device->machine); | |
| 573 | // } | |
| 564 | --x- ---- blinking | |
| 565 | ---x ---- attribute wrap | |
| 566 | ---- x--- pal disable | |
| 567 | ---- xx-- palette selector (both bits enables this, odd hook-up) | |
| 568 | */ | |
| 569 | // if(data & 2) | |
| 570 | // { | |
| 571 | // printf("VIDEO MISC %02x\n",data); | |
| 572 | // debugger_break(device->machine); | |
| 573 | // } | |
| 574 | 574 | cursor_blink = data & 0x20; |
| 575 | 575 | attr_wrap = data & 0x10; |
| 576 | // | |
| 576 | // pal_sel = data & 0x02; | |
| 577 | 577 | } |
| 578 | 578 | |
| 579 | 579 | static WRITE8_DEVICE_HANDLER( nmi_mask_w ) |
| 580 | 580 | { |
| 581 | 581 | /* |
| 582 | --x- ---- (related to the data rec) | |
| 583 | ---x ---- data rec out | |
| 584 | ---- --x- sound off | |
| 585 | ---- ---x reset NMI (writes to port B = clears bits 1 & 2) (???) | |
| 586 | */ | |
| 587 | // printf("SYSTEM MISC %02x\n",data); | |
| 582 | --x- ---- (related to the data rec) | |
| 583 | ---x ---- data rec out | |
| 584 | ---- --x- sound off | |
| 585 | ---- ---x reset NMI (writes to port B = clears bits 1 & 2) (???) | |
| 586 | */ | |
| 587 | // printf("SYSTEM MISC %02x\n",data); | |
| 588 | 588 | |
| 589 | // if(data & 1) | |
| 590 | // i8255a_w(devtag_get_device(device->machine, "ppi8255_2"), 1, 0); | |
| 589 | // if(data & 1) | |
| 590 | // i8255a_w(devtag_get_device(device->machine, "ppi8255_2"), 1, 0); | |
| 591 | 591 | |
| 592 | 592 | } |
| 593 | 593 | |
| r8990 | r8991 | |
| 607 | 607 | static WRITE8_DEVICE_HANDLER( nmi_reg_w ) |
| 608 | 608 | { |
| 609 | 609 | /* |
| 610 | x--- ---- NMI mask | |
| 611 | -x-- ---- enable NMI regs (?) | |
| 612 | */ | |
| 610 | x--- ---- NMI mask | |
| 611 | -x-- ---- enable NMI regs (?) | |
| 612 | */ | |
| 613 | 613 | nmi_mask = data & 0x80; |
| 614 | 614 | nmi_enable_reg = data & 0x40; |
| 615 | 615 | |
| r8990 | r8991 | |
| 655 | 655 | |
| 656 | 656 | memory_set_bankptr(machine, "bank1", bios + 0x10000); |
| 657 | 657 | memory_set_bankptr(machine, "bank2", bios + 0x10000); |
| 658 | // memory_set_bankptr(machine, "bank3", bios + 0x10000); | |
| 659 | // memory_set_bankptr(machine, "bank4", bios + 0x10000); | |
| 658 | // memory_set_bankptr(machine, "bank3", bios + 0x10000); | |
| 659 | // memory_set_bankptr(machine, "bank4", bios + 0x10000); | |
| 660 | 660 | } |
| 661 | 661 | |
| 662 | 662 | static PALETTE_INIT( pasopia7 ) |
| r8990 | r8991 | |
| 686 | 686 | MDRV_CPU_ADD("maincpu",Z80, XTAL_4MHz) |
| 687 | 687 | MDRV_CPU_PROGRAM_MAP(paso7_mem) |
| 688 | 688 | MDRV_CPU_IO_MAP(paso7_io) |
| 689 | // | |
| 689 | // MDRV_CPU_VBLANK_INT("screen", irq0_line_hold) | |
| 690 | 690 | MDRV_CPU_CONFIG(p7_daisy) |
| 691 | 691 | |
| 692 | 692 | MDRV_Z80CTC_ADD( "ctc", XTAL_4MHz, ctc_intf ) |
| r8990 | r8991 | |
| 738 | 738 | ROM_LOAD( "kanji.rom", 0x0000, 0x20000, CRC(6109e308) SHA1(5c21cf1f241ef1fa0b41009ea41e81771729785f)) |
| 739 | 739 | |
| 740 | 740 | ROM_REGION( 0x8000, "rampac1", ROMREGION_ERASEFF ) |
| 741 | // | |
| 741 | // ROM_LOAD( "rampac1.bin", 0x0000, 0x8000, CRC(0e4f09bd) SHA1(4088906d57e4f6085a75b249a6139a0e2eb531a1) ) | |
| 742 | 742 | |
| 743 | 743 | ROM_REGION( 0x8000, "rampac2", ROMREGION_ERASEFF ) |
| 744 | // | |
| 744 | // ROM_LOAD( "rampac2.bin", 0x0000, 0x8000, CRC(0e4f09bd) SHA1(4088906d57e4f6085a75b249a6139a0e2eb531a1) ) | |
| 745 | 745 | ROM_END |
| 746 | 746 | |
| 747 | 747 | static DRIVER_INIT( paso7 ) |
| r8990 | r8991 | |
| 751 | 751 | /* Driver */ |
| 752 | 752 | |
| 753 | 753 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 754 | COMP( 1983, pasopia7, 0, 0, | |
| 754 | COMP( 1983, pasopia7, 0, 0, |
| r8990 | r8991 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | JR-200 (c) 1982 National / Panasonic |
| 4 | 4 | |
| 5 | ||
| 5 | preliminary driver by Roberto Zandon? and Angelo Salese | |
| 6 | 6 | |
| 7 | 7 | http://www.armchairarcade.com/neo/node/1598 |
| 8 | 8 | |
| 9 | TODO: | |
| 10 | - Timings are basically screwed, it takes too much to load the POST but | |
| 11 | then the cursor blink is too fast | |
| 12 | - keyboard MCU irq and data polling simulation should be inside a timer | |
| 13 | callback | |
| 14 | - MN1544 4-bit CPU core and ROM dump | |
| 9 | TODO: | |
| 10 | - Timings are basically screwed, it takes too much to load the POST but | |
| 11 | then the cursor blink is too fast | |
| 12 | - keyboard MCU irq and data polling simulation should be inside a timer | |
| 13 | callback | |
| 14 | - MN1544 4-bit CPU core and ROM dump | |
| 15 | 15 | |
| 16 | 16 | ****************************************************************************/ |
| 17 | 17 | |
| r8990 | r8991 | |
| 106 | 106 | if(attr & 0x80) //bitmap mode |
| 107 | 107 | { |
| 108 | 108 | /* |
| 109 | ||
| 109 | this mode draws 4 x 4 dot blocks, by combining lower 6 bits of tile and attribute vram | |
| 110 | 110 | |
| 111 | tile def | |
| 112 | 00xx x--- up-right | |
| 113 | 00-- -xxx up-left | |
| 114 | attr def | |
| 115 | 10xx x--- down-right | |
| 116 | 10-- -xxx down-left | |
| 117 | */ | |
| 111 | tile def | |
| 112 | 00xx x--- up-right | |
| 113 | 00-- -xxx up-left | |
| 114 | attr def | |
| 115 | 10xx x--- down-right | |
| 116 | 10-- -xxx down-left | |
| 117 | */ | |
| 118 | 118 | int step; |
| 119 | 119 | |
| 120 | 120 | step = ((xi & 4) ? 3 : 0); |
| r8990 | r8991 | |
| 178 | 178 | |
| 179 | 179 | static WRITE8_HANDLER( jr200_bios_char_w ) |
| 180 | 180 | { |
| 181 | // | |
| 181 | // static UINT8 *gfx = memory_region(space->machine, "gfx_ram"); | |
| 182 | 182 | |
| 183 | 183 | /* TODO: writing is presumably controlled by an I/O bit */ |
| 184 | // gfx[offset] = data; | |
| 185 | // gfx_element_mark_dirty(space->machine->gfx[0], offset >> 3); | |
| 184 | // gfx[offset] = data; | |
| 185 | // gfx_element_mark_dirty(space->machine->gfx[0], offset >> 3); | |
| 186 | 186 | } |
| 187 | 187 | |
| 188 | 188 | /* |
| r8990 | r8991 | |
| 258 | 258 | } |
| 259 | 259 | |
| 260 | 260 | static READ8_HANDLER( mn1271_io_r ) |
| 261 | { | |
| 261 | { | |
| 262 | 262 | UINT8 retVal = mn1271_ram[offset]; |
| 263 | if((offset+0xc800) > 0xca00) | |
| 263 | if((offset+0xc800) > 0xca00) | |
| 264 | 264 | retVal= 0xff; |
| 265 | 265 | |
| 266 | 266 | switch(offset+0xc800) |
| r8990 | r8991 | |
| 274 | 274 | case 0xc810: retVal= 0; break; |
| 275 | 275 | case 0xc816: retVal= 0x4e; break; |
| 276 | 276 | case 0xc81c: retVal= (mn1271_ram[0x1c] & 0xfe) | 1; break;//bit 0 needs to be high otherwise system refuses to boot |
| 277 | case 0xc81d: retVal= (mn1271_ram[0x1d] & 0xed); break; | |
| 277 | case 0xc81d: retVal= (mn1271_ram[0x1d] & 0xed); break; | |
| 278 | 278 | } |
| 279 | 279 | //logerror("mn1271_io_r [%04x] = %02x\n",offset+0xc800,retVal); |
| 280 | 280 | return retVal; |
| r8990 | r8991 | |
| 287 | 287 | { |
| 288 | 288 | case 0xc805: break; //LPT printer port W |
| 289 | 289 | case 0xc816: if (data!=0) { |
| 290 | timer_adjust_periodic(timer_d, attotime_zero, 0, attotime_mul(ATTOTIME_IN_HZ(XTAL_14_31818MHz), (mn1271_ram[0x17]*0x100 + mn1271_ram[0x18]))); | |
| 290 | timer_adjust_periodic(timer_d, attotime_zero, 0, attotime_mul(ATTOTIME_IN_HZ(XTAL_14_31818MHz), (mn1271_ram[0x17]*0x100 + mn1271_ram[0x18]))); | |
| 291 | 291 | } else { |
| 292 | timer_adjust_periodic(timer_d, attotime_zero, 0, attotime_zero); | |
| 292 | timer_adjust_periodic(timer_d, attotime_zero, 0, attotime_zero); | |
| 293 | 293 | } |
| 294 | 294 | break; |
| 295 | 295 | case 0xc819: jr200_beep_w(space,0,data); break; |
| r8990 | r8991 | |
| 315 | 315 | AM_RANGE(0xc400, 0xc4ff) AM_READWRITE(jr200_pcg_2_r,jr200_pcg_2_w) //PCG area (2) |
| 316 | 316 | AM_RANGE(0xc500, 0xc7ff) AM_RAM AM_BASE(&jr200_cram) |
| 317 | 317 | |
| 318 | // | |
| 318 | // 0xc800 - 0xcfff I / O area | |
| 319 | 319 | AM_RANGE(0xc800, 0xcfff) AM_READWRITE(mn1271_io_r,mn1271_io_w) AM_BASE(&mn1271_ram) |
| 320 | 320 | |
| 321 | 321 | AM_RANGE(0xd000, 0xd7ff) AM_READWRITE(jr200_bios_char_r,jr200_bios_char_w) //BIOS PCG RAM area |
| r8990 | r8991 | |
| 325 | 325 | |
| 326 | 326 | /* Input ports */ |
| 327 | 327 | static INPUT_PORTS_START( jr200 ) |
| 328 | // | |
| 328 | // PORT_BIT( 0x01, IP_ACTIVE_HIGH, IPT_VBLANK ) | |
| 329 | 329 | |
| 330 | 330 | PORT_START("ROW0") |
| 331 | 331 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_KEYBOARD ) PORT_NAME("HELP") PORT_CODE(KEYCODE_TILDE) |
| r8990 | r8991 | |
| 452 | 452 | static MACHINE_START(jr200) |
| 453 | 453 | { |
| 454 | 454 | beep_set_frequency(machine->device("beeper"),0); |
| 455 | beep_set_state(machine->device("beeper"),0); | |
| 455 | beep_set_state(machine->device("beeper"),0); | |
| 456 | 456 | timer_d = timer_alloc(machine, timer_d_callback, NULL); |
| 457 | 457 | } |
| 458 | 458 | |
| r8990 | r8991 | |
| 476 | 476 | MDRV_CPU_ADD("maincpu", M6802, XTAL_14_31818MHz / 4) /* MN1800A, ? Mhz assumption that it is same as JR-100*/ |
| 477 | 477 | MDRV_CPU_PROGRAM_MAP(jr200_mem) |
| 478 | 478 | |
| 479 | // | |
| 479 | // MDRV_CPU_ADD("mn1544", MN1544, ?) | |
| 480 | 480 | |
| 481 | 481 | MDRV_MACHINE_START(jr200) |
| 482 | 482 | MDRV_MACHINE_RESET(jr200) |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /************************************************************************************************************ |
| 2 | 2 | |
| 3 | ||
| 3 | Gundam RX-78 (c) 1983 Bandai | |
| 4 | 4 | |
| 5 | preliminary driver by Angelo Salese | |
| 6 | Monitor command list, and cassette interface added by Robbbert. | |
| 5 | preliminary driver by Angelo Salese | |
| 6 | Monitor command list, and cassette interface added by Robbbert. | |
| 7 | 7 | |
| 8 | TODO: | |
| 9 | - implement printer | |
| 10 | - caps lock doesn't seem quite right, I need to press it twice to have the desired effect; | |
| 8 | TODO: | |
| 9 | - implement printer | |
| 10 | - caps lock doesn't seem quite right, I need to press it twice to have the desired effect; | |
| 11 | 11 | |
| 12 | Notes: | |
| 13 | - BS-BASIC v1.0 have a graphic bug with the RX-78 logo, it doesn't set the read bank so all of the color | |
| 14 | info minus plane 1 is lost when the screen scrolls vertically. Almost certainly a btanb. | |
| 15 | - To stop a cmt load, press STOP + SHIFT keys | |
| 12 | Notes: | |
| 13 | - BS-BASIC v1.0 have a graphic bug with the RX-78 logo, it doesn't set the read bank so all of the color | |
| 14 | info minus plane 1 is lost when the screen scrolls vertically. Almost certainly a btanb. | |
| 15 | - To stop a cmt load, press STOP + SHIFT keys | |
| 16 | 16 | |
| 17 | 17 | ============================================================================================================== |
| 18 | Summary of Monitor commands. | |
| 19 | - The monitor is entered at bootup. The prompt is the * character. This is followed by a command | |
| 20 | letter (upper case). Some commands require hex parameters. You must enter all 4 characters of | |
| 21 | these. No spaces allowed except where shown. | |
| 22 | - While in BASIC, you may enter the monitor by using the MON command. After you have finished, | |
| 23 | you can return to BASIC by entering the command *J2005. | |
| 18 | Summary of Monitor commands. | |
| 19 | - The monitor is entered at bootup. The prompt is the * character. This is followed by a command | |
| 20 | letter (upper case). Some commands require hex parameters. You must enter all 4 characters of | |
| 21 | these. No spaces allowed except where shown. | |
| 22 | - While in BASIC, you may enter the monitor by using the MON command. After you have finished, | |
| 23 | you can return to BASIC by entering the command *J2005. | |
| 24 | 24 | |
| 25 | - Tape commands: | |
| 26 | *L Load a tape | |
| 27 | *V Verify a tape | |
| 28 | *S Save a block of memory to tape. You are asked for a filename (blank is allowed), the start address, | |
| 29 | the end address, and the Jump address (where it should begin execution) | |
| 25 | - Tape commands: | |
| 26 | *L Load a tape | |
| 27 | *V Verify a tape | |
| 28 | *S Save a block of memory to tape. You are asked for a filename (blank is allowed), the start address, | |
| 29 | the end address, and the Jump address (where it should begin execution) | |
| 30 | 30 | |
| 31 | - Memory commands: | |
| 32 | *Dnnnn nnnn Displays a hex dump in the address range entered | |
| 33 | *Mnnnn Allows you to examine and modify memory. Enter to skip to next, period (.) to quit. | |
| 34 | *Jnnnn Transfer execution (Jump) to a program in memory at the specified address | |
| 31 | - Memory commands: | |
| 32 | *Dnnnn nnnn Displays a hex dump in the address range entered | |
| 33 | *Mnnnn Allows you to examine and modify memory. Enter to skip to next, period (.) to quit. | |
| 34 | *Jnnnn Transfer execution (Jump) to a program in memory at the specified address | |
| 35 | 35 | |
| 36 | - Other: | |
| 37 | *R This is a block transfer load from a mystery parallel device, using ports E0 and E1, | |
| 38 | using handshaking similar to a centronics printer. The incoming file is loaded into | |
| 39 | memory and it appears that the operator is not provided any information of what happened. | |
| 36 | - Other: | |
| 37 | *R This is a block transfer load from a mystery parallel device, using ports E0 and E1, | |
| 38 | using handshaking similar to a centronics printer. The incoming file is loaded into | |
| 39 | memory and it appears that the operator is not provided any information of what happened. | |
| 40 | 40 | |
| 41 | 41 | *************************************************************************************************************/ |
| 42 | 42 | |
| r8990 | r8991 | |
| 234 | 234 | static ADDRESS_MAP_START( rx78_io , ADDRESS_SPACE_IO, 8) |
| 235 | 235 | ADDRESS_MAP_UNMAP_HIGH |
| 236 | 236 | ADDRESS_MAP_GLOBAL_MASK(0xff) |
| 237 | // AM_RANGE(0xe2, 0xe2) AM_READNOP AM_WRITENOP //printer | |
| 238 | // AM_RANGE(0xe3, 0xe3) AM_WRITENOP //printer | |
| 237 | // AM_RANGE(0xe2, 0xe2) AM_READNOP AM_WRITENOP //printer | |
| 238 | // AM_RANGE(0xe3, 0xe3) AM_WRITENOP //printer | |
| 239 | 239 | AM_RANGE(0xf0, 0xf0) AM_READWRITE(rx78_f0_r,rx78_f0_w) //cmt |
| 240 | 240 | AM_RANGE(0xf1, 0xf1) AM_WRITE(vram_read_bank_w) |
| 241 | 241 | AM_RANGE(0xf2, 0xf2) AM_WRITE(vram_write_bank_w) |
| r8990 | r8991 | |
| 495 | 495 | /* Driver */ |
| 496 | 496 | |
| 497 | 497 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 498 | COMP( 1983, rx78, | |
| 498 | COMP( 1983, rx78, | |
| 499 | 499 |
| r8990 | r8991 | |
|---|---|---|
| 1979 | 1979 | /* |
| 1980 | 1980 | supracan_state *state = (supracan_state *)device->machine->driver_data<supracan_state>(); |
| 1981 | 1981 | |
| 1982 | ||
| 1982 | if(state->irq_mask) | |
| 1983 | 1983 | { |
| 1984 | ||
| 1984 | cpu_set_input_line(device, 7, HOLD_LINE); | |
| 1985 | 1985 | } |
| 1986 | 1986 | */ |
| 1987 | 1987 | } |
| r8990 | r8991 | |
|---|---|---|
| 179 | 179 | static MACHINE_CONFIG_DERIVED( bebox2, bebox ) |
| 180 | 180 | MDRV_CPU_REPLACE("ppc1", PPC603E, 133000000) /* 133 MHz */ |
| 181 | 181 | MDRV_CPU_PROGRAM_MAP(bebox_mem) |
| 182 | ||
| 182 | ||
| 183 | 183 | MDRV_CPU_REPLACE("ppc2", PPC603E, 133000000) /* 133 MHz */ |
| 184 | 184 | MDRV_CPU_PROGRAM_MAP(bebox_slave_mem) |
| 185 | 185 | MACHINE_CONFIG_END |
| r8990 | r8991 | |
|---|---|---|
| 42 | 42 | spectrum_state *state = machine->driver_data<spectrum_state>(); |
| 43 | 43 | if (state->ram_at_0000 && address == 0x66) |
| 44 | 44 | { |
| 45 | direct.explicit_configure(0x66, 0x66, 0, &state->df_on_databus); | |
| 45 | direct.explicit_configure(0x66, 0x66, 0, &state->df_on_databus); | |
| 46 | 46 | return ~0; |
| 47 | 47 | } |
| 48 | 48 | return address; |
| r8990 | r8991 | |
|---|---|---|
| 40 | 40 | public: |
| 41 | 41 | static driver_data_t *alloc(running_machine &machine) { return auto_alloc_clear(&machine, pv2000_state(machine)); } |
| 42 | 42 | |
| 43 | pv2000_state(running_machine &machine) | |
| 43 | pv2000_state(running_machine &machine) | |
| 44 | 44 | : driver_data_t(machine) { last_state = 0; } |
| 45 | 45 | |
| 46 | 46 | int last_state; |
| r8990 | r8991 | |
| 196 | 196 | AM_RANGE(0x40, 0x40) AM_READ(pv2000_keys_mod_r) AM_DEVWRITE("sn76489a", sn76496_w) |
| 197 | 197 | |
| 198 | 198 | /* Cassette input. Gets hit a lot after a GLOAD command */ |
| 199 | // | |
| 199 | // AM_RANGE(0x60, 0x60) | |
| 200 | 200 | ADDRESS_MAP_END |
| 201 | 201 | |
| 202 | 202 | |
| r8990 | r8991 | |
| 443 | 443 | MDRV_CARTSLOT_EXTENSION_LIST("rom,col,bin") |
| 444 | 444 | MDRV_CARTSLOT_NOT_MANDATORY |
| 445 | 445 | MDRV_CARTSLOT_LOAD(pv2000_cart) |
| 446 | MDRV_CARTSLOT_INTERFACE("pv2000_cart") | |
| 447 | ||
| 446 | MDRV_CARTSLOT_INTERFACE("pv2000_cart") | |
| 447 | ||
| 448 | 448 | /* Software lists */ |
| 449 | MDRV_SOFTWARE_LIST_ADD("cart_list","pv2000") | |
| 449 | MDRV_SOFTWARE_LIST_ADD("cart_list","pv2000") | |
| 450 | 450 | MACHINE_CONFIG_END |
| 451 | 451 | |
| 452 | 452 |
| r8990 | r8991 | |
|---|---|---|
| 557 | 557 | |
| 558 | 558 | static MACHINE_CONFIG_DERIVED( pyl601a, pyl601 ) |
| 559 | 559 | MDRV_CPU_MODIFY("maincpu") |
| 560 | MDRV_CPU_CLOCK( XTAL_2MHz) | |
| 561 | ||
| 560 | MDRV_CPU_CLOCK( XTAL_2MHz) | |
| 561 | ||
| 562 | 562 | MDRV_GFXDECODE(pyl601a) |
| 563 | 563 | MDRV_DEVICE_REMOVE("crtc") |
| 564 | 564 | MDRV_MC6845_ADD("crtc", MC6845, XTAL_2MHz, pyl601a_crtc6845_interface) |
| r8990 | r8991 | |
|---|---|---|
| 41 | 41 | * |
| 42 | 42 | *****************************************************************************/ |
| 43 | 43 | /* |
| 44 | DASM of code (bios 2 / RISC OS 2) | |
| 45 | 0x380d4e0: MEMC: control to 0x10c (page size 32 kbytes, DRAM ram refresh only during flyback) | |
| 46 | 0x380d4f0: VIDC: params (screen + sound frequency) | |
| 47 | 0x380d51c: IOC: sets control to 0xff, clear IRQA and FIQ masks, sets IRQB mask to 0x80 (keyboard receive full irq) | |
| 48 | 0x380d530: IOC: sets timer 0 to 0x4e20, go command | |
| 49 | 0x380e0a8: work RAM physical check, max size etc. | |
| 50 | 0x380e1f8: IOC: Disables DRAM ram refresh, sets timer 1 to 0x7ffe, go command, then it tests the latch of this timer, enables DRAM refresh | |
| 51 | 0x380d00c: Set up default logical space | |
| 52 | 0x380d16c: Set up case by case logical space | |
| 44 | DASM of code (bios 2 / RISC OS 2) | |
| 45 | 0x380d4e0: MEMC: control to 0x10c (page size 32 kbytes, DRAM ram refresh only during flyback) | |
| 46 | 0x380d4f0: VIDC: params (screen + sound frequency) | |
| 47 | 0x380d51c: IOC: sets control to 0xff, clear IRQA and FIQ masks, sets IRQB mask to 0x80 (keyboard receive full irq) | |
| 48 | 0x380d530: IOC: sets timer 0 to 0x4e20, go command | |
| 49 | 0x380e0a8: work RAM physical check, max size etc. | |
| 50 | 0x380e1f8: IOC: Disables DRAM ram refresh, sets timer 1 to 0x7ffe, go command, then it tests the latch of this timer, enables DRAM refresh | |
| 51 | 0x380d00c: Set up default logical space | |
| 52 | 0x380d16c: Set up case by case logical space | |
| 53 | 53 | |
| 54 | 54 | |
| 55 | 55 | */ |
| r8990 | r8991 | |
| 117 | 117 | |
| 118 | 118 | static ADDRESS_MAP_START( a310_mem, ADDRESS_SPACE_PROGRAM, 32 ) |
| 119 | 119 | AM_RANGE(0x00000000, 0x01ffffff) AM_READWRITE(archimedes_memc_logical_r, archimedes_memc_logical_w) |
| 120 | // | |
| 120 | // AM_RANGE(0x02000000, 0x02ffffff) AM_RAM AM_BASE(&archimedes_memc_physmem) /* physical RAM - 16 MB for now, should be 512k for the A310 */ | |
| 121 | 121 | AM_RANGE(0x03000000, 0x033fffff) AM_READWRITE(archimedes_ioc_r, archimedes_ioc_w) |
| 122 | 122 | AM_RANGE(0x03400000, 0x035fffff) AM_READWRITE(archimedes_vidc_r, archimedes_vidc_w) |
| 123 | 123 | AM_RANGE(0x03600000, 0x037fffff) AM_READWRITE(archimedes_memc_r, archimedes_memc_w) |
| r8990 | r8991 | |
|---|---|---|
| 403 | 403 | opbase_ptr = avigo_banked_opbase[address / 0x4000]; |
| 404 | 404 | if (opbase_ptr != NULL) |
| 405 | 405 | { |
| 406 | direct.explicit_configure(0x0000, 0xffff, 0xffff, (UINT8*)opbase_ptr); | |
| 406 | direct.explicit_configure(0x0000, 0xffff, 0xffff, (UINT8*)opbase_ptr); | |
| 407 | 407 | address = ~0; |
| 408 | 408 | } |
| 409 | 409 | return address; |
| r8990 | r8991 | |
|---|---|---|
| 985 | 985 | COMP(1983, pet64, c64, 0, pet64, c64, c64, "Commodore Business Machines", "PET 64 (NTSC)", 0) |
| 986 | 986 | COMP(1983, cbm4064, c64, 0, pet64, c64, c64, "Commodore Business Machines", "CBM 4064 (NTSC)", 0) |
| 987 | 987 | COMP(1983, edu64, c64, 0, pet64, c64, c64, "Commodore Business Machines", "Educator 64 (NTSC)", 0) // maybe different palette? |
| 988 | //COMP(1983, clipper, c64, 0, c64pal, clipper, c64pal, "PDC", "Clipper", GAME_NOT_WORKING) // C64 in a briefcase with 3" floppy, electroluminescent flat screen, thermal printer | |
| 989 | //COMP(1983, tesa6240, c64, 0, c64pal, c64, c64pal, "Tesa", "6240", GAME_NOT_WORKING) // modified SX64 with label printer | |
| 988 | //COMP(1983, clipper, c64, 0, c64pal, clipper, c64pal, "PDC", "Clipper", GAME_NOT_WORKING) // C64 in a briefcase with 3" floppy, electroluminescent flat screen, thermal printer | |
| 989 | //COMP(1983, tesa6240, c64, 0, c64pal, c64, c64pal, "Tesa", "6240", GAME_NOT_WORKING) // modified SX64 with label printer | |
| 990 | 990 | |
| 991 | 991 | COMP(1984, sx64, c64, 0, sx64, c64, sx64, "Commodore Business Machines", "SX-64 Executive Computer (PAL)", GAME_NOT_WORKING) |
| 992 | 992 | COMP(1984, vip64, c64, 0, sx64, vip64, sx64, "Commodore Business Machines", "VIP64 (SX64 PAL), Swedish Expansion Kit", GAME_NOT_WORKING) |
| r8990 | r8991 | |
|---|---|---|
| 418 | 418 | AM_RANGE(0xc8000, 0xc9fff) AM_ROM |
| 419 | 419 | AM_RANGE(0xca000, 0xcffff) AM_NOP |
| 420 | 420 | AM_RANGE(0xe0000, 0xeffff) AM_NOP |
| 421 | AM_RANGE(0xf8000, 0xfffff) AM_ROM | |
| 421 | AM_RANGE(0xf8000, 0xfffff) AM_ROM | |
| 422 | 422 | ADDRESS_MAP_END |
| 423 | 423 | |
| 424 | 424 |
| r8990 | r8991 | |
|---|---|---|
| 21 | 21 | |
| 22 | 22 | TODO: |
| 23 | 23 | |
| 24 | ||
| 24 | - fix direct update handler to make system work again | |
| 25 | 25 | - display interface INH |
| 26 | 26 | - 2 segment display |
| 27 | 27 | - single step |
| r8990 | r8991 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | Psion Organiser II series |
| 4 | 4 | |
| 5 | ||
| 5 | Driver by Sandro Ronco | |
| 6 | 6 | |
| 7 | TODO: | |
| 8 | - implement Datapack read/write interface | |
| 9 | - add save state and NVRAM | |
| 10 | - dump CGROM of the HD44780 | |
| 11 | - move HD44780 implementation in a device | |
| 7 | TODO: | |
| 8 | - implement Datapack read/write interface | |
| 9 | - add save state and NVRAM | |
| 10 | - dump CGROM of the HD44780 | |
| 11 | - move HD44780 implementation in a device | |
| 12 | 12 | |
| 13 | Note: | |
| 14 | - 4 lines display has an custom LCD controller derived from an HD66780 | |
| 15 | - NVRAM works only if the machine is turned off (with OFF menu) before closing MESS | |
| 13 | Note: | |
| 14 | - 4 lines display has an custom LCD controller derived from an HD66780 | |
| 15 | - NVRAM works only if the machine is turned off (with OFF menu) before closing MESS | |
| 16 | 16 | |
| 17 | 17 | 16/07/2010 Skeleton driver. |
| 18 | 18 | |
| 19 | Memory map info : | |
| 20 | http://archive.psion2.org/org2/techref/memory.htm | |
| 19 | Memory map info : | |
| 20 | http://archive.psion2.org/org2/techref/memory.htm | |
| 21 | 21 | |
| 22 | 22 | ****************************************************************************/ |
| 23 | 23 | |
| r8990 | r8991 | |
| 315 | 315 | struct datapack *pack = get_active_slot(machine, psion.port6); |
| 316 | 316 | |
| 317 | 317 | if (pack != NULL && pack->len > 0 && !(psion.port6 & 0x80)) |
| 318 | ||
| 318 | ||
| 319 | 319 | UINT32 pack_addr = pack->counter + ((pack->id & 0x04) ? 0x100 * pack->page : 0); |
| 320 | 320 | |
| 321 | 321 | if (pack_addr < pack->len * 0x2000) |
| 322 | 322 | return pack->data[pack_addr]; |
| 323 | ||
| 323 | ||
| 324 | 324 | |
| 325 | 325 | return 0; |
| 326 | 326 | } |
| r8990 | r8991 | |
| 347 | 347 | break; |
| 348 | 348 | case 0x17: |
| 349 | 349 | /* |
| 350 | datapack control lines | |
| 351 | x--- ---- slot on/off | |
| 352 | -x-- ---- slot 3 | |
| 353 | --x- ---- slot 2 | |
| 354 | ---x ---- slot 1 | |
| 355 | ---- x--- output enable | |
| 356 | ---- -x-- program line | |
| 357 | ---- --x- reset line | |
| 358 | ---- ---x clock line | |
| 359 | */ | |
| 350 | datapack control lines | |
| 351 | x--- ---- slot on/off | |
| 352 | -x-- ---- slot 3 | |
| 353 | --x- ---- slot 2 | |
| 354 | ---x ---- slot 1 | |
| 355 | ---- x--- output enable | |
| 356 | ---- -x-- program line | |
| 357 | ---- --x- reset line | |
| 358 | ---- ---x clock line | |
| 359 | */ | |
| 360 | 360 | if (psion.port6_ddr == 0xff) |
| 361 | 361 | { |
| 362 | 362 | struct datapack *pack = get_active_slot(space->machine, data); |
| 363 | 363 | |
| 364 | 364 | if (pack != NULL) |
| 365 | ||
| 365 | ||
| 366 | 366 | if ((psion.port6 & 0x01) != (data & 0x01)) |
| 367 | 367 | { |
| 368 | 368 | pack->counter++; |
| r8990 | r8991 | |
| 384 | 384 | pack->counter = 0; |
| 385 | 385 | pack->page = 0; |
| 386 | 386 | } |
| 387 | ||
| 387 | ||
| 388 | 388 | |
| 389 | 389 | psion.port6 = data; |
| 390 | 390 | } |
| r8990 | r8991 | |
| 405 | 405 | return (hd63701_internal_registers_r(space, offset)&0x7f) | (psion.stby_pwr<<7); |
| 406 | 406 | case 0x15: |
| 407 | 407 | /* |
| 408 | x--- ---- ON key active high | |
| 409 | -xxx xx-- keys matrix active low | |
| 410 | ---- --x- ?? | |
| 411 | ---- ---x battery status | |
| 412 | */ | |
| 408 | x--- ---- ON key active high | |
| 409 | -xxx xx-- keys matrix active low | |
| 410 | ---- --x- ?? | |
| 411 | ---- ---x battery status | |
| 412 | */ | |
| 413 | 413 | return kb_read(space->machine) | input_port_read(space->machine, "BATTERY") | input_port_read(space->machine, "ON") | (psion.kb_counter == 0x7ff)<<1; |
| 414 | 414 | case 0x17: |
| 415 | 415 | return psion.port6; |
| r8990 | r8991 | |
| 1085 | 1085 | /* Driver */ |
| 1086 | 1086 | |
| 1087 | 1087 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 1088 | COMP( 1986, psioncm, 0, 0, psioncm, psion, 0, "Psion", "Organiser II CM", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1089 | COMP( 198?, psionla, psioncm, 0, psionla, psion, 0, "Psion", "Organiser II LA", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1090 | COMP( 198?, psionp350, psioncm, 0, psionp350, psion, 0, "Psion", "Organiser II P350", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1091 | COMP( 198?, psionlam, psioncm, 0, psionlam, psion, 0, "Psion", "Organiser II LAM", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1092 | COMP( 1989, psionlz64, psioncm, 0, psionlz, psion, 0, "Psion", "Organiser II LZ64", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1093 | COMP( 1989, psionlz64s, psioncm, 0, psionlz, psion, 0, "Psion", "Organiser II LZ64S", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1094 | COMP( 1989, psionlz, psioncm, 0, psionlz, psion, 0, "Psion", "Organiser II LZ", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1095 | COMP( 198?, psionp464, psioncm, 0, psionlz, psion, 0, "Psion", "Organiser II P464", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1088 | COMP( 1986, psioncm, 0, 0, psioncm, psion, 0, "Psion", "Organiser II CM", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1089 | COMP( 198?, psionla, psioncm, 0, psionla, psion, 0, "Psion", "Organiser II LA", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1090 | COMP( 198?, psionp350, psioncm, 0, psionp350, psion, 0, "Psion", "Organiser II P350", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1091 | COMP( 198?, psionlam, psioncm, 0, psionlam, psion, 0, "Psion", "Organiser II LAM", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1092 | COMP( 1989, psionlz64, psioncm, 0, psionlz, psion, 0, "Psion", "Organiser II LZ64", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1093 | COMP( 1989, psionlz64s, psioncm, 0, psionlz, psion, 0, "Psion", "Organiser II LZ64S", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1094 | COMP( 1989, psionlz, psioncm, 0, psionlz, psion, 0, "Psion", "Organiser II LZ", GAME_NOT_WORKING | GAME_NO_SOUND) | |
| 1095 | COMP( 198?, psionp464, psioncm, 0, psionlz, psion, 0, "Psion", "Organiser II P464", GAME_NOT_WORKING | GAME_NO_SOUND) |
| r8990 | r8991 | |
|---|---|---|
| 2472 | 2472 | |
| 2473 | 2473 | static DRIVER_INIT(gbadv) |
| 2474 | 2474 | { |
| 2475 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(gba_direct, *machine)); | |
| 2475 | cputag_get_address_space(machine, "maincpu", ADDRESS_SPACE_PROGRAM)->set_direct_update_handler(direct_update_delegate_create_static(gba_direct, *machine)); | |
| 2476 | 2476 | } |
| 2477 | 2477 | |
| 2478 | 2478 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME */ |
| r8990 | r8991 | |
|---|---|---|
| 1 | 1 | /*************************************************************************** |
| 2 | 2 | |
| 3 | ||
| 3 | Basic Master Jr (MB-6885) (c) 1982? Hitachi | |
| 4 | 4 | |
| 5 | ||
| 5 | preliminary driver by Angelo Salese | |
| 6 | 6 | |
| 7 | TODO: | |
| 8 | - for whatever reason, BASIC won't work if you try to use it directly, | |
| 9 | it does if you enter into MON first then exit (with E) | |
| 10 | - tape hook-up doesn't work yet (shouldn't be hard to fix) | |
| 11 | - Break key is unemulated (tied with the NMI) | |
| 7 | TODO: | |
| 8 | - for whatever reason, BASIC won't work if you try to use it directly, | |
| 9 | it does if you enter into MON first then exit (with E) | |
| 10 | - tape hook-up doesn't work yet (shouldn't be hard to fix) | |
| 11 | - Break key is unemulated (tied with the NMI) | |
| 12 | 12 | |
| 13 | 13 | ****************************************************************************/ |
| 14 | 14 | |
| r8990 | r8991 | |
| 79 | 79 | { |
| 80 | 80 | key_mux = data & 0xf; |
| 81 | 81 | |
| 82 | // if(data & 0xf0) | |
| 83 | // printf("%02x",data & 0xf0); | |
| 82 | // if(data & 0xf0) | |
| 83 | // printf("%02x",data & 0xf0); | |
| 84 | 84 | } |
| 85 | 85 | |
| 86 | 86 | static running_device *bmjr_cassette; |
| r8990 | r8991 | |
| 143 | 143 | AM_RANGE(0x0000, 0xafff) AM_RAM AM_BASE(&wram) |
| 144 | 144 | AM_RANGE(0xb000, 0xdfff) AM_ROM |
| 145 | 145 | AM_RANGE(0xe000, 0xe7ff) AM_ROM |
| 146 | // AM_RANGE(0xe890, 0xe890) W MP-1710 tile color | |
| 147 | // AM_RANGE(0xe891, 0xe891) W MP-1710 background color | |
| 148 | // AM_RANGE(0xe892, 0xe892) W MP-1710 monochrome / color setting | |
| 146 | // AM_RANGE(0xe890, 0xe890) W MP-1710 tile color | |
| 147 | // AM_RANGE(0xe891, 0xe891) W MP-1710 background color | |
| 148 | // AM_RANGE(0xe892, 0xe892) W MP-1710 monochrome / color setting | |
| 149 | 149 | AM_RANGE(0xee00, 0xee00) AM_READ(tape_stop_r) //R stop tape |
| 150 | 150 | AM_RANGE(0xee20, 0xee20) AM_READ(tape_start_r) //R start tape |
| 151 | 151 | AM_RANGE(0xee40, 0xee40) AM_WRITE(xor_display_w) //W Picture reverse |
| r8990 | r8991 | |
| 154 | 154 | AM_RANGE(0xef00, 0xef00) AM_READ(ff_r) //R timer |
| 155 | 155 | AM_RANGE(0xef40, 0xef40) AM_READ(ff_r) //R unknown |
| 156 | 156 | AM_RANGE(0xef80, 0xef80) AM_READ(unk_r) //R unknown |
| 157 | // | |
| 157 | // AM_RANGE(0xefe0, 0xefe0) W screen mode | |
| 158 | 158 | AM_RANGE(0xf000, 0xffff) AM_ROM |
| 159 | 159 | ADDRESS_MAP_END |
| 160 | 160 | |
| r8990 | r8991 | |
| 367 | 367 | } |
| 368 | 368 | |
| 369 | 369 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT COMPANY FULLNAME FLAGS */ |
| 370 | COMP( 1982, bmjr, | |
| 370 | COMP( 1982, bmjr, | |
| 371 | 371 |
| Previous | 15994 Revisions | Next |