trunk/src/emu/video/resnet.c
| r17723 | r17724 | |
| 491 | 491 | /* Fall through */ |
| 492 | 492 | break; |
| 493 | 493 | default: |
| 494 | | fatalerror("compute_res_net: Unknown amplifier type"); |
| 494 | fatalerror("compute_res_net: Unknown amplifier type\n"); |
| 495 | 495 | } |
| 496 | 496 | |
| 497 | 497 | switch (di->options & RES_NET_VCC_MASK) |
| r17723 | r17724 | |
| 503 | 503 | /* Fall through */ |
| 504 | 504 | break; |
| 505 | 505 | default: |
| 506 | | fatalerror("compute_res_net: Unknown vcc type"); |
| 506 | fatalerror("compute_res_net: Unknown vcc type\n"); |
| 507 | 507 | } |
| 508 | 508 | |
| 509 | 509 | switch (di->options & RES_NET_VBIAS_MASK) |
| r17723 | r17724 | |
| 521 | 521 | /* Fall through */ |
| 522 | 522 | break; |
| 523 | 523 | default: |
| 524 | | fatalerror("compute_res_net: Unknown vcc type"); |
| 524 | fatalerror("compute_res_net: Unknown vcc type\n"); |
| 525 | 525 | } |
| 526 | 526 | |
| 527 | 527 | switch (di->options & RES_NET_VIN_MASK) |
| r17723 | r17724 | |
| 548 | 548 | /* Fall through */ |
| 549 | 549 | break; |
| 550 | 550 | default: |
| 551 | | fatalerror("compute_res_net: Unknown vin type"); |
| 551 | fatalerror("compute_res_net: Unknown vin type\n"); |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | /* Per channel options */ |
| r17723 | r17724 | |
| 574 | 574 | /* Fall through */ |
| 575 | 575 | break; |
| 576 | 576 | default: |
| 577 | | fatalerror("compute_res_net: Unknown amplifier type"); |
| 577 | fatalerror("compute_res_net: Unknown amplifier type\n"); |
| 578 | 578 | } |
| 579 | 579 | |
| 580 | 580 | switch (di->rgb[channel].options & RES_NET_VBIAS_MASK) |
| r17723 | r17724 | |
| 592 | 592 | /* Fall through */ |
| 593 | 593 | break; |
| 594 | 594 | default: |
| 595 | | fatalerror("compute_res_net: Unknown vcc type"); |
| 595 | fatalerror("compute_res_net: Unknown vcc type\n"); |
| 596 | 596 | } |
| 597 | 597 | |
| 598 | 598 | /* Input impedances */ |
trunk/src/emu/video/voodoo.c
| r17723 | r17724 | |
| 1448 | 1448 | |
| 1449 | 1449 | /* check for separate RGBA filtering */ |
| 1450 | 1450 | if (TEXDETAIL_SEPARATE_RGBA_FILTER(t->reg[tDetail].u)) |
| 1451 | | fatalerror("Separate RGBA filters!"); |
| 1451 | fatalerror("Separate RGBA filters!\n"); |
| 1452 | 1452 | } |
| 1453 | 1453 | |
| 1454 | 1454 | |
| r17723 | r17724 | |
| 1682 | 1682 | |
| 1683 | 1683 | case 2: /* RET */ |
| 1684 | 1684 | if (LOG_CMDFIFO) logerror(" RET $%06X\n", target); |
| 1685 | | fatalerror("RET in CMDFIFO!"); |
| 1685 | fatalerror("RET in CMDFIFO!\n"); |
| 1686 | 1686 | break; |
| 1687 | 1687 | |
| 1688 | 1688 | case 3: /* JMP LOCAL FRAME BUFFER */ |
| r17723 | r17724 | |
| 1692 | 1692 | |
| 1693 | 1693 | case 4: /* JMP AGP */ |
| 1694 | 1694 | if (LOG_CMDFIFO) logerror(" JMP AGP $%06X\n", target); |
| 1695 | | fatalerror("JMP AGP in CMDFIFO!"); |
| 1695 | fatalerror("JMP AGP in CMDFIFO!\n"); |
| 1696 | 1696 | src = &fifobase[target / 4]; |
| 1697 | 1697 | break; |
| 1698 | 1698 | |
| 1699 | 1699 | default: |
| 1700 | 1700 | mame_printf_debug("INVALID JUMP COMMAND!\n"); |
| 1701 | | fatalerror(" INVALID JUMP COMMAND"); |
| 1701 | fatalerror(" INVALID JUMP COMMAND\n"); |
| 1702 | 1702 | break; |
| 1703 | 1703 | } |
| 1704 | 1704 | break; |
| r17723 | r17724 | |
| 2149 | 2149 | static void stall_cpu(voodoo_state *v, int state, attotime current_time) |
| 2150 | 2150 | { |
| 2151 | 2151 | /* sanity check */ |
| 2152 | | if (!v->pci.op_pending) fatalerror("FIFOs not empty, no op pending!"); |
| 2152 | if (!v->pci.op_pending) fatalerror("FIFOs not empty, no op pending!\n"); |
| 2153 | 2153 | |
| 2154 | 2154 | /* set the state and update statistics */ |
| 2155 | 2155 | v->pci.stall_state = state; |
| r17723 | r17724 | |
| 2507 | 2507 | |
| 2508 | 2508 | case userIntrCMD: |
| 2509 | 2509 | poly_wait(v->poly, v->regnames[regnum]); |
| 2510 | | //fatalerror("userIntrCMD"); |
| 2510 | //fatalerror("userIntrCMD\n"); |
| 2511 | 2511 | |
| 2512 | 2512 | v->reg[intrCtrl].u |= 0x1800; |
| 2513 | 2513 | v->reg[intrCtrl].u &= ~0x80000000; |
| r17723 | r17724 | |
| 2714 | 2714 | |
| 2715 | 2715 | case cmdFifoBump: |
| 2716 | 2716 | if (v->type == TYPE_VOODOO_2 && (chips & 1)) |
| 2717 | | fatalerror("cmdFifoBump"); |
| 2717 | fatalerror("cmdFifoBump\n"); |
| 2718 | 2718 | break; |
| 2719 | 2719 | |
| 2720 | 2720 | case cmdFifoRdPtr: |
| r17723 | r17724 | |
| 2764 | 2764 | else |
| 2765 | 2765 | rowpixels = (data & 0x3fff) >> 1; |
| 2766 | 2766 | if (v->fbi.rowpixels != rowpixels) |
| 2767 | | fatalerror("aux buffer stride differs from color buffer stride"); |
| 2767 | fatalerror("aux buffer stride differs from color buffer stride\n"); |
| 2768 | 2768 | } |
| 2769 | 2769 | break; |
| 2770 | 2770 | |
| r17723 | r17724 | |
| 3294 | 3294 | t = &v->tmu[tmunum]; |
| 3295 | 3295 | |
| 3296 | 3296 | if (TEXLOD_TDIRECT_WRITE(t->reg[tLOD].u)) |
| 3297 | | fatalerror("Texture direct write!"); |
| 3297 | fatalerror("Texture direct write!\n"); |
| 3298 | 3298 | |
| 3299 | 3299 | /* wait for any outstanding work to finish */ |
| 3300 | 3300 | poly_wait(v->poly, "Texture write"); |
| r17723 | r17724 | |
| 3413 | 3413 | return; |
| 3414 | 3414 | in_flush = TRUE; |
| 3415 | 3415 | |
| 3416 | | if (!v->pci.op_pending) fatalerror("flush_fifos called with no pending operation"); |
| 3416 | if (!v->pci.op_pending) fatalerror("flush_fifos called with no pending operation\n"); |
| 3417 | 3417 | |
| 3418 | 3418 | if (LOG_FIFO_VERBOSE) logerror("VOODOO.%d.FIFO:flush_fifos start -- pending=%d.%08X%08X cur=%d.%08X%08X\n", v->index, |
| 3419 | 3419 | v->pci.op_end_time.seconds, (UINT32)(v->pci.op_end_time.attoseconds >> 32), (UINT32)v->pci.op_end_time.attoseconds, |
| r17723 | r17724 | |
| 3653 | 3653 | fifo_add(&v->pci.fifo, data); |
| 3654 | 3654 | } |
| 3655 | 3655 | else |
| 3656 | | fatalerror("PCI FIFO full"); |
| 3656 | fatalerror("PCI FIFO full\n"); |
| 3657 | 3657 | |
| 3658 | 3658 | /* handle flushing to the memory FIFO */ |
| 3659 | 3659 | if (FBIINIT0_ENABLE_MEMORY_FIFO(v->reg[fbiInit0].u) && |
| r17723 | r17724 | |
| 4527 | 4527 | break; |
| 4528 | 4528 | |
| 4529 | 4529 | case cmdBump0: |
| 4530 | | fatalerror("cmdBump0"); |
| 4530 | fatalerror("cmdBump0\n"); |
| 4531 | 4531 | break; |
| 4532 | 4532 | |
| 4533 | 4533 | case cmdRdPtrL0: |
| r17723 | r17724 | |
| 4564 | 4564 | break; |
| 4565 | 4565 | |
| 4566 | 4566 | case cmdBump1: |
| 4567 | | fatalerror("cmdBump1"); |
| 4567 | fatalerror("cmdBump1\n"); |
| 4568 | 4568 | break; |
| 4569 | 4569 | |
| 4570 | 4570 | case cmdRdPtrL1: |
| r17723 | r17724 | |
| 4895 | 4895 | break; |
| 4896 | 4896 | |
| 4897 | 4897 | default: |
| 4898 | | fatalerror("Unsupported voodoo card in voodoo_start!"); |
| 4898 | fatalerror("Unsupported voodoo card in voodoo_start!\n"); |
| 4899 | 4899 | break; |
| 4900 | 4900 | } |
| 4901 | 4901 | |
trunk/src/emu/video/pc_cga.c
| r17723 | r17724 | |
| 354 | 354 | break; |
| 355 | 355 | |
| 356 | 356 | default: |
| 357 | | fatalerror("CGA: Bus width %d not supported", buswidth); |
| 357 | fatalerror("CGA: Bus width %d not supported\n", buswidth); |
| 358 | 358 | break; |
| 359 | 359 | } |
| 360 | 360 | spaceio->install_legacy_readwrite_handler(0x3d0, 0x3df, FUNC(pc_cga8_r), FUNC(pc_cga8_w), mask ); |
| r17723 | r17724 | |
| 396 | 396 | break; |
| 397 | 397 | |
| 398 | 398 | default: |
| 399 | | fatalerror("CGA: Bus width %d not supported", buswidth); |
| 399 | fatalerror("CGA: Bus width %d not supported\n", buswidth); |
| 400 | 400 | break; |
| 401 | 401 | } |
| 402 | 402 | spaceio->install_legacy_readwrite_handler(0x3d0, 0x3df, FUNC(pc_cga8_r), FUNC(pc_cga8_w), mask ); |
| r17723 | r17724 | |
| 1225 | 1225 | break; |
| 1226 | 1226 | |
| 1227 | 1227 | default: |
| 1228 | | fatalerror("CGA: Bus width %d not supported", buswidth); |
| 1228 | fatalerror("CGA: Bus width %d not supported\n", buswidth); |
| 1229 | 1229 | break; |
| 1230 | 1230 | } |
| 1231 | 1231 | space_prg->install_legacy_readwrite_handler(0xb8000, 0xb9fff, FUNC(char_ram_r),FUNC(char_ram_w), mask ); |
trunk/src/emu/video/pc_vga.c
| r17723 | r17724 | |
| 1988 | 1988 | vga.svga_intf = *svga_intf; |
| 1989 | 1989 | |
| 1990 | 1990 | if (vga.svga_intf.seq_regcount < 0x05) |
| 1991 | | fatalerror("Invalid SVGA sequencer register count"); |
| 1991 | fatalerror("Invalid SVGA sequencer register count\n"); |
| 1992 | 1992 | if (vga.svga_intf.crtc_regcount < 0x19) |
| 1993 | | fatalerror("Invalid SVGA CRTC register count"); |
| 1993 | fatalerror("Invalid SVGA CRTC register count\n"); |
| 1994 | 1994 | } |
| 1995 | 1995 | else |
| 1996 | 1996 | { |
| r17723 | r17724 | |
| 2035 | 2035 | break; |
| 2036 | 2036 | |
| 2037 | 2037 | default: |
| 2038 | | fatalerror("VGA: Bus width %d not supported", buswidth); |
| 2038 | fatalerror("VGA: Bus width %d not supported\n", buswidth); |
| 2039 | 2039 | break; |
| 2040 | 2040 | } |
| 2041 | 2041 | io_space->install_legacy_readwrite_handler(port_offset + 0x3b0, port_offset + 0x3bf, FUNC(vga_port_03b0_r), FUNC(vga_port_03b0_w), mask); |
| r17723 | r17724 | |
| 2460 | 2460 | break; |
| 2461 | 2461 | |
| 2462 | 2462 | default: |
| 2463 | | fatalerror("VGA: Bus width %d not supported", buswidth); |
| 2463 | fatalerror("VGA: Bus width %d not supported\n", buswidth); |
| 2464 | 2464 | break; |
| 2465 | 2465 | } |
| 2466 | 2466 | io_space->install_legacy_readwrite_handler(port_offset + 0x3b0, port_offset + 0x3bf, FUNC(vga_port_03b0_r), FUNC(vga_port_03b0_w), mask); |
| r17723 | r17724 | |
| 2723 | 2723 | case 0x03: svga.rgb15_en = 1; break; |
| 2724 | 2724 | case 0x05: svga.rgb16_en = 1; break; |
| 2725 | 2725 | case 0x0d: svga.rgb32_en = 1; break; |
| 2726 | | default: fatalerror("TODO: s3 video mode not implemented %02x",((s3.ext_misc_ctrl_2) >> 4)); break; |
| 2726 | default: fatalerror("TODO: s3 video mode not implemented %02x\n",((s3.ext_misc_ctrl_2) >> 4)); break; |
| 2727 | 2727 | } |
| 2728 | 2728 | } |
| 2729 | 2729 | else |
| r17723 | r17724 | |
| 2937 | 2937 | svga.bank_w = data & 0xf; |
| 2938 | 2938 | svga.bank_r = svga.bank_w; |
| 2939 | 2939 | if(data & 0x60) |
| 2940 | | fatalerror("TODO: s3 bank selects above 1M"); |
| 2940 | fatalerror("TODO: s3 bank selects above 1M\n"); |
| 2941 | 2941 | break; |
| 2942 | 2942 | default: |
| 2943 | 2943 | logerror("S3: 3D4 index %02x write %02x\n",index,data); |
| r17723 | r17724 | |
| 4481 | 4481 | break; |
| 4482 | 4482 | |
| 4483 | 4483 | default: |
| 4484 | | fatalerror("VGA: Bus width %d not supported", buswidth); |
| 4484 | fatalerror("VGA: Bus width %d not supported\n", buswidth); |
| 4485 | 4485 | break; |
| 4486 | 4486 | } |
| 4487 | 4487 | io_space->install_legacy_readwrite_handler(port_offset + 0x3b0, port_offset + 0x3bf, FUNC(vga_port_gamtor_03b0_r), FUNC(vga_port_gamtor_03b0_w), mask); |
trunk/src/emu/sound/discrete.c
| r17723 | r17724 | |
| 412 | 412 | //discrete_base_node *node_ref = m_device->m_indexed_node[NODE_INDEX(inputnode)]; |
| 413 | 413 | discrete_base_node *node_ref = m_device->discrete_find_node(inputnode); |
| 414 | 414 | if (!node_ref) |
| 415 | | fatalerror("discrete_start - NODE_%02d referenced a non existent node NODE_%02d", index(), NODE_INDEX(inputnode)); |
| 415 | fatalerror("discrete_start - NODE_%02d referenced a non existent node NODE_%02d\n", index(), NODE_INDEX(inputnode)); |
| 416 | 416 | |
| 417 | 417 | if ((NODE_CHILD_NODE_NUM(inputnode) >= node_ref->max_output()) /*&& (node_ref->module_type() != DST_CUSTOM)*/) |
| 418 | | fatalerror("discrete_start - NODE_%02d referenced non existent output %d on node NODE_%02d", index(), NODE_CHILD_NODE_NUM(inputnode), NODE_INDEX(inputnode)); |
| 418 | fatalerror("discrete_start - NODE_%02d referenced non existent output %d on node NODE_%02d\n", index(), NODE_CHILD_NODE_NUM(inputnode), NODE_INDEX(inputnode)); |
| 419 | 419 | |
| 420 | 420 | m_input[inputnum] = &(node_ref->m_output[NODE_CHILD_NODE_NUM(inputnode)]); /* Link referenced node out to input */ |
| 421 | 421 | m_input_is_node |= 1 << inputnum; /* Bit flag if input is node */ |
| r17723 | r17724 | |
| 505 | 505 | bool found = false; |
| 506 | 506 | node_count++; |
| 507 | 507 | if (intf[node_count].type == DSS_NULL) |
| 508 | | fatalerror("discrete_build_list: DISCRETE_REPLACE at end of node_list"); |
| 508 | fatalerror("discrete_build_list: DISCRETE_REPLACE at end of node_list\n"); |
| 509 | 509 | |
| 510 | 510 | for (int i=0; i < block_list.count(); i++) |
| 511 | 511 | { |
| r17723 | r17724 | |
| 522 | 522 | } |
| 523 | 523 | |
| 524 | 524 | if (!found) |
| 525 | | fatalerror("discrete_build_list: DISCRETE_REPLACE did not found node %d", NODE_INDEX(intf[node_count].node)); |
| 525 | fatalerror("discrete_build_list: DISCRETE_REPLACE did not found node %d\n", NODE_INDEX(intf[node_count].node)); |
| 526 | 526 | |
| 527 | 527 | } |
| 528 | 528 | else if (intf[node_count].type == DSO_DELETE) |
| r17723 | r17724 | |
| 568 | 568 | |
| 569 | 569 | /* make sure we don't have too many nodes overall */ |
| 570 | 570 | if (node_count > DISCRETE_MAX_NODES) |
| 571 | | fatalerror("discrete_start() - Upper limit of %d nodes exceeded, have you terminated the interface block?", DISCRETE_MAX_NODES); |
| 571 | fatalerror("discrete_start() - Upper limit of %d nodes exceeded, have you terminated the interface block?\n", DISCRETE_MAX_NODES); |
| 572 | 572 | |
| 573 | 573 | /* make sure the node number is in range */ |
| 574 | 574 | if (block->node < NODE_START || block->node > NODE_END) |
| 575 | | fatalerror("discrete_start() - Invalid node number on node %02d descriptor", block->node); |
| 575 | fatalerror("discrete_start() - Invalid node number on node %02d descriptor\n", block->node); |
| 576 | 576 | |
| 577 | 577 | /* make sure the node type is valid */ |
| 578 | 578 | if (block->type > DSO_OUTPUT) |
| 579 | | fatalerror("discrete_start() - Invalid function type on NODE_%02d", NODE_INDEX(block->node) ); |
| 579 | fatalerror("discrete_start() - Invalid function type on NODE_%02d\n", NODE_INDEX(block->node) ); |
| 580 | 580 | |
| 581 | 581 | /* make sure this is a main node */ |
| 582 | 582 | if (NODE_CHILD_NODE_NUM(block->node) > 0) |
| 583 | | fatalerror("discrete_start() - Child node number on NODE_%02d", NODE_INDEX(block->node) ); |
| 583 | fatalerror("discrete_start() - Child node number on NODE_%02d\n", NODE_INDEX(block->node) ); |
| 584 | 584 | |
| 585 | 585 | node_count++; |
| 586 | 586 | } |
| r17723 | r17724 | |
| 724 | 724 | if (USE_DISCRETE_TASKS) |
| 725 | 725 | { |
| 726 | 726 | if (task != NULL) |
| 727 | | fatalerror("init_nodes() - Nested DISCRETE_START_TASK."); |
| 727 | fatalerror("init_nodes() - Nested DISCRETE_START_TASK.\n"); |
| 728 | 728 | task = auto_alloc_clear(machine(), discrete_task(*this)); |
| 729 | 729 | task->task_group = block->initial[0]; |
| 730 | 730 | if (task->task_group < 0 || task->task_group >= DISCRETE_MAX_TASK_GROUPS) |
| 731 | | fatalerror("discrete_dso_task: illegal task_group %d", task->task_group); |
| 731 | fatalerror("discrete_dso_task: illegal task_group %d\n", task->task_group); |
| 732 | 732 | //printf("task group %d\n", task->task_group); |
| 733 | 733 | task_list.add(task); |
| 734 | 734 | } |
| r17723 | r17724 | |
| 738 | 738 | if (USE_DISCRETE_TASKS) |
| 739 | 739 | { |
| 740 | 740 | if (task == NULL) |
| 741 | | fatalerror("init_nodes() - NO DISCRETE_START_TASK."); |
| 741 | fatalerror("init_nodes() - NO DISCRETE_START_TASK.\n"); |
| 742 | 742 | } |
| 743 | 743 | break; |
| 744 | 744 | |
| 745 | 745 | default: |
| 746 | | fatalerror("init_nodes() - Failed, trying to create unknown special discrete node."); |
| 746 | fatalerror("init_nodes() - Failed, trying to create unknown special discrete node.\n"); |
| 747 | 747 | } |
| 748 | 748 | } |
| 749 | 749 | |
| r17723 | r17724 | |
| 751 | 751 | else |
| 752 | 752 | { |
| 753 | 753 | if (m_indexed_node[NODE_INDEX(block->node)]) |
| 754 | | fatalerror("init_nodes() - Duplicate entries for NODE_%02d", NODE_INDEX(block->node)); |
| 754 | fatalerror("init_nodes() - Duplicate entries for NODE_%02d\n", NODE_INDEX(block->node)); |
| 755 | 755 | m_indexed_node[NODE_INDEX(block->node)] = node; |
| 756 | 756 | } |
| 757 | 757 | |
| r17723 | r17724 | |
| 765 | 765 | { |
| 766 | 766 | /* do we belong to a task? */ |
| 767 | 767 | if (task == NULL) |
| 768 | | fatalerror("init_nodes() - found node outside of task: %s", node->module_name() ); |
| 768 | fatalerror("init_nodes() - found node outside of task: %s\n", node->module_name() ); |
| 769 | 769 | else |
| 770 | 770 | task->step_list.add(step); |
| 771 | 771 | } |
| r17723 | r17724 | |
| 983 | 983 | |
| 984 | 984 | /* if no outputs, give an error */ |
| 985 | 985 | if (m_output_list.count() == 0) |
| 986 | | fatalerror("init_nodes() - Couldn't find an output node"); |
| 986 | fatalerror("init_nodes() - Couldn't find an output node\n"); |
| 987 | 987 | |
| 988 | 988 | /* initialize the stream(s) */ |
| 989 | 989 | m_stream = machine().sound().stream_alloc(*this,m_input_stream_list.count(), m_output_list.count(), m_sample_rate); |
trunk/src/emu/memory.c
| r17723 | r17724 | |
| 1863 | 1863 | // find the region |
| 1864 | 1864 | memory_region *region = machine().root_device().memregion(fulltag); |
| 1865 | 1865 | if (region == NULL) |
| 1866 | | fatalerror("Error: device '%s' %s space memory map entry %X-%X references non-existant region \"%s\"", m_device.tag(), m_name, entry->m_addrstart, entry->m_addrend, entry->m_region); |
| 1866 | fatalerror("Error: device '%s' %s space memory map entry %X-%X references non-existant region \"%s\"\n", m_device.tag(), m_name, entry->m_addrstart, entry->m_addrend, entry->m_region); |
| 1867 | 1867 | |
| 1868 | 1868 | // validate the region |
| 1869 | 1869 | if (entry->m_rgnoffs + (entry->m_byteend - entry->m_bytestart + 1) > region->bytes()) |
| 1870 | | fatalerror("Error: device '%s' %s space memory map entry %X-%X extends beyond region \"%s\" size (%X)", m_device.tag(), m_name, entry->m_addrstart, entry->m_addrend, entry->m_region, region->bytes()); |
| 1870 | fatalerror("Error: device '%s' %s space memory map entry %X-%X extends beyond region \"%s\" size (%X)\n", m_device.tag(), m_name, entry->m_addrstart, entry->m_addrend, entry->m_region, region->bytes()); |
| 1871 | 1871 | } |
| 1872 | 1872 | |
| 1873 | 1873 | // convert any region-relative entries to their memory pointers |
| r17723 | r17724 | |
| 2437 | 2437 | if (bank.base() == NULL && manager().m_initialized) |
| 2438 | 2438 | { |
| 2439 | 2439 | if (machine().phase() >= MACHINE_PHASE_RESET) |
| 2440 | | fatalerror("Attempted to call install_ram_generic() after initialization time without a baseptr!"); |
| 2440 | fatalerror("Attempted to call install_ram_generic() after initialization time without a baseptr!\n"); |
| 2441 | 2441 | memory_block &block = manager().m_blocklist.append(*global_alloc(memory_block(*this, address_to_byte(addrstart), address_to_byte_end(addrend)))); |
| 2442 | 2442 | bank.set_base(block.data()); |
| 2443 | 2443 | } |
| r17723 | r17724 | |
| 2466 | 2466 | if (bank.base() == NULL && manager().m_initialized) |
| 2467 | 2467 | { |
| 2468 | 2468 | if (machine().phase() >= MACHINE_PHASE_RESET) |
| 2469 | | fatalerror("Attempted to call install_ram_generic() after initialization time without a baseptr!"); |
| 2469 | fatalerror("Attempted to call install_ram_generic() after initialization time without a baseptr!\n"); |
| 2470 | 2470 | memory_block &block = manager().m_blocklist.append(*global_alloc(memory_block(*this, address_to_byte(addrstart), address_to_byte_end(addrend)))); |
| 2471 | 2471 | bank.set_base(block.data()); |
| 2472 | 2472 | } |
| r17723 | r17724 | |
| 3584 | 3584 | |
| 3585 | 3585 | // merge any subtables we can |
| 3586 | 3586 | if (!subtable_merge()) |
| 3587 | | fatalerror("Ran out of subtables!"); |
| 3587 | fatalerror("Ran out of subtables!\n"); |
| 3588 | 3588 | } |
| 3589 | 3589 | } |
| 3590 | 3590 | |
| r17723 | r17724 | |
| 3600 | 3600 | |
| 3601 | 3601 | // sanity check |
| 3602 | 3602 | if (m_subtable[subindex].m_usecount <= 0) |
| 3603 | | fatalerror("Called subtable_realloc on a table with a usecount of 0"); |
| 3603 | fatalerror("Called subtable_realloc on a table with a usecount of 0\n"); |
| 3604 | 3604 | |
| 3605 | 3605 | // increment the usecount |
| 3606 | 3606 | m_subtable[subindex].m_usecount++; |
| r17723 | r17724 | |
| 3677 | 3677 | |
| 3678 | 3678 | // sanity check |
| 3679 | 3679 | if (m_subtable[subindex].m_usecount <= 0) |
| 3680 | | fatalerror("Called subtable_release on a table with a usecount of 0"); |
| 3680 | fatalerror("Called subtable_release on a table with a usecount of 0\n"); |
| 3681 | 3681 | |
| 3682 | 3682 | // decrement the usecount and clear the checksum if we're at 0 |
| 3683 | 3683 | // also unref the subhandlers |
trunk/src/emu/save.c
| r17723 | r17724 | |
| 141 | 141 | { |
| 142 | 142 | // check for invalid timing |
| 143 | 143 | if (!m_reg_allowed) |
| 144 | | fatalerror("Attempt to register callback function after state registration is closed!"); |
| 144 | fatalerror("Attempt to register callback function after state registration is closed!\n"); |
| 145 | 145 | |
| 146 | 146 | // scan for duplicates and push through to the end |
| 147 | 147 | for (state_callback *cb = m_presave_list.first(); cb != NULL; cb = cb->next()) |
| 148 | 148 | if (cb->m_func == func) |
| 149 | | fatalerror("Duplicate save state function (%s/%s)", cb->m_func.name(), func.name()); |
| 149 | fatalerror("Duplicate save state function (%s/%s)\n", cb->m_func.name(), func.name()); |
| 150 | 150 | |
| 151 | 151 | // allocate a new entry |
| 152 | 152 | m_presave_list.append(*auto_alloc(machine(), state_callback(func))); |
| r17723 | r17724 | |
| 162 | 162 | { |
| 163 | 163 | // check for invalid timing |
| 164 | 164 | if (!m_reg_allowed) |
| 165 | | fatalerror("Attempt to register callback function after state registration is closed!"); |
| 165 | fatalerror("Attempt to register callback function after state registration is closed!\n"); |
| 166 | 166 | |
| 167 | 167 | // scan for duplicates and push through to the end |
| 168 | 168 | for (state_callback *cb = m_postload_list.first(); cb != NULL; cb = cb->next()) |
| 169 | 169 | if (cb->m_func == func) |
| 170 | | fatalerror("Duplicate save state function (%s/%s)", cb->m_func.name(), func.name()); |
| 170 | fatalerror("Duplicate save state function (%s/%s)\n", cb->m_func.name(), func.name()); |
| 171 | 171 | |
| 172 | 172 | // allocate a new entry |
| 173 | 173 | m_postload_list.append(*auto_alloc(machine(), state_callback(func))); |
| r17723 | r17724 | |
| 211 | 211 | |
| 212 | 212 | // error if we are equal |
| 213 | 213 | if (entry->m_name == totalname) |
| 214 | | fatalerror("Duplicate save state registration entry (%s)", totalname.cstr()); |
| 214 | fatalerror("Duplicate save state registration entry (%s)\n", totalname.cstr()); |
| 215 | 215 | } |
| 216 | 216 | |
| 217 | 217 | // insert us into the list |