| Previous | 15994 Revisions | Next |
| r5667 Thursday 10th September, 2009 at 11:20:01 UTC by Nathan Woods |
|---|
| Updated to MAME 0.134 core (PDP1 temporarily disabled) |
| [ROOT] | whatsnew.txt |
| [docs] | messnew.txt |
| [src/emu] | cheat.c cheat.h cpuexec.c inptport.c input.c input.h mame.c mame.h memory.c ui.c uimenu.c |
| [src/emu/cpu/dsp32] | dsp32dis.c |
| [src/emu/cpu/h83002] | h8disasm.c |
| [src/emu/cpu/i386] | i386dasm.c i386ops.c i386ops.h |
| [src/emu/cpu/i4004] | i4004.c |
| [src/emu/cpu/i8085] | i8085.c |
| [src/emu/cpu/jaguar] | jagdasm.c |
| [src/emu/cpu/m6502] | m6502.h m6509.h |
| [src/emu/cpu/mb86233] | mb86233d.c |
| [src/emu/cpu/mips] | r3kdasm.c |
| [src/emu/cpu/pdp1] | pdp1.c pdp1.h tx0.h |
| [src/emu/cpu/pic16c5x] | pic16c5x.c |
| [src/emu/cpu/sharc] | sharcdsm.c |
| [src/emu/cpu/ssp1601] | ssp1601d.c |
| [src/emu/cpu/tms0980] | tms0980d.c |
| [src/emu/cpu/tms32031] | dis32031.c |
| [src/emu/cpu/tms34010] | tms34010.c |
| [src/emu/cpu/z8] | z8dasm.c z8ops.c |
| [src/emu/debug] | debugcmd.c debugcmt.c debugcpu.c debugcpu.h debughlp.c debugvw.c |
| [src/emu/machine] | 6522via.c 6526cia.c 68681.c 8042kbdc.c generic.c latch8.c rescap.h tmp68301.c |
| [src/emu/sound] | disc_sys.c discrete.c discrete.h scsp.c tms5110.c |
| [src/lib/util] | corestr.c corestr.h |
| [src/mame] | mame.mak mamedriv.c |
| [src/mame/audio] | hitme.c m79amb.c norautp.c* |
| [src/mame/drivers] | 39in1.c circusc.c cischeat.c cmmb.c darkhors.c funworld.c gaiden.c galaxian.c hitpoker.c kaneko16.c littlerb.c looping.c macs.c mlanding.c naomi.c norautp.c photon.c photon2.c* segas24.c skeetsht.c srmp5.c ssgbl.c st0016.c system16.c timetrv.c tmaster.c turrett.c vpoker.c |
| [src/mame/includes] | cischeat.h* dc.h kaneko16.h nmk16.h norautp.h* pk8000.h snes.h st0016.h stv.h system16.h |
| [src/mame/machine] | atarigen.c dc.c kaneko16.c naomibd.c snesdsp3.c snesdsp4.c snesrtc.c snessdd1.c |
| [src/mame/video] | avgdvg.c btime.c cischeat.c dc.c ppu2c0x.c snes.c st0016.c system1.c system16.c |
| [src/mess] | eventlst.c mess.mak messdriv.c mslegacy.c mslegacy.h |
| [src/mess/audio] | mea8000.c |
| [src/mess/devices] | cococart.c sonydriv.c ti99cart.c |
| [src/mess/drivers] | cdi.c gba.c junior.c kim1.c |
| [src/mess/machine] | 6530miot.c 99_peb.c abcbus.c hd63450.c i82439tx.c ins8154.c mc68328.c mc6843.c mc6846.c mc6854.c mpc105.c ncr5380.c nec765.c pc.c pc_fdc.c pc_hdc.c pc_turbo.c ti99_4x.c ti99pcod.c |
| [src/mess/tools/messtest] | testmess.c |
| [src/mess/video] | border.c cdp1864.c crtc_ega.c gba.c kc.c m6847.c pc_aga.c pc_cga.c pc_ega.c pc_mda.c pc_vga.c samcoupe.c spectrum.c timex.c vic6567.c |
| [src/tools] | unidasm.c |
| r0 | r5667 | |
|---|---|---|
| 1 | /************************************************************************ | |
| 2 | * norautp Sound System Analog emulation | |
| 3 | * Sept 2009, Derrick Renaud | |
| 4 | ************************************************************************/ | |
| 5 | ||
| 6 | #include "driver.h" | |
| 7 | #include "norautp.h" | |
| 8 | ||
| 9 | ||
| 10 | /* Discrete Sound Input Nodes */ | |
| 11 | /* defined in norautp.h */ | |
| 12 | ||
| 13 | /* Parts List - Resistors */ | |
| 14 | #define NORAUTP_R1 RES_K(120) | |
| 15 | #define NORAUTP_R2 RES_K(2.2) | |
| 16 | ||
| 17 | /* Parts List - Capacitors */ | |
| 18 | #define NORAUTP_C1 CAP_U(.009) /* The real value is .01, but using .009 the tone for this line is accurate */ | |
| 19 | #define NORAUTP_C2 CAP_U(.022) | |
| 20 | #define NORAUTP_C3 CAP_U(.047) | |
| 21 | #define NORAUTP_C4 CAP_U(.01) | |
| 22 | ||
| 23 | ||
| 24 | static const discrete_555_desc desc_norautp_555 = | |
| 25 | { | |
| 26 | DISC_555_OUT_ENERGY | DISC_555_OUT_AC, | |
| 27 | 5, // B+ voltage of 555 | |
| 28 | DEFAULT_555_VALUES | |
| 29 | }; | |
| 30 | ||
| 31 | static const discrete_comp_adder_table desc_norautp_caps = | |
| 32 | { | |
| 33 | DISC_COMP_P_CAPACITOR, NORAUTP_C4, 3, | |
| 34 | { | |
| 35 | NORAUTP_C3, NORAUTP_C2, NORAUTP_C1 | |
| 36 | } | |
| 37 | }; | |
| 38 | ||
| 39 | ||
| 40 | DISCRETE_SOUND_START( norautp ) | |
| 41 | /************************************************ | |
| 42 | * Input register mapping | |
| 43 | ************************************************/ | |
| 44 | DISCRETE_INPUT_LOGIC(NORAUTP_SND_EN) | |
| 45 | DISCRETE_INPUT_DATA (NORAUTP_FREQ_DATA) | |
| 46 | ||
| 47 | /************************************************ | |
| 48 | * Tone Generator | |
| 49 | ************************************************/ | |
| 50 | DISCRETE_COMP_ADDER(NODE_20, NORAUTP_FREQ_DATA, &desc_norautp_caps) | |
| 51 | DISCRETE_555_ASTABLE(NODE_21, | |
| 52 | NORAUTP_SND_EN, /* RESET */ | |
| 53 | NORAUTP_R2, NORAUTP_R1, NODE_20, &desc_norautp_555) | |
| 54 | ||
| 55 | DISCRETE_OUTPUT(NODE_21, 65000.0/3.8) | |
| 56 | ||
| 57 | DISCRETE_SOUND_END |
| r5666 | r5667 | |
|---|---|---|
| 10 | 10 | |
| 11 | 11 | static const discrete_555_desc desc_hitme_555 = |
| 12 | 12 | { |
| 13 | DISC_555_OUT_ | |
| 13 | DISC_555_OUT_ENERGY | DISC_555_OUT_DC, | |
| 14 | 14 | 5, // B+ voltage of 555 |
| 15 | 15 | DEFAULT_555_VALUES |
| 16 | 16 | }; |
| r5666 | r5667 | |
| 75 | 75 | /* The output of the 555 timer is fed through a simple CR filter in the amp stage. */ |
| 76 | 76 | DISCRETE_CRFILTER(HITME_FINAL_SND,1,NODE_24,1e3,50e-6) |
| 77 | 77 | |
| 78 | /* We scale the final output of 3.3 to 16-bit range and output it at full volume */ | |
| 79 | DISCRETE_OUTPUT(HITME_FINAL_SND,32000.0/3.3) | |
| 78 | /* We scale the final output of 3.8 to 16-bit range and output it at full volume */ | |
| 79 | DISCRETE_OUTPUT(HITME_FINAL_SND,32000.0/3.8) | |
| 80 | 80 | DISCRETE_SOUND_END |
| r5666 | r5667 | |
|---|---|---|
| 30 | 30 | #define M79AMB_WHISTLE_A_SND NODE_16 |
| 31 | 31 | #define M79AMB_WHISTLE_B_SND NODE_17 |
| 32 | 32 | |
| 33 | /* Parts List - Resistors */ | |
| 33 | 34 | #define M79AMB_R2 RES_K(5.6) |
| 34 | 35 | #define M79AMB_R6 220 |
| 35 | 36 | #define M79AMB_R9 RES_K(4.7) |
| r5666 | r5667 | |
| 80 | 81 | #define M79AMB_R84 RES_K(50) |
| 81 | 82 | #define M79AMB_R86 470 |
| 82 | 83 | |
| 84 | /* Parts List - Capacitors */ | |
| 83 | 85 | #define M79AMB_C2 CAP_U(39) |
| 84 | 86 | #define M79AMB_C3 CAP_U(22) |
| 85 | 87 | #define M79AMB_C6 CAP_U(0.1) |
| r5666 | r5667 | |
|---|---|---|
| 14 | 14 | return newclass; |
| 15 | 15 | } |
| 16 | 16 | |
| 17 | static void SDD1_IM_prepareDecomp(SDD1_IM* this, UINT32 in_buf) | |
| 17 | static void SDD1_IM_prepareDecomp(SDD1_IM* thisptr, UINT32 in_buf) | |
| 18 | 18 | { |
| 19 | this->byte_ptr = in_buf; | |
| 20 | this->bit_count = 4; | |
| 19 | thisptr->byte_ptr = in_buf; | |
| 20 | thisptr->bit_count = 4; | |
| 21 | 21 | } |
| 22 | 22 | |
| 23 | static UINT8 SDD1_IM_getCodeword(SDD1_IM* this, const UINT8 code_len) | |
| 23 | static UINT8 SDD1_IM_getCodeword(SDD1_IM* thisptr, const UINT8 code_len) | |
| 24 | 24 | { |
| 25 | 25 | UINT8 codeword; |
| 26 | 26 | |
| 27 | codeword = sdd1_read(this->machine, this->byte_ptr) << this->bit_count; | |
| 27 | codeword = sdd1_read(thisptr->machine, thisptr->byte_ptr) << thisptr->bit_count; | |
| 28 | 28 | |
| 29 | ++this->bit_count; | |
| 29 | ++thisptr->bit_count; | |
| 30 | 30 | |
| 31 | 31 | if (codeword & 0x80) |
| 32 | 32 | { |
| 33 | codeword |= sdd1_read(this->machine, this->byte_ptr + 1) >> (9 - this->bit_count); | |
| 34 | this->bit_count += code_len; | |
| 33 | codeword |= sdd1_read(thisptr->machine, thisptr->byte_ptr + 1) >> (9 - thisptr->bit_count); | |
| 34 | thisptr->bit_count += code_len; | |
| 35 | 35 | } |
| 36 | 36 | |
| 37 | if (this->bit_count & 0x08) | |
| 37 | if (thisptr->bit_count & 0x08) | |
| 38 | 38 | { |
| 39 | this->byte_ptr++; | |
| 40 | this->bit_count &= 0x07; | |
| 39 | thisptr->byte_ptr++; | |
| 40 | thisptr->bit_count &= 0x07; | |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | 43 | return codeword; |
| r5666 | r5667 | |
| 57 | 57 | return newclass; |
| 58 | 58 | } |
| 59 | 59 | |
| 60 | static void SDD1_GCD_getRunCount(SDD1_GCD* this, UINT8 code_num, UINT8* MPScount, UINT8* LPSind) | |
| 60 | static void SDD1_GCD_getRunCount(SDD1_GCD* thisptr, UINT8 code_num, UINT8* MPScount, UINT8* LPSind) | |
| 61 | 61 | { |
| 62 | 62 | const UINT8 run_count[] = |
| 63 | 63 | { |
| r5666 | r5667 | |
| 95 | 95 | 0x70, 0x30, 0x50, 0x10, 0x60, 0x20, 0x40, 0x00, |
| 96 | 96 | }; |
| 97 | 97 | |
| 98 | UINT8 codeword = SDD1_IM_getCodeword(this->IM, code_num); | |
| 98 | UINT8 codeword = SDD1_IM_getCodeword(thisptr->IM, code_num); | |
| 99 | 99 | |
| 100 | 100 | if (codeword & 0x80) |
| 101 | 101 | { |
| r5666 | r5667 | |
| 126 | 126 | return newclass; |
| 127 | 127 | } |
| 128 | 128 | |
| 129 | static void SDD1_BG_prepareDecomp(SDD1_BG* this) | |
| 129 | static void SDD1_BG_prepareDecomp(SDD1_BG* thisptr) | |
| 130 | 130 | { |
| 131 | this->MPScount = 0; | |
| 132 | this->LPSind = 0; | |
| 131 | thisptr->MPScount = 0; | |
| 132 | thisptr->LPSind = 0; | |
| 133 | 133 | } |
| 134 | 134 | |
| 135 | static UINT8 SDD1_BG_getBit(SDD1_BG* this, UINT8* endOfRun) | |
| 135 | static UINT8 SDD1_BG_getBit(SDD1_BG* thisptr, UINT8* endOfRun) | |
| 136 | 136 | { |
| 137 | 137 | UINT8 bit; |
| 138 | 138 | |
| 139 | if (!(this->MPScount || this->LPSind)) | |
| 139 | if (!(thisptr->MPScount || thisptr->LPSind)) | |
| 140 | 140 | { |
| 141 | SDD1_GCD_getRunCount(this->GCD, this->code_num, &(this->MPScount), &(this->LPSind)); | |
| 141 | SDD1_GCD_getRunCount(thisptr->GCD, thisptr->code_num, &(thisptr->MPScount), &(thisptr->LPSind)); | |
| 142 | 142 | } |
| 143 | 143 | |
| 144 | if (this->MPScount) | |
| 144 | if (thisptr->MPScount) | |
| 145 | 145 | { |
| 146 | 146 | bit = 0; |
| 147 | this->MPScount--; | |
| 147 | thisptr->MPScount--; | |
| 148 | 148 | } |
| 149 | 149 | else |
| 150 | 150 | { |
| 151 | 151 | bit = 1; |
| 152 | this->LPSind = 0; | |
| 152 | thisptr->LPSind = 0; | |
| 153 | 153 | } |
| 154 | 154 | |
| 155 | if (this->MPScount || this->LPSind) | |
| 155 | if (thisptr->MPScount || thisptr->LPSind) | |
| 156 | 156 | { |
| 157 | 157 | (*endOfRun) = 0; |
| 158 | 158 | } |
| r5666 | r5667 | |
| 172 | 172 | UINT8 nextIfLPS; |
| 173 | 173 | } SDD1_PEM_state; |
| 174 | 174 | |
| 175 | SDD1_PEM_state SDD1_PEM_evolution_table[33] = | |
| 175 | static const SDD1_PEM_state SDD1_PEM_evolution_table[33] = | |
| 176 | 176 | { |
| 177 | 177 | { 0,25,25}, |
| 178 | 178 | { 0, 2, 1}, |
| r5666 | r5667 | |
| 241 | 241 | return newclass; |
| 242 | 242 | } |
| 243 | 243 | |
| 244 | static void SDD1_PEM_prepareDecomp(SDD1_PEM* this) | |
| 244 | static void SDD1_PEM_prepareDecomp(SDD1_PEM* thisptr) | |
| 245 | 245 | { |
| 246 | 246 | UINT8 i; |
| 247 | 247 | for(i = 0; i < 32; i++) |
| 248 | 248 | { |
| 249 | this->contextInfo[i].status = 0; | |
| 250 | this->contextInfo[i].MPS = 0; | |
| 249 | thisptr->contextInfo[i].status = 0; | |
| 250 | thisptr->contextInfo[i].MPS = 0; | |
| 251 | 251 | } |
| 252 | 252 | } |
| 253 | 253 | |
| 254 | static UINT8 SDD1_PEM_getBit(SDD1_PEM* this, UINT8 context) | |
| 254 | static UINT8 SDD1_PEM_getBit(SDD1_PEM* thisptr, UINT8 context) | |
| 255 | 255 | { |
| 256 | 256 | UINT8 endOfRun; |
| 257 | 257 | UINT8 bit; |
| 258 | 258 | |
| 259 | SDD1_PEM_ContextInfo *pContInfo = &(this->contextInfo)[context]; | |
| 259 | SDD1_PEM_ContextInfo *pContInfo = &(thisptr->contextInfo)[context]; | |
| 260 | 260 | UINT8 currStatus = pContInfo->status; |
| 261 | SDD1_PEM_state* pState = &(SDD1_PEM_evolution_table[currStatus]); | |
| 261 | const SDD1_PEM_state* pState = &(SDD1_PEM_evolution_table[currStatus]); | |
| 262 | 262 | UINT8 currentMPS = pContInfo->MPS; |
| 263 | 263 | |
| 264 | bit = SDD1_BG_getBit(this->BG[pState->code_num], &endOfRun); | |
| 264 | bit = SDD1_BG_getBit(thisptr->BG[pState->code_num], &endOfRun); | |
| 265 | 265 | |
| 266 | 266 | if (endOfRun) |
| 267 | 267 | { |
| r5666 | r5667 | |
| 301 | 301 | return newclass; |
| 302 | 302 | } |
| 303 | 303 | |
| 304 | static void SDD1_CM_prepareDecomp(SDD1_CM* this, UINT32 first_byte) | |
| 304 | static void SDD1_CM_prepareDecomp(SDD1_CM* thisptr, UINT32 first_byte) | |
| 305 | 305 | { |
| 306 | 306 | INT32 i = 0; |
| 307 | this->bitplanesInfo = sdd1_read(this->machine, first_byte) & 0xc0; | |
| 308 | this->contextBitsInfo = sdd1_read(this->machine, first_byte) & 0x30; | |
| 309 | this->bit_number = 0; | |
| 307 | thisptr->bitplanesInfo = sdd1_read(thisptr->machine, first_byte) & 0xc0; | |
| 308 | thisptr->contextBitsInfo = sdd1_read(thisptr->machine, first_byte) & 0x30; | |
| 309 | thisptr->bit_number = 0; | |
| 310 | 310 | for (i = 0; i < 8; i++) |
| 311 | 311 | { |
| 312 | this->prevBitplaneBits[i] = 0; | |
| 312 | thisptr->prevBitplaneBits[i] = 0; | |
| 313 | 313 | } |
| 314 | switch(this->bitplanesInfo) | |
| 314 | switch(thisptr->bitplanesInfo) | |
| 315 | 315 | { |
| 316 | 316 | case 0x00: |
| 317 | this->currBitplane = 1; | |
| 317 | thisptr->currBitplane = 1; | |
| 318 | 318 | break; |
| 319 | 319 | case 0x40: |
| 320 | this->currBitplane = 7; | |
| 320 | thisptr->currBitplane = 7; | |
| 321 | 321 | break; |
| 322 | 322 | case 0x80: |
| 323 | this->currBitplane = 3; | |
| 323 | thisptr->currBitplane = 3; | |
| 324 | 324 | break; |
| 325 | 325 | } |
| 326 | 326 | } |
| 327 | 327 | |
| 328 | static UINT8 SDD1_CM_getBit(SDD1_CM* this) | |
| 328 | static UINT8 SDD1_CM_getBit(SDD1_CM* thisptr) | |
| 329 | 329 | { |
| 330 | 330 | UINT8 currContext; |
| 331 | 331 | UINT16 *context_bits; |
| 332 | 332 | UINT8 bit = 0; |
| 333 | 333 | |
| 334 | switch (this->bitplanesInfo) | |
| 334 | switch (thisptr->bitplanesInfo) | |
| 335 | 335 | { |
| 336 | 336 | case 0x00: |
| 337 | this->currBitplane ^= 0x01; | |
| 337 | thisptr->currBitplane ^= 0x01; | |
| 338 | 338 | break; |
| 339 | 339 | case 0x40: |
| 340 | this->currBitplane ^= 0x01; | |
| 341 | if (!(this->bit_number & 0x7f)) | |
| 340 | thisptr->currBitplane ^= 0x01; | |
| 341 | if (!(thisptr->bit_number & 0x7f)) | |
| 342 | 342 | { |
| 343 | this->currBitplane = ((this->currBitplane + 2) & 0x07); | |
| 343 | thisptr->currBitplane = ((thisptr->currBitplane + 2) & 0x07); | |
| 344 | 344 | } |
| 345 | 345 | break; |
| 346 | 346 | case 0x80: |
| 347 | this->currBitplane ^= 0x01; | |
| 348 | if (!(this->bit_number & 0x7f)) | |
| 347 | thisptr->currBitplane ^= 0x01; | |
| 348 | if (!(thisptr->bit_number & 0x7f)) | |
| 349 | 349 | { |
| 350 | this->currBitplane ^= 0x02; | |
| 350 | thisptr->currBitplane ^= 0x02; | |
| 351 | 351 | } |
| 352 | 352 | break; |
| 353 | 353 | case 0xc0: |
| 354 | this->currBitplane = this->bit_number & 0x07; | |
| 354 | thisptr->currBitplane = thisptr->bit_number & 0x07; | |
| 355 | 355 | break; |
| 356 | 356 | } |
| 357 | 357 | |
| 358 | context_bits = &(this->prevBitplaneBits)[this->currBitplane]; | |
| 358 | context_bits = &(thisptr->prevBitplaneBits)[thisptr->currBitplane]; | |
| 359 | 359 | |
| 360 | currContext = (this->currBitplane & 0x01) << 4; | |
| 361 | switch (this->contextBitsInfo) | |
| 360 | currContext = (thisptr->currBitplane & 0x01) << 4; | |
| 361 | switch (thisptr->contextBitsInfo) | |
| 362 | 362 | { |
| 363 | 363 | case 0x00: |
| 364 | 364 | currContext |= ((*context_bits & 0x01c0) >> 5) | (*context_bits & 0x0001); |
| r5666 | r5667 | |
| 374 | 374 | break; |
| 375 | 375 | } |
| 376 | 376 | |
| 377 | bit = SDD1_PEM_getBit(this->PEM, currContext); | |
| 377 | bit = SDD1_PEM_getBit(thisptr->PEM, currContext); | |
| 378 | 378 | |
| 379 | 379 | *context_bits <<= 1; |
| 380 | 380 | *context_bits |= bit; |
| 381 | 381 | |
| 382 | this->bit_number++; | |
| 382 | thisptr->bit_number++; | |
| 383 | 383 | |
| 384 | 384 | return bit; |
| 385 | 385 | } |
| r5666 | r5667 | |
| 401 | 401 | return newclass; |
| 402 | 402 | } |
| 403 | 403 | |
| 404 | static void SDD1_OL_prepareDecomp(SDD1_OL* this, UINT32 first_byte, UINT16 out_len, UINT8 *out_buf) | |
| 404 | static void SDD1_OL_prepareDecomp(SDD1_OL* thisptr, UINT32 first_byte, UINT16 out_len, UINT8 *out_buf) | |
| 405 | 405 | { |
| 406 | this->bitplanesInfo = sdd1_read(this->machine, first_byte) & 0xc0; | |
| 407 | this->length = out_len; | |
| 408 | this->buffer = out_buf; | |
| 406 | thisptr->bitplanesInfo = sdd1_read(thisptr->machine, first_byte) & 0xc0; | |
| 407 | thisptr->length = out_len; | |
| 408 | thisptr->buffer = out_buf; | |
| 409 | 409 | } |
| 410 | 410 | |
| 411 | static void SDD1_OL_launch(SDD1_OL* this) | |
| 411 | static void SDD1_OL_launch(SDD1_OL* thisptr) | |
| 412 | 412 | { |
| 413 | 413 | UINT8 i; |
| 414 | 414 | UINT8 register1 = 0, register2 = 0; |
| 415 | 415 | |
| 416 | switch(this->bitplanesInfo) | |
| 416 | switch(thisptr->bitplanesInfo) | |
| 417 | 417 | { |
| 418 | 418 | case 0x00: |
| 419 | 419 | case 0x40: |
| r5666 | r5667 | |
| 423 | 423 | { // if length == 0, we output 2^16 bytes |
| 424 | 424 | if(!i) |
| 425 | 425 | { |
| 426 | *(this->buffer++) = register2; | |
| 426 | *(thisptr->buffer++) = register2; | |
| 427 | 427 | i = ~i; |
| 428 | 428 | } |
| 429 | 429 | else |
| 430 | 430 | { |
| 431 | 431 | for(register1 = register2 = 0, i = 0x80; i; i >>= 1) |
| 432 | 432 | { |
| 433 | if(SDD1_CM_getBit(this->CM)) | |
| 433 | if(SDD1_CM_getBit(thisptr->CM)) | |
| 434 | 434 | { |
| 435 | 435 | register1 |= i; |
| 436 | 436 | } |
| 437 | if(SDD1_CM_getBit(this->CM)) | |
| 437 | if(SDD1_CM_getBit(thisptr->CM)) | |
| 438 | 438 | { |
| 439 | 439 | register2 |= i; |
| 440 | 440 | } |
| 441 | 441 | } |
| 442 | *(this->buffer++) = register1; | |
| 442 | *(thisptr->buffer++) = register1; | |
| 443 | 443 | } |
| 444 | } while(--(this->length)); | |
| 444 | } while(--(thisptr->length)); | |
| 445 | 445 | break; |
| 446 | 446 | case 0xc0: |
| 447 | 447 | do |
| 448 | 448 | { |
| 449 | 449 | for(register1 = 0, i = 0x01; i; i <<= 1) |
| 450 | 450 | { |
| 451 | if(SDD1_CM_getBit(this->CM)) | |
| 451 | if(SDD1_CM_getBit(thisptr->CM)) | |
| 452 | 452 | { |
| 453 | 453 | register1 |= i; |
| 454 | 454 | } |
| 455 | 455 | } |
| 456 | *(this->buffer++) = register1; | |
| 457 | } while(--(this->length)); | |
| 456 | *(thisptr->buffer++) = register1; | |
| 457 | } while(--(thisptr->length)); | |
| 458 | 458 | break; |
| 459 | 459 | } |
| 460 | 460 | } |
| r5666 | r5667 | |
| 493 | 493 | return newclass; |
| 494 | 494 | } |
| 495 | 495 | |
| 496 | static void SDD1emu_decompress(SDD1emu* this, UINT32 in_buf, UINT16 out_len, UINT8 *out_buf) | |
| 496 | static void SDD1emu_decompress(SDD1emu* thisptr, UINT32 in_buf, UINT16 out_len, UINT8 *out_buf) | |
| 497 | 497 | { |
| 498 | SDD1_IM_prepareDecomp(this->IM, in_buf); | |
| 499 | SDD1_BG_prepareDecomp(this->BG0); | |
| 500 | SDD1_BG_prepareDecomp(this->BG1); | |
| 501 | SDD1_BG_prepareDecomp(this->BG2); | |
| 502 | SDD1_BG_prepareDecomp(this->BG3); | |
| 503 | SDD1_BG_prepareDecomp(this->BG4); | |
| 504 | SDD1_BG_prepareDecomp(this->BG5); | |
| 505 | SDD1_BG_prepareDecomp(this->BG6); | |
| 506 | SDD1_BG_prepareDecomp(this->BG7); | |
| 507 | SDD1_PEM_prepareDecomp(this->PEM); | |
| 508 | SDD1_CM_prepareDecomp(this->CM, in_buf); | |
| 509 | SDD1_OL_prepareDecomp(this->OL, in_buf, out_len, out_buf); | |
| 498 | SDD1_IM_prepareDecomp(thisptr->IM, in_buf); | |
| 499 | SDD1_BG_prepareDecomp(thisptr->BG0); | |
| 500 | SDD1_BG_prepareDecomp(thisptr->BG1); | |
| 501 | SDD1_BG_prepareDecomp(thisptr->BG2); | |
| 502 | SDD1_BG_prepareDecomp(thisptr->BG3); | |
| 503 | SDD1_BG_prepareDecomp(thisptr->BG4); | |
| 504 | SDD1_BG_prepareDecomp(thisptr->BG5); | |
| 505 | SDD1_BG_prepareDecomp(thisptr->BG6); | |
| 506 | SDD1_BG_prepareDecomp(thisptr->BG7); | |
| 507 | SDD1_PEM_prepareDecomp(thisptr->PEM); | |
| 508 | SDD1_CM_prepareDecomp(thisptr->CM, in_buf); | |
| 509 | SDD1_OL_prepareDecomp(thisptr->OL, in_buf, out_len, out_buf); | |
| 510 | 510 | |
| 511 | SDD1_OL_launch(this->OL); | |
| 511 | SDD1_OL_launch(thisptr->OL); | |
| 512 | 512 | } |
| 513 | 513 | |
| 514 | 514 | typedef struct |
| r5666 | r5667 | |
| 533 | 533 | } buffer; |
| 534 | 534 | } _snes_sdd1_t; |
| 535 | 535 | |
| 536 | _snes_sdd1_t snes_sdd1; | |
| 536 | static _snes_sdd1_t snes_sdd1; | |
| 537 | 537 | |
| 538 | 538 | static void sdd1_init(running_machine* machine) |
| 539 | 539 | { |
| r5666 | r5667 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | DSP-3 emulator code |
| 4 | 4 | |
| 5 | Copyright (c) 2003-2009 John Weidman, Kris Bleakley, Lancer, Nach, | |
| 5 | Copyright (c) 2003-2009 John Weidman, Kris Bleakley, Lancer, Nach, | |
| 6 | 6 | z80 gaiden, and Jonas Quinn |
| 7 | 7 | |
| 8 | This code is released by ZSNES Team under GNU General Public License | |
| 8 | This code is released by ZSNES Team under GNU General Public License | |
| 9 | 9 | version 2 as published by the Free Software Foundation. |
| 10 | 10 | The implementation below is released under the MAME license for use |
| 11 | 11 | in MAME, MESS and derivatives by permission of the authors. |
| r5666 | r5667 | |
|---|---|---|
| 112 | 112 | |
| 113 | 113 | #endif |
| 114 | 114 | |
| 115 | static UINT8 dc_controller_id[0x70] = | |
| 116 | { | |
| 117 | 0x00, 0x00, 0x00, 0x01, 0x00, 0x0f, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 118 | 0xff, 0x00, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x63, 0x61, 0x73, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, | |
| 119 | 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
| 120 | 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x42, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x55, | |
| 121 | 0x6e, 0x64, 0x65, 0x72, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x46, 0x72, 0x6f, | |
| 122 | 0x6d, 0x20, 0x53, 0x45, 0x47, 0x41, 0x20, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x50, 0x52, 0x49, 0x53, | |
| 115 | static const UINT8 dc_controller_id[0x70] = | |
| 116 | { | |
| 117 | 0x00, 0x00, 0x00, 0x01, 0x00, 0x0f, 0x06, 0xfe, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, | |
| 118 | 0xff, 0x00, 0x44, 0x72, 0x65, 0x61, 0x6d, 0x63, 0x61, 0x73, 0x74, 0x20, 0x43, 0x6f, 0x6e, 0x74, | |
| 119 | 0x72, 0x6f, 0x6c, 0x6c, 0x65, 0x72, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, 0x20, | |
| 120 | 0x50, 0x72, 0x6f, 0x64, 0x75, 0x63, 0x65, 0x64, 0x20, 0x42, 0x79, 0x20, 0x6f, 0x72, 0x20, 0x55, | |
| 121 | 0x6e, 0x64, 0x65, 0x72, 0x20, 0x4c, 0x69, 0x63, 0x65, 0x6e, 0x73, 0x65, 0x20, 0x46, 0x72, 0x6f, | |
| 122 | 0x6d, 0x20, 0x53, 0x45, 0x47, 0x41, 0x20, 0x45, 0x4e, 0x54, 0x45, 0x52, 0x50, 0x52, 0x49, 0x53, | |
| 123 | 123 | 0x45, 0x53, 0x2c, 0x4c, 0x54, 0x44, 0x2e, 0x20, 0x20, 0x20, 0x20, 0x20, 0xae, 0x01, 0xf4, 0x01 |
| 124 | 124 | }; |
| 125 | 125 | |
| 126 | static UINT8 dc_controller_version[0x50] = | |
| 126 | static const UINT8 dc_controller_version[0x50] = | |
| 127 | 127 | { |
| 128 | 128 | 0x56, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x20, 0x31, 0x2e, 0x30, 0x31, 0x30, 0x2c, 0x31, 0x39, |
| 129 | 129 | 0x39, 0x38, 0x2f, 0x30, 0x39, 0x2f, 0x32, 0x38, 0x2c, 0x33, 0x31, 0x35, 0x2d, 0x36, 0x32, 0x31, |
| 130 | 130 | 0x31, 0x2d, 0x41, 0x42, 0x20, 0x20, 0x20, 0x2c, 0x41, 0x6e, 0x61, 0x6c, 0x6f, 0x67, 0x20, 0x4d, |
| 131 | 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x3a, 0x20, 0x54, 0x68, 0x65, 0x20, 0x34, 0x74, 0x68, 0x20, | |
| 131 | 0x6f, 0x64, 0x75, 0x6c, 0x65, 0x20, 0x3a, 0x20, 0x54, 0x68, 0x65, 0x20, 0x34, 0x74, 0x68, 0x20, | |
| 132 | 132 | 0x45, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x35, 0x2f, 0x38, 0x20, 0x20, 0x2b, 0x44, 0x46 |
| 133 | 133 | }; |
| 134 | 134 | |
| r5666 | r5667 | |
| 584 | 584 | { |
| 585 | 585 | maple_regs[reg] = 1; |
| 586 | 586 | dat=maple_regs[SB_MDSTAR]; |
| 587 | // printf("Maple DMA: %08x %08x %08x %08x\n",maple_regs[SB_MDSTAR],maple_regs[SB_MDTSEL],maple_regs[SB_MDEN],maple_regs[SB_MDST]); | |
| 588 | // printf(" %08x %08x %08x %08x\n",maple_regs[SB_MSYS],maple_regs[SB_MST],maple_regs[SB_MSHTCL],maple_regs[SB_MMSEL]); | |
| 587 | // printf("Maple DMA: %08x %08x %08x %08x\n",maple_regs[SB_MDSTAR],maple_regs[SB_MDTSEL],maple_regs[SB_MDEN],maple_regs[SB_MDST]); | |
| 588 | // printf(" %08x %08x %08x %08x\n",maple_regs[SB_MSYS],maple_regs[SB_MST],maple_regs[SB_MSHTCL],maple_regs[SB_MMSEL]); | |
| 589 | 589 | while (1) // do transfers |
| 590 | 590 | { |
| 591 | 591 | ddtdata.source=dat; // source address |
| r5666 | r5667 | |
| 932 | 932 | { |
| 933 | 933 | maple_regs[reg] = 1; |
| 934 | 934 | dat=maple_regs[SB_MDSTAR]; |
| 935 | // printf("Maple DMA: %08x %08x %08x %08x\n",maple_regs[SB_MDSTAR],maple_regs[SB_MDTSEL],maple_regs[SB_MDEN],maple_regs[SB_MDST]); | |
| 936 | // printf(" %08x %08x %08x %08x\n",maple_regs[SB_MSYS],maple_regs[SB_MST],maple_regs[SB_MSHTCL],maple_regs[SB_MMSEL]); | |
| 935 | // printf("Maple DMA: %08x %08x %08x %08x\n",maple_regs[SB_MDSTAR],maple_regs[SB_MDTSEL],maple_regs[SB_MDEN],maple_regs[SB_MDST]); | |
| 936 | // printf(" %08x %08x %08x %08x\n",maple_regs[SB_MSYS],maple_regs[SB_MST],maple_regs[SB_MSHTCL],maple_regs[SB_MMSEL]); | |
| 937 | 937 | while (1) // do transfers |
| 938 | 938 | { |
| 939 | 939 | ddtdata.source=dat; // source address |
| r5666 | r5667 | |
| 972 | 972 | { |
| 973 | 973 | case 1: // AW/DC MAPLE_CMD_INFO |
| 974 | 974 | ddtdata.length = sizeof(dc_controller_id)/4; |
| 975 | ||
| 975 | ||
| 976 | 976 | buff[0] = 5; // MAPLE_RESP_INFO |
| 977 | 977 | memcpy(&buff[1], dc_controller_id, sizeof(dc_controller_id)); |
| 978 | 978 | break; |
| 979 | 979 | |
| 980 | 980 | case 2: // AW/DC MAPLE_CMD_EXT_INFO |
| 981 | 981 | ddtdata.length = sizeof(dc_controller_id)+sizeof(dc_controller_version)/4; |
| 982 | ||
| 982 | ||
| 983 | 983 | buff[0] = 6; // MAPLE_RESP_EXT_INFO |
| 984 | 984 | memcpy(&buff[1], dc_controller_id, sizeof(dc_controller_id)); |
| 985 | 985 | memcpy(&buff[1+(0x70/4)], dc_controller_version, sizeof(dc_controller_version)); |
| r5666 | r5667 | |
| 994 | 994 | |
| 995 | 995 | case 9: // AW/DC MAPLE_CMD_GET_COND |
| 996 | 996 | buff[0] = 8; // MAPLE_RESP_DATA |
| 997 | ||
| 997 | ||
| 998 | 998 | sprintf(pL, "P%dL", port+1); |
| 999 | 999 | sprintf(pH, "P%dH", port+1); |
| 1000 | ||
| 1000 | ||
| 1001 | 1001 | buff[1] = func; |
| 1002 | 1002 | buff[2] = input_port_read(space->machine, pH)<<8 | input_port_read(space->machine, pL) | 0xffff0000; |
| 1003 | 1003 | buff[3] = 0xffffffff; |
| r5666 | r5667 | |
|---|---|---|
| 13 | 13 | INT8 rtc_index; |
| 14 | 14 | } _snes_rtc_t; |
| 15 | 15 | |
| 16 | _snes_rtc_t snes_rtc; | |
| 16 | static _snes_rtc_t snes_rtc; | |
| 17 | 17 | |
| 18 | const UINT8 srtc_months[12] = | |
| 18 | static const UINT8 srtc_months[12] = | |
| 19 | 19 | { |
| 20 | 20 | 31, 28, 31, |
| 21 | 21 | 30, 31, 30, |
| r5666 | r5667 | |
|---|---|---|
| 2 | 2 | |
| 3 | 3 | DSP-4 emulator code |
| 4 | 4 | |
| 5 | Copyright (c) 2004-2009 Dreamer Nom, John Weidman, Kris Bleakley, | |
| 5 | Copyright (c) 2004-2009 Dreamer Nom, John Weidman, Kris Bleakley, | |
| 6 | 6 | Nach, z80 gaiden, and Jonas Quinn |
| 7 | 7 | |
| 8 | This code is released by ZSNES Team under GNU General Public License | |
| 8 | This code is released by ZSNES Team under GNU General Public License | |
| 9 | 9 | version 2 as published by the Free Software Foundation. |
| 10 | 10 | The implementation below is released under the MAME license for use |
| 11 | 11 | in MAME, MESS and derivatives by permission of the authors. |
| r5666 | r5667 | |
| 30 | 30 | struct DSP4_t DSP4; |
| 31 | 31 | struct DSP4_vars_t DSP4_vars; |
| 32 | 32 | |
| 33 | INLINE UINT16 READ_WORD(UINT8 *addr) | |
| 33 | INLINE UINT16 READ_WORD(UINT8 *addr) | |
| 34 | 34 | { |
| 35 | 35 | return (addr[0]) + (addr[1] << 8); |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | INLINE UINT32 READ_DWORD(UINT8 *addr) | |
| 38 | INLINE UINT32 READ_DWORD(UINT8 *addr) | |
| 39 | 39 | { |
| 40 | 40 | return (addr[0]) + (addr[1] << 8) + (addr[2] << 16) + (addr[3] << 24); |
| 41 | 41 | } |
| 42 | 42 | |
| 43 | INLINE void WRITE_WORD(UINT8 *addr, UINT16 data) | |
| 43 | INLINE void WRITE_WORD(UINT8 *addr, UINT16 data) | |
| 44 | 44 | { |
| 45 | 45 | addr[0] = data; |
| 46 | 46 | addr[1] = data >> 8; |
| r5666 | r5667 | |
|---|---|---|
| 325 | 325 | emu_timer *timer = get_scanline_interrupt_timer_for_screen(screen); |
| 326 | 326 | |
| 327 | 327 | /* generate the interrupt */ |
| 328 | atarigen_scanline_int_gen(machine | |
| 328 | atarigen_scanline_int_gen(cputag_get_cpu(machine, "maincpu") | |
| 329 | 329 | |
| 330 | 330 | /* set a new timer to go off at the same scan line next frame */ |
| 331 | 331 | timer_adjust_oneshot(timer, video_screen_get_frame_period(screen), 0); |
| r5666 | r5667 | |
| 858 | 858 | /* set up the states and signal the sound interrupt to the main CPU */ |
| 859 | 859 | atarigen_sound_to_cpu = param; |
| 860 | 860 | atarigen_sound_to_cpu_ready = 1; |
| 861 | atarigen_sound_int_gen(machine | |
| 861 | atarigen_sound_int_gen(cputag_get_cpu(machine, "maincpu") | |
| 862 | 862 | } |
| 863 | 863 | |
| 864 | 864 | |
| r5666 | r5667 | |
| 1238 | 1238 | /* scanline IRQ ack here */ |
| 1239 | 1239 | case 0x1e: |
| 1240 | 1240 | /* hack: this should be a device */ |
| 1241 | atarigen_scanline_int_ack_w(cpu_get_address_space(screen->machine | |
| 1241 | atarigen_scanline_int_ack_w(cputag_get_address_space(screen->machine, "maincpu" | |
| 1242 | 1242 | break; |
| 1243 | 1243 | |
| 1244 | 1244 | /* log anything else */ |
| r5666 | r5667 | |
| 1468 | 1468 | |
| 1469 | 1469 | void atarigen_halt_until_hblank_0(const device_config *screen) |
| 1470 | 1470 | { |
| 1471 | const device_config *cpu = cputag_get_cpu(screen->machine, "maincpu"); | |
| 1472 | ||
| 1471 | 1473 | /* halt the CPU until the next HBLANK */ |
| 1472 | 1474 | int hpos = video_screen_get_hpos(screen); |
| 1473 | 1475 | int width = video_screen_get_width(screen); |
| r5666 | r5667 | |
| 1480 | 1482 | |
| 1481 | 1483 | /* halt and set a timer to wake up */ |
| 1482 | 1484 | fraction = (double)(hblank - hpos) / (double)width; |
| 1483 | timer_set(screen->machine, double_to_attotime(attotime_to_double(video_screen_get_scan_period(screen)) * fraction), NULL, 0, unhalt_cpu); | |
| 1484 | cpu_set_input_line(screen->machine->cpu[0], INPUT_LINE_HALT, ASSERT_LINE); | |
| 1485 | timer_set(screen->machine, double_to_attotime(attotime_to_double(video_screen_get_scan_period(screen)) * fraction), (void *)cpu, 0, unhalt_cpu); | |
| 1486 | cpu_set_input_line(cpu, INPUT_LINE_HALT, ASSERT_LINE); | |
| 1485 | 1487 | } |
| 1486 | 1488 | |
| 1487 | 1489 | |
| r5666 | r5667 | |
| 1569 | 1571 | |
| 1570 | 1572 | static TIMER_CALLBACK( unhalt_cpu ) |
| 1571 | 1573 | { |
| 1572 | cpu_set_input_line(machine->cpu[param], INPUT_LINE_HALT, CLEAR_LINE); | |
| 1574 | const device_config *cpu = (const device_config *)ptr; | |
| 1575 | cpu_set_input_line(cpu, INPUT_LINE_HALT, CLEAR_LINE); | |
| 1573 | 1576 | } |
| 1574 | 1577 | |
| 1575 | 1578 |
| r5666 | r5667 | |
|---|---|---|
| 225 | 225 | UINT32 prot_offset, prot_key; |
| 226 | 226 | UINT32 aw_offset, aw_file_base, aw_file_offset; |
| 227 | 227 | |
| 228 | UINT32 *prot_translate; | |
| 228 | const UINT32 *prot_translate; | |
| 229 | 229 | int prot_reverse_bytes; |
| 230 | 230 | #if NAOMIBD_PRINTF_PROTECTION |
| 231 | 231 | int prot_pio_count; |
| r5666 | r5667 | |
| 235 | 235 | // maps protection offsets to real addresses |
| 236 | 236 | // format of array: encryption key, address written, address to switch out with. if key is -1 it's ignored and address written is the match. |
| 237 | 237 | // if key is not -1, it's used for the match instead of the address written. |
| 238 | static naomibd_config_table naomibd_translate_tbl[] = | |
| 238 | static const naomibd_config_table naomibd_translate_tbl[] = | |
| 239 | 239 | { |
| 240 | 240 | { "doa2", 0, { -1, 0x500, 0, -1, 0x20504, 0x20000, -1, 0x40508, 0x40000, -1, 0x6050c, 0x60000, -1, 0x80510, 0x80000, |
| 241 | 241 | -1, 0xa0514, 0xa0000, -1, 0xc0518, 0xc0000, -1, 0xe051c, 0xe0000, -1, 0x100520,0x100000, -1, 0x118a3a, 0x120000, |
| r5666 | r5667 | |
| 259 | 259 | 0xad8c, 0, 0xf0000, 0x923d, 0, 0x100000, 0x4a65, 0, 0x110000, 0x9958, 0, 0x120000, 0x8216, 0, 0x130000, |
| 260 | 260 | 0xaa91, 0, 0x140000, 0xd007, 0, 0x150000, 0xead, 0, 0x160000, 0x492, 0, 0x170000, |
| 261 | 261 | 0xffffffff, 0xffffffff, 0xffffffff } }, |
| 262 | { "pjustic", 0, { 0x923d, 0, 0, 0x3e41, 0, 0x10000, 0xb7af, 0, 0x20000, | |
| 263 | 0x9651, 0, 0x30000, 0xad8c, 0, 0x40000, 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 262 | { "pjustic", 0, { 0x923d, 0, 0, 0x3e41, 0, 0x10000, 0xb7af, 0, 0x20000, | |
| 263 | 0x9651, 0, 0x30000, 0xad8c, 0, 0x40000, 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 264 | 264 | { "hmgeo", 0, { 0x6cc8, 0, 0x000000, 0x7b92, 0, 0x010000, 0x69bc, 0, 0x020000, |
| 265 | 265 | 0x6d16, 0, 0x030000, 0x6134, 0, 0x040000, 0x1340, 0, 0x050000, |
| 266 | 266 | 0x7716, 0, 0x060000, 0x2e1a, 0, 0x070000, 0x3030, 0, 0x080000, |
| r5666 | r5667 | |
| 268 | 268 | 0x6df0, 0, 0x0c0000, 0x0dd8, 0, 0x0d0000, 0x576c, 0, 0x0e0000, |
| 269 | 269 | 0x0534, 0, 0x0f0000, 0x0904, 0, 0x100000, 0x2f14, 0, 0x110000, |
| 270 | 270 | 0x1792, 0, 0x120000, 0x6866, 0, 0x130000, 0x06fa, 0, 0x140000, |
| 271 | 0x2842, 0, 0x150000, 0x7cc8, 0, 0x160000, 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 271 | 0x2842, 0, 0x150000, 0x7cc8, 0, 0x160000, 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 272 | 272 | { "wwfroyal",0, { 0xaaaa, 0, 0, 0xffffffff, 0xffffffff, 0xffffffff } }, |
| 273 | 273 | { "gwing2", 0, { -1, 0x85ddc0, 0, 0xd567, 0, 0x10000, 0xe329, 0, 0x30000, 0xc112, 0, 0x50000, |
| 274 | 274 | 0xabcd, 0, 0x70000, 0xef01, 0, 0x90000, 0x1234, 0, 0xb0000, 0x5678, 0, 0xd0000, |
| 275 | 0x5555, 0, 0xf0000, 0x6666, 0, 0x110000, 0xa901, 0, 0x130000, 0xa802, 0, 0x150000, | |
| 275 | 0x5555, 0, 0xf0000, 0x6666, 0, 0x110000, 0xa901, 0, 0x130000, 0xa802, 0, 0x150000, | |
| 276 | 276 | 0x3232, 0, 0x170000, 0x8989, 0, 0x190000, 0x6655, 0, 0x1a0000, |
| 277 | 277 | 0x3944, 0, 0x1c0000, 0x655a, 0, 0x1d0000, 0xf513, 0, 0x1e0000, |
| 278 | 278 | 0xb957, 0, 0, 0x37ca, 0, 0, 0xffffffff, 0xffffffff, 0xffffffff } }, |
| 279 | /* { "pstone2", 0, { 0x4a65, 0, 0x000000, 0x0ead, 0, 0x010000, 0x0492, 0, 0x020000, 0x414a, 0, 0x030000, | |
| 280 | 0xad8c, 0, 0x040000, 0x923d, 0, 0x050000, 0x4a65, 0, 0x060000, 0x9958, 0, 0x070000, | |
| 281 | 0x8216, 0, 0x080000, 0xaa91, 0, 0x090000, 0xd007, 0, 0x0a0000, 0x71ee, 0, 0x0b0000, | |
| 282 | 0x3e41, 0, 0x0c0000, 0xb7af, 0, 0x0d0000, 0x9651, 0, 0x0e0000, 0x0492, 0, 0x0f0000, | |
| 283 | 0x414a, 0, 0x100000, 0xaf99, 0, 0x110000, 0x5182, 0, 0x120000, 0x08aa, 0, 0x130000, | |
| 284 | 0x69d0, 0, 0x140000, 0x9d71, 0, 0x150000, 0xd319, 0, 0x160000, 0xcc09, 0, 0x170000, | |
| 285 | 0x5ec4, 0, 0x180000, 0x7103, 0, 0x190000, 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 279 | /* { "pstone2", 0, { 0x4a65, 0, 0x000000, 0x0ead, 0, 0x010000, 0x0492, 0, 0x020000, 0x414a, 0, 0x030000, | |
| 280 | 0xad8c, 0, 0x040000, 0x923d, 0, 0x050000, 0x4a65, 0, 0x060000, 0x9958, 0, 0x070000, | |
| 281 | 0x8216, 0, 0x080000, 0xaa91, 0, 0x090000, 0xd007, 0, 0x0a0000, 0x71ee, 0, 0x0b0000, | |
| 282 | 0x3e41, 0, 0x0c0000, 0xb7af, 0, 0x0d0000, 0x9651, 0, 0x0e0000, 0x0492, 0, 0x0f0000, | |
| 283 | 0x414a, 0, 0x100000, 0xaf99, 0, 0x110000, 0x5182, 0, 0x120000, 0x08aa, 0, 0x130000, | |
| 284 | 0x69d0, 0, 0x140000, 0x9d71, 0, 0x150000, 0xd319, 0, 0x160000, 0xcc09, 0, 0x170000, | |
| 285 | 0x5ec4, 0, 0x180000, 0x7103, 0, 0x190000, 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 286 | 286 | */ |
| 287 | 287 | { "toyfight", 0,{ 0x0615, 0, 0x0000, 0x1999, 0, 0x1000, 0x7510, 0, 0x2000, 0x5736, 0, 0x3000, |
| 288 | 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 288 | 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 289 | 289 | { "ggx", 0,{ -1, 0x200000, 0x100000, -1, 0x210004, 0x110000, -1, 0x220008, 0x120000, -1, 0x228000, 0x130000, |
| 290 | 290 | 0x3af9, 0, 0x000000, 0x2288, 0, 0x010000, 0xe5e6, 0, 0x020000, 0xebb0, 0, 0x030000, |
| 291 | 291 | 0x0228, 0, 0x040000, 0x872c, 0, 0x050000, 0xbba0, 0, 0x060000, 0x772f, 0, 0x070000, |
| 292 | 292 | 0x2924, 0, 0x080000, 0x3222, 0, 0x090000, 0x7954, 0, 0x0a0000, 0x5acd, 0, 0x0b0000, |
| 293 | 293 | 0xdd19, 0, 0x0c0000, 0x2428, 0, 0x0d0000, 0x3329, 0, 0x0e0000, 0x2142, 0, 0x0f0000, |
| 294 | 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 294 | 0xffffffff, 0xffffffff, 0xffffffff } }, | |
| 295 | 295 | }; |
| 296 | 296 | |
| 297 | 297 | /*************************************************************************** |
| r5666 | r5667 | |
|---|---|---|
| 37 | 37 | - see notes about this "calculator" implementation in drivers\galpanic.c |
| 38 | 38 | - bonkadv only uses Random Number, XY Overlap Collision bit and register '0x02' |
| 39 | 39 | */ |
| 40 | READ16_HANDLER(shogwarr_calc_r); | |
| 41 | WRITE16_HANDLER(shogwarr_calc_w); | |
| 40 | static READ16_HANDLER(shogwarr_calc_r); | |
| 41 | static WRITE16_HANDLER(shogwarr_calc_w); | |
| 42 | 42 | |
| 43 | 43 | static struct { |
| 44 | 44 | UINT16 x1p, y1p, x1s, y1s; |
| r5666 | r5667 | |
| 399 | 399 | } |
| 400 | 400 | |
| 401 | 401 | |
| 402 | WRITE16_HANDLER(shogwarr_calc_w) | |
| 402 | static WRITE16_HANDLER(shogwarr_calc_w) | |
| 403 | 403 | { |
| 404 | 404 | int idx=offset*4; |
| 405 | 405 | switch (idx) |
| r5666 | r5667 | |
| 464 | 464 | } |
| 465 | 465 | |
| 466 | 466 | |
| 467 | READ16_HANDLER(shogwarr_calc_r) | |
| 467 | static READ16_HANDLER(shogwarr_calc_r) | |
| 468 | 468 | { |
| 469 | 469 | |
| 470 | 470 | int idx=offset*4; |
| r5666 | r5667 | |
| 558 | 558 | calc3_mcu_command_offset = 0; |
| 559 | 559 | } |
| 560 | 560 | |
| 561 | void calc3_mcu_run(running_machine *machine); | |
| 562 | ||
| 563 | 561 | WRITE16_HANDLER( calc3_mcu_ram_w ) |
| 564 | 562 | { |
| 565 | 563 | COMBINE_DATA(&kaneko16_mcu_ram[offset]); |
| r5666 | r5667 | |
| 634 | 632 | */ |
| 635 | 633 | |
| 636 | 634 | |
| 637 | UINT16 calc3_mcu_crc; | |
| 635 | static UINT16 calc3_mcu_crc; | |
| 638 | 636 | |
| 639 | 637 | /* decryption tables */ |
| 640 | 638 | |
| r5666 | r5667 | |
| 647 | 645 | part of the table to be 0 |
| 648 | 646 | */ |
| 649 | 647 | |
| 650 | static INT16 calc3_keydata[0x40*0x100] = { | |
| 648 | static const INT16 calc3_keydata[0x40*0x100] = { | |
| 651 | 649 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 652 | 650 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| 653 | 651 | 0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00, |
| r5666 | r5667 | |
| 1686 | 1684 | |
| 1687 | 1685 | static int data_header[2]; |
| 1688 | 1686 | |
| 1689 | UINT32 calc3_writeaddress; | |
| 1690 | UINT32 calc3_writeaddress_current; | |
| 1691 | UINT16 calc3_dsw_addr = 0x00; | |
| 1692 | UINT16 calc3_eeprom_addr; | |
| 1693 | UINT16 calc3_poll_addr; | |
| 1694 | UINT16 cakc3_checkumaddress; | |
| 1687 | static UINT32 calc3_writeaddress; | |
| 1688 | static UINT32 calc3_writeaddress_current; | |
| 1689 | static UINT16 calc3_dsw_addr = 0x00; | |
| 1690 | static UINT16 calc3_eeprom_addr; | |
| 1691 | static UINT16 calc3_poll_addr; | |
| 1692 | static UINT16 cakc3_checkumaddress; | |
| 1695 | 1693 | |
| 1696 | 1694 | static UINT8 shift_bits(UINT8 dat, int bits) |
| 1697 | 1695 | { |
| r5666 | r5667 | |
| 1710 | 1708 | } |
| 1711 | 1709 | |
| 1712 | 1710 | // endian safe? you're having a laugh |
| 1713 | int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram, int dstoffset) | |
| 1711 | static int calc3_decompress_table(running_machine* machine, int tabnum, UINT8* dstram, int dstoffset) | |
| 1714 | 1712 | { |
| 1715 | 1713 | |
| 1716 | 1714 | |
| r5666 | r5667 | |
| 1940 | 1938 | } |
| 1941 | 1939 | else |
| 1942 | 1940 | { |
| 1943 | INT16* key = calc3_keydata+(calc3_decryption_key_byte*0x40); | |
| 1941 | const INT16* key = calc3_keydata+(calc3_decryption_key_byte*0x40); | |
| 1944 | 1942 | |
| 1945 | 1943 | if (key[0] == -1) |
| 1946 | 1944 | { |
| r5666 | r5667 | |
| 2105 | 2103 | |
| 2106 | 2104 | |
| 2107 | 2105 | |
| 2108 | extern UINT16 calc3_mcu_crc; | |
| 2109 | ||
| 2110 | 2106 | void calc3_mcu_run(running_machine *machine) |
| 2111 | 2107 | { |
| 2112 | 2108 | UINT16 mcu_command; |
| r5666 | r5667 | |
|---|---|---|
| 6938 | 6938 | DRIVER( phtetris ) |
| 6939 | 6939 | DRIVER( phpython ) |
| 6940 | 6940 | |
| 6941 | /* Photon IK2 hardware */ | |
| 6942 | DRIVER( kok ) | |
| 6943 | DRIVER( black ) | |
| 6944 | DRIVER( brod ) | |
| 6945 | ||
| 6941 | 6946 | /* Valadon Automation games */ |
| 6942 | 6947 | DRIVER( bagman ) /* (c) 1982 */ |
| 6943 | 6948 | DRIVER( bagnard ) /* (c) 1982 */ |
| r5666 | r5667 | |
|---|---|---|
| 7 | 7 | |
| 8 | 8 | extern UINT16 *nmk_fgvideoram,*nmk_txvideoram; |
| 9 | 9 | extern UINT16 *gunnail_scrollram, *gunnail_scrollramy; |
| 10 | extern UINT16 *nmk_bgvideoram0, *afega_scroll_0; | |
| 11 | extern UINT16 *nmk_txvideoram, *afega_scroll_1; | |
| 10 | extern UINT16 *afega_scroll_0; | |
| 11 | extern UINT16 *afega_scroll_1; | |
| 12 | 12 | |
| 13 | 13 | |
| 14 | 14 | WRITE16_HANDLER( nmk_bgvideoram0_w ); |
| r5666 | r5667 | |
| 20 | 20 | WRITE16_HANDLER( nmk_txvideoram_w ); |
| 21 | 21 | WRITE16_HANDLER( nmk_scroll_w ); |
| 22 | 22 | WRITE16_HANDLER( nmk_scroll_2_w ); |
| 23 | WRITE16_HANDLER( nmk_scroll_3_w ); | |
| 24 | 23 | WRITE16_HANDLER( nmk_flipscreen_w ); |
| 25 | 24 | WRITE16_HANDLER( nmk_tilebank_w ); |
| 26 | 25 | WRITE16_HANDLER( bioship_scroll_w ); |
| r5666 | r5667 | |
|---|---|---|
| 3 | 3 | extern UINT32 *stv_workram_h; |
| 4 | 4 | extern UINT32 *stv_workram_l; |
| 5 | 5 | |
| 6 | extern int stv_vblank,stv_hblank; | |
| 7 | 6 | extern int stv_enable_slave_sh2; |
| 8 | 7 | |
| 9 | 8 | extern int minit_boost,sinit_boost; |
| r5666 | r5667 | |
| 79 | 78 | |
| 80 | 79 | extern UINT32* stv_vdp2_regs; |
| 81 | 80 | extern UINT32* stv_vdp2_vram; |
| 81 | extern int stv_vblank,stv_hblank; | |
| 82 | 82 | extern UINT32* stv_vdp2_cram; |
| 83 | 83 | |
| 84 | 84 | UINT8 stv_get_vblank(running_machine *machine); |
| r0 | r5667 | |
|---|---|---|
| 1 | #include "sound/discrete.h" | |
| 2 | ||
| 3 | ||
| 4 | /* Discrete Sound Input Nodes */ | |
| 5 | #define NORAUTP_SND_EN NODE_01 | |
| 6 | #define NORAUTP_FREQ_DATA NODE_02 | |
| 7 | ||
| 8 | ||
| 9 | /*----------- defined in audio/norautp.c -----------*/ | |
| 10 | ||
| 11 | DISCRETE_SOUND_EXTERN( norautp ); |
| r5666 | r5667 | |
|---|---|---|
| 32 | 32 | void bloodwar_mcu_run(running_machine *machine); |
| 33 | 33 | void bonkadv_mcu_run(running_machine *machine); |
| 34 | 34 | void gtmr_mcu_run(running_machine *machine); |
| 35 | void calc3_mcu_run(running_machine *machine); | |
| 36 | ||
| 35 | 37 | void toxboy_handle_04_subcommand(running_machine* machine,UINT8 mcu_subcmd, UINT16*mcu_ram); |
| 38 | ||
| 36 | 39 | DRIVER_INIT( decrypt_toybox_rom ); |
| 37 | 40 | DRIVER_INIT( decrypt_toybox_rom_alt ); |
| 41 | DRIVER_INIT( calc3_scantables ); | |
| 38 | 42 | |
| 43 | ||
| 44 | ||
| 39 | 45 | /*----------- defined in drivers/kaneko16.c -----------*/ |
| 40 | 46 | |
| 41 | 47 | MACHINE_RESET( kaneko16 ); |
| r5666 | r5667 | |
|---|---|---|
| 48 | 48 | VIDEO_UPDATE( yboard ); |
| 49 | 49 | |
| 50 | 50 | |
| 51 | ||
| 52 | /******************** OLD STUFF *******************/ | |
| 53 | ||
| 54 | #define SYS16_SPR_FLIPX 0x01 | |
| 55 | #define SYS16_SPR_VISIBLE 0x04 | |
| 56 | #define SYS16_SPR_DRAW_TO_LEFT 0x08 | |
| 57 | #define SYS16_SPR_SPECIAL 0x10 | |
| 58 | #define SYS16_SPR_SHADOW 0x20 /* all pixels */ | |
| 59 | #define SYS16_SPR_PARTIAL_SHADOW 0x40 /* pen #10 */ | |
| 60 | #define SYS16_SPR_DRAW_TO_TOP 0x80 | |
| 61 | ||
| 62 | struct sys16_sprite_attributes { | |
| 63 | int priority, flags; | |
| 64 | int gfx, color; | |
| 65 | UINT8 pitch; | |
| 66 | int zoomx, zoomy; | |
| 67 | int x,y, screen_height; /* in screen coordinates */ | |
| 68 | int shadow_pen; | |
| 69 | }; | |
| 70 | ||
| 71 | extern int (*sys16_spritesystem)( | |
| 72 | struct sys16_sprite_attributes *sprite, | |
| 73 | const UINT16 *source, | |
| 74 | int bJustGetColor ); | |
| 75 | ||
| 76 | /*----------- defined in video/sys16spr.c -----------*/ | |
| 77 | ||
| 78 | extern int sys16_sprite_shinobi( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ); | |
| 79 | extern int sys16_sprite_passshot( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ); | |
| 80 | extern int sys16_sprite_quartet2( struct sys16_sprite_attributes *sprite, const UINT16 *source, int bJustGetColor ); | |
| 81 | ||
| 82 | #define NumOfShadowColors 32 | |
| 83 | #define ShadowColorsMultiplier 2 | |
| 84 | ||
| 85 | 51 | /*----------- defined in machine/s16fd.c -----------*/ |
| 86 | 52 | |
| 87 | 53 | void *fd1094_get_decrypted_base(void); |
| r5666 | r5667 | |
| 110 | 76 | |
| 111 | 77 | extern void sys16_patch_code( running_machine *machine, const sys16_patch *patch, int count ); |
| 112 | 78 | |
| 113 | #define SYS16_MWA16_PALETTERAM sys16_paletteram_w | |
| 114 | #define SYS16_MRA16_PALETTERAM SMH_RAM | |
| 115 | ||
| 116 | #define SYS16_MRA16_WORKINGRAM SMH_RAM | |
| 117 | #define SYS16_MWA16_WORKINGRAM SMH_RAM | |
| 118 | ||
| 119 | #define SYS16_MRA16_WORKINGRAM2 SMH_RAM | |
| 120 | #define SYS16_MWA16_WORKINGRAM2 SMH_RAM | |
| 121 | ||
| 122 | 79 | extern MACHINE_RESET( sys16_onetime ); |
| 123 | 80 | |
| 124 | #define SYS16_MRA16_SPRITERAM SMH_RAM | |
| 125 | #define SYS16_MWA16_SPRITERAM SMH_RAM | |
| 126 | ||
| 127 | #define SYS16_MRA16_EXTRAM SMH_RAM | |
| 128 | #define SYS16_MWA16_EXTRAM SMH_RAM | |
| 129 | ||
| 130 | #define SYS16_MRA16_EXTRAM2 SMH_RAM | |
| 131 | #define SYS16_MWA16_EXTRAM2 SMH_RAM | |
| 132 | ||
| 133 | #define SYS16_MRA16_EXTRAM3 SMH_RAM | |
| 134 | #define SYS16_MWA16_EXTRAM3 SMH_RAM | |
| 135 | ||
| 136 | #define SYS16_MRA16_EXTRAM4 SMH_RAM | |
| 137 | #define SYS16_MWA16_EXTRAM4 SMH_RAM | |
| 138 | ||
| 139 | #define SYS16_MRA16_ROADRAM SMH_RAM | |
| 140 | #define SYS16_MWA16_ROADRAM SMH_RAM | |
| 141 | ||
| 142 | 81 | GFXDECODE_EXTERN( sys16 ); |
| 143 | 82 | |
| 144 | 83 | /*----------- defined in video/system16.c -----------*/ |
| r5666 | r5667 | |
| 160 | 99 | /* video hardware */ |
| 161 | 100 | extern WRITE16_HANDLER( sys16_tileram_w ); |
| 162 | 101 | extern WRITE16_HANDLER( sys16_textram_w ); |
| 163 | extern WRITE16_HANDLER( sys16_paletteram_w ); | |
| 164 | 102 | |
| 165 | 103 | /* "normal" video hardware */ |
| 166 | 104 | extern VIDEO_START( system16 ); |
| r5666 | r5667 | |
| 205 | 143 | extern int sys16_fg_scrollx, sys16_fg_scrolly; |
| 206 | 144 | extern int sys16_fg_page[4]; |
| 207 | 145 | |
| 208 | extern int sys16_bg2_scrollx, sys16_bg2_scrolly; | |
| 209 | 146 | extern int sys16_bg2_page[4]; |
| 210 | extern int sys16_fg2_scrollx, sys16_fg2_scrolly; | |
| 211 | 147 | extern int sys16_fg2_page[4]; |
| 212 | 148 | |
| 213 | 149 | extern int sys18_bg2_active; |
| r5666 | r5667 | |
|---|---|---|
| 1 | /*----------- defined in video/pk8000.c -----------*/ | |
| 2 | ||
| 1 | 3 | READ8_HANDLER(pk8000_video_color_r); |
| 2 | 4 | WRITE8_HANDLER(pk8000_video_color_w); |
| 3 | 5 | READ8_HANDLER(pk8000_text_start_r); |
| r5666 | r5667 | |
| 17 | 19 | PALETTE_INIT( pk8000 ); |
| 18 | 20 | |
| 19 | 21 | UINT32 pk8000_video_update(const device_config *screen, bitmap_t *bitmap, const rectangle *cliprect, UINT8 *videomem); |
| 20 | ||
| 21 |
| r5666 | r5667 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | extern UINT32 dc_sysctrl_regs[0x200/4]; |
| 42 | 42 | extern UINT32 dc_coin_counts[2]; |
| 43 | extern UINT | |
| 43 | extern UINT8 | |
| 44 | 44 | |
| 45 | 45 | /*--------- Ch2-DMA Control Registers ----------*/ |
| 46 | 46 | #define SB_C2DSTAT ((0x005f6800-0x005f6800)/4) |
| r5666 | r5667 | |
| 203 | 203 | |
| 204 | 204 | /*----------- defined in video/dc.c -----------*/ |
| 205 | 205 | |
| 206 | extern UINT32 pvrctrl_regs[0x100/4]; | |
| 206 | 207 | extern UINT64 *dc_texture_ram; |
| 207 | 208 | extern UINT64 *dc_framebuffer_ram; |
| 208 | 209 |
| r5666 | r5667 | |
|---|---|---|
| 32 | 32 | |
| 33 | 33 | /*----------- defined in video/st0016.c -----------*/ |
| 34 | 34 | |
| 35 | extern UINT8 *st0016_charram | |
| 35 | extern UINT8 *st0016_charram | |
| 36 | 36 | |
| 37 | 37 | extern UINT8 *macs_ram1,*macs_ram2; |
| 38 | 38 |
| r5666 | r5667 | |
|---|---|---|
| 403 | 403 | extern READ8_HANDLER( superfx_r_bank1 ); |
| 404 | 404 | extern READ8_HANDLER( superfx_r_bank2 ); |
| 405 | 405 | extern READ8_HANDLER( superfx_r_bank3 ); |
| 406 | extern READ8_HANDLER( superfx_r_bank4 ); | |
| 407 | 406 | extern WRITE8_HANDLER( superfx_w_bank1 ); |
| 408 | 407 | extern WRITE8_HANDLER( superfx_w_bank2 ); |
| 409 | 408 | extern WRITE8_HANDLER( superfx_w_bank3 ); |
| 410 | extern WRITE8_HANDLER( superfx_w_bank4 ); | |
| 411 | 409 | |
| 412 | 410 | WRITE_LINE_DEVICE_HANDLER( snes_extern_irq_w ); |
| 413 | 411 | |
| 414 | 412 | extern UINT8 snes_has_addon_chip; |
| 413 | extern UINT16 snes_htmult; | |
| 415 | 414 | |
| 416 | 415 | extern void snes_gdma( const address_space *space, UINT8 channels ); |
| 417 | 416 | extern void snes_hdma_init(void); |
| r0 | r5667 | |
|---|---|---|
| 1 | /*----------- defined in drivers/cischeat.c -----------*/ | |
| 2 | ||
| 3 | extern UINT16 scudhamm_motor_command; | |
| 4 | ||
| 5 | READ16_HANDLER( scudhamm_motor_pos_r ); | |
| 6 | READ16_HANDLER( scudhamm_motor_status_r ); | |
| 7 | READ16_HANDLER( scudhamm_analog_r ); | |
| 8 | ||
| 9 | ||
| 10 | /*----------- defined in video/cischeat.c -----------*/ | |
| 11 | ||
| 12 | extern UINT16 *cischeat_roadram[2]; | |
| 13 | extern UINT16 *f1gpstr2_ioready; | |
| 14 | ||
| 15 | READ16_HANDLER( bigrun_vregs_r ); | |
| 16 | READ16_HANDLER( cischeat_vregs_r ); | |
| 17 | READ16_HANDLER( f1gpstar_vregs_r ); | |
| 18 | READ16_HANDLER( f1gpstr2_vregs_r ); | |
| 19 | READ16_HANDLER( wildplt_vregs_r ); | |
| 20 | ||
| 21 | WRITE16_HANDLER( bigrun_vregs_w ); | |
| 22 | WRITE16_HANDLER( cischeat_vregs_w ); | |
| 23 | WRITE16_HANDLER( f1gpstar_vregs_w ); | |
| 24 | WRITE16_HANDLER( f1gpstr2_vregs_w ); | |
| 25 | WRITE16_HANDLER( scudhamm_vregs_w ); | |
| 26 | ||
| 27 | CUSTOM_INPUT( cischeat_shift_r ); | |
| 28 | ||
| 29 | VIDEO_START( bigrun ); | |
| 30 | VIDEO_START( cischeat ); | |
| 31 | VIDEO_START( f1gpstar ); | |
| 32 | ||
| 33 | VIDEO_UPDATE( bigrun ); | |
| 34 | VIDEO_UPDATE( cischeat ); | |
| 35 | VIDEO_UPDATE( f1gpstar ); | |
| 36 | VIDEO_UPDATE( scudhamm ); |
| r5666 | r5667 | |
|---|---|---|
| 1568 | 1568 | $(DRIVERS)/murogem.o \ |
| 1569 | 1569 | $(DRIVERS)/murogmbl.o \ |
| 1570 | 1570 | $(DRIVERS)/news.o $(VIDEO)/news.o \ |
| 1571 | $(DRIVERS)/norautp.o \ | |
| 1571 | $(DRIVERS)/norautp.o $(AUDIO)/norautp.o \ | |
| 1572 | 1572 | $(DRIVERS)/oneshot.o $(VIDEO)/oneshot.o \ |
| 1573 | 1573 | $(DRIVERS)/onetwo.o \ |
| 1574 | 1574 | $(DRIVERS)/othldrby.o $(VIDEO)/othldrby.o \ |
| r5666 | r5667 | |
| 1580 | 1580 | $(DRIVERS)/pcxt.o \ |
| 1581 | 1581 | $(DRIVERS)/peplus.o \ |
| 1582 | 1582 | $(DRIVERS)/photon.o $(VIDEO)/pk8000.o \ |
| 1583 | $(DRIVERS)/photon2.o \ | |
| 1583 | 1584 | $(DRIVERS)/pipeline.o \ |
| 1584 | 1585 | $(DRIVERS)/photoply.o \ |
| 1585 | 1586 | $(DRIVERS)/pkscram.o \ |
| r5666 | r5667 | |
|---|---|---|
| 497 | 497 | /* iterate over rows */ |
| 498 | 498 | for (y = cliprect->min_y; y <= cliprect->max_y; y++) |
| 499 | 499 | { |
| 500 | UINT16 *fgbase = BITMAP_ADDR16(fgpixmap, y, 0); | |
| 501 | UINT16 *sprbase = BITMAP_ADDR16(sprite_bitmap, y, 0); | |
| 500 | UINT16 *fgbase = BITMAP_ADDR16(fgpixmap, y & 0xff, 0); | |
| 501 | UINT16 *sprbase = BITMAP_ADDR16(sprite_bitmap, y & 0xff, 0); | |
| 502 | 502 | UINT16 *dstbase = BITMAP_ADDR16(bitmap, y, 0); |
| 503 | 503 | int bgy = (y + bgyscroll) & 0x1ff; |
| 504 | 504 | int bgxscroll = bgrowscroll[y / 8]; |
| r5666 | r5667 | |
|---|---|---|
| 29 | 29 | #include "video/resnet.h" |
| 30 | 30 | #include "video/segaic16.h" |
| 31 | 31 | |
| 32 | int system16_bootleg_spritebank_type = -1; | |
| 33 | int system16_bootleg_back_tilemap_yscroll = 0; | |
| 34 | int system16_bootleg_fore_tilemap_yscroll = 0; | |
| 35 | int system16_bootleg_text_tilemap_yscroll = 0; | |
| 36 | int system16_bootleg_sprite_xoffs = 0; | |
| 32 | static int system16_bootleg_spritebank_type = -1; | |
| 33 | static int system16_bootleg_back_tilemap_yscroll = 0; | |
| 34 | static int system16_bootleg_fore_tilemap_yscroll = 0; | |
| 35 | static int system16_bootleg_text_tilemap_yscroll = 0; | |
| 36 | static int system16_bootleg_sprite_xoffs = 0; | |
| 37 | 37 | |
| 38 | 38 | /* A config table for per-game offsets and bank types */ |
| 39 | 39 | struct system15_bootleg_config |
| r5666 | r5667 | |
| 85 | 85 | |
| 86 | 86 | |
| 87 | 87 | |
| 88 | void setup_system16_bootleg_video(running_machine* machine) | |
| 88 | static void setup_system16_bootleg_video(running_machine* machine) | |
| 89 | 89 | { |
| 90 | 90 | const char *gamename = machine->gamedrv->name; |
| 91 | 91 | const struct system15_bootleg_config *k = &config_table[0]; |
| r5666 | r5667 | |
| 108 | 108 | if (!found) fatalerror("system16 bootleg not in system15_bootleg_config config_table[]!\n"); |
| 109 | 109 | } |
| 110 | 110 | |
| 111 | void setup_system16_bootleg_spritebanking(running_machine* machine) | |
| 111 | static void setup_system16_bootleg_spritebanking(running_machine* machine) | |
| 112 | 112 | { |
| 113 | 113 | |
| 114 | 114 | if (system16_bootleg_spritebank_type == 1) |
| r5666 | r5667 | |
| 171 | 171 | int sys16_refreshenable; |
| 172 | 172 | |
| 173 | 173 | int sys16_bg_scrollx, sys16_bg_scrolly; |
| 174 | int sys16_bg2_scrollx, sys16_bg2_scrolly; | |
| 175 | 174 | int sys16_fg_scrollx, sys16_fg_scrolly; |
| 176 | int sys16_fg2_scrollx, sys16_fg2_scrolly; | |
| 177 | 175 | |
| 178 | 176 | int sys16_bg_page[4]; |
| 179 | 177 | int sys16_bg2_page[4]; |
| r5666 | r5667 | |
| 311 | 309 | static const int resistances_sh[6] = {3900, 2000, 1000, 1000/2, 1000/4, 470}; |
| 312 | 310 | static double weights[2][3][6]; |
| 313 | 311 | |
| 314 | #if | |
| 312 | #ifdef UNUSED_CODE | |
| 315 | 313 | WRITE16_HANDLER( sys16_paletteram_w ) |
| 316 | 314 | { |
| 317 | 315 | UINT16 newword; |
| r5666 | r5667 | |
|---|---|---|
| 19 | 19 | UINT8 *bnj_backgroundram; |
| 20 | 20 | UINT8 *zoar_scrollram; |
| 21 | 21 | UINT8 *deco_charram; |
| 22 | UINT8 *progolf_fg_fb; | |
| 22 | //UINT8 *progolf_fg_fb; | |
| 23 | 23 | size_t bnj_backgroundram_size; |
| 24 | 24 | |
| 25 | 25 | static UINT8 btime_palette = 0; |
| r5666 | r5667 | |
|---|---|---|
| 1014 | 1014 | reg = decode_reg_64(offset, mem_mask, &shift); |
| 1015 | 1015 | dat = (UINT32)(data >> shift); |
| 1016 | 1016 | old = pvrta_regs[reg]; |
| 1017 | pvrta_regs[reg] = dat; // 5f8000+reg*4=dat | |
| 1018 | 1017 | |
| 1018 | // Dreamcast BIOS attempts to set PVRID to zero and then dies | |
| 1019 | // if it succeeds. Don't allow. | |
| 1020 | if ((reg != PVRID) && (reg != REVISION)) | |
| 1021 | { | |
| 1022 | pvrta_regs[reg] = dat; // 5f8000+reg*4=dat | |
| 1023 | } | |
| 1024 | ||
| 1019 | 1025 | switch (reg) |
| 1020 | 1026 | { |
| 1021 | 1027 | case SOFTRESET: |
| r5666 | r5667 | |
|---|---|---|
| 6 | 6 | #include "driver.h" |
| 7 | 7 | #include "st0016.h" |
| 8 | 8 | |
| 9 | UINT8 *st0016_charram,*st0016_spriteram,*st0016_paletteram; | |
| 9 | UINT8 *st0016_charram; | |
| 10 | static UINT8 *st0016_spriteram,*st0016_paletteram; | |
| 10 | 11 | |
| 11 | 12 | UINT8 *macs_ram1,*macs_ram2; |
| 12 | 13 |
| r5666 | r5667 | |
|---|---|---|
| 124 | 124 | static struct SCANLINE scanlines[2]; |
| 125 | 125 | struct SNES_PPU_STRUCT snes_ppu; |
| 126 | 126 | |
| 127 | extern UINT16 snes_htmult; | |
| 128 | ||
| 129 | 127 | enum |
| 130 | 128 | { |
| 131 | 129 | SNES_COLOR_DEPTH_2BPP = 0, |
| r5666 | r5667 | |
|---|---|---|
| 55 | 55 | |
| 56 | 56 | #include "driver.h" |
| 57 | 57 | #include "megasys1.h" |
| 58 | #include "includes/cischeat.h" | |
| 58 | 59 | |
| 59 | 60 | /* Variables only used here: */ |
| 60 | 61 | |
| r5666 | r5667 | |
| 1313 | 1314 | Scud Hammer |
| 1314 | 1315 | **************************************************************************/ |
| 1315 | 1316 | |
| 1316 | extern UINT16 scudhamm_motor_command; | |
| 1317 | ||
| 1318 | READ16_HANDLER( scudhamm_motor_pos_r ); | |
| 1319 | READ16_HANDLER( scudhamm_motor_status_r ); | |
| 1320 | READ16_HANDLER( scudhamm_analog_r ); | |
| 1321 | ||
| 1322 | 1317 | VIDEO_UPDATE( scudhamm ) |
| 1323 | 1318 | { |
| 1324 | 1319 | int megasys1_active_layers1, flag; |
| r5666 | r5667 | |
|---|---|---|
| 1276 | 1276 | |
| 1277 | 1277 | MACHINE_RESET( avgdvg ) |
| 1278 | 1278 | { |
| 1279 | avgdvg_reset_w (cpu_get_address_space(machine | |
| 1279 | avgdvg_reset_w (cputag_get_address_space(machine, "maincpu" | |
| 1280 | 1280 | } |
| 1281 | 1281 | |
| 1282 | 1282 |
| r5666 | r5667 | |
|---|---|---|
| 125 | 125 | void (*ppu_latch)( const device_config *device, offs_t offset ); |
| 126 | 126 | |
| 127 | 127 | /* palette handlers */ |
| 128 | WRITE8_HANDLER( ppu2c0x_palette_write ); | |
| 129 | READ8_HANDLER( ppu2c0x_palette_read ); | |
| 128 | static WRITE8_HANDLER( ppu2c0x_palette_write ); | |
| 129 | static READ8_HANDLER( ppu2c0x_palette_read ); | |
| 130 | 130 | /* name and attribute table functions */ |
| 131 | 131 | WRITE8_HANDLER( ppu2c0x_name_write ); |
| 132 | 132 | READ8_HANDLER( ppu2c0x_name_read ); |
| r5666 | r5667 | |
| 980 | 980 | * |
| 981 | 981 | *************************************/ |
| 982 | 982 | |
| 983 | WRITE8_HANDLER( ppu2c0x_palette_write ) | |
| 983 | static WRITE8_HANDLER( ppu2c0x_palette_write ) | |
| 984 | 984 | { |
| 985 | 985 | ppu2c0x_chip *this_ppu = get_token(space->cpu); |
| 986 | 986 | const ppu2c0x_interface *intf = get_interface(space->cpu); |
| r5666 | r5667 | |
| 1011 | 1011 | } |
| 1012 | 1012 | } |
| 1013 | 1013 | |
| 1014 | READ8_HANDLER( ppu2c0x_palette_read ) | |
| 1014 | static READ8_HANDLER( ppu2c0x_palette_read ) | |
| 1015 | 1015 | { |
| 1016 | 1016 | ppu2c0x_chip *this_ppu = get_token(space->cpu); |
| 1017 | 1017 | { |
| r5666 | r5667 | |
|---|---|---|
| 46 | 46 | |
| 47 | 47 | } |
| 48 | 48 | |
| 49 | void skeetsht_scanline_update(const device_config *screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params) | |
| 49 | static void skeetsht_scanline_update(const device_config *screen, bitmap_t *bitmap, int scanline, const tms34010_display_params *params) | |
| 50 | 50 | { |
| 51 | 51 | const rgb_t *const pens = tlc34076_get_pens(); |
| 52 | 52 | UINT16 *vram = &tms_vram[(params->rowaddr << 8) & 0x3ff00]; |
| r5666 | r5667 | |
|---|---|---|
| 17 | 17 | * Noraut Poker (bootleg), 198?, Unknown. |
| 18 | 18 | |
| 19 | 19 | |
| 20 | Special thanks to Alan Griffin, that kindly helped providing good references | |
| 21 | that allowed me to improve the system emulation. | |
| 22 | ||
| 23 | ||
| 20 | 24 | ******************************************************************************* |
| 21 | 25 | |
| 22 | 26 | |
| r5666 | r5667 | |
| 250 | 254 | R2 = 2.2 K ; Tolerance +/- 5% |
| 251 | 255 | R3 = 1 K ; Tolerance +/- 5% |
| 252 | 256 | |
| 253 | C1 = 223J = 22000 pF = 22 nF = 0.022 uF ; Tolerance +/- 5% | |
| 254 | C2 = 103J = 10000 pF = 10 nF = 0.01 uF ; Tolerance +/- 5% | |
| 257 | C1 = 103J = 10000 pF = 10 nF = 0.01 uF ; Tolerance +/- 5% | |
| 258 | C2 = 223J = 22000 pF = 22 nF = 0.022 uF ; Tolerance +/- 5% | |
| 255 | 259 | C3 = 473J = 47000 pF = 47 nF = 0.047 uF ; Tolerance +/- 5% |
| 256 | 260 | C4 = 103J = 10000 pF = 10 nF = 0.01 uF ; Tolerance +/- 5% |
| 257 | 261 | |
| r5666 | r5667 | |
| 475 | 479 | - Fixed the screen aspect and visible area. |
| 476 | 480 | - Confirmed correct colors. No bipolar PROM involved. |
| 477 | 481 | - Added Noraut Joker Poker hardware and PCB layouts. |
| 478 | - Documented the discrete audio circuit | |
| 482 | - Documented the discrete audio circuit | |
| 479 | 483 | |
| 480 | 484 | |
| 481 | 485 | [2009-08-29] |
| r5666 | r5667 | |
| 514 | 518 | It has 2 jumpers that cut the a14 and a15 addressing lines. |
| 515 | 519 | |
| 516 | 520 | |
| 521 | [2009-09-09] | |
| 522 | ||
| 523 | - Added accurate discrete sound system emulation. | |
| 524 | - Fixed the discrete sound system diagram, based on real sound references. | |
| 525 | ||
| 526 | ||
| 517 | 527 | TODO: |
| 518 | 528 | |
| 519 | 529 | - Analize PPI-2 at 0xc0-0xc3. OBF handshake line (PC7) doesn't seems to work properly. |
| 520 | 530 | - Find if wide chars are hardcoded or tied to a bit. |
| 521 | - Discrete sound. | |
| 522 | 531 | - Save support. |
| 523 | 532 | |
| 524 | 533 | |
| r5666 | r5667 | |
| 531 | 540 | #include "driver.h" |
| 532 | 541 | #include "cpu/z80/z80.h" |
| 533 | 542 | #include "machine/8255ppi.h" |
| 534 | #include " | |
| 543 | #include " | |
| 535 | 544 | |
| 536 | 545 | #include "noraut11.lh" |
| 537 | 546 | #include "noraut12.lh" |
| r5666 | r5667 | |
| 646 | 655 | ---- x--- + PANEL LAMPS CLOCK |
| 647 | 656 | xxxx ---- * Discrete Sound Lines. |
| 648 | 657 | */ |
| 658 | ||
| 659 | const device_config *discrete = devtag_get_device(device->machine, "discrete"); | |
| 660 | ||
| 649 | 661 | output_set_lamp_value(8, (data >> 0) & 1); /* DEAL / DRAW lamp */ |
| 650 | 662 | output_set_lamp_value(9, (data >> 1) & 1); /* BET / COLLECT lamp */ |
| 651 | 663 | |
| 652 | 664 | /* the 4 MSB are for discrete sound */ |
| 653 | dac_data_w(devtag_get_device(device->machine, "dac"), (data & 0xf0)); /* Discrete Sound */ | |
| 665 | discrete_sound_w(discrete, NORAUTP_SND_EN, (data >> 7) & 0x01); | |
| 666 | discrete_sound_w(discrete, NORAUTP_FREQ_DATA, (data >> 4) & 0x07); | |
| 667 | ||
| 668 | // popmessage("sound bits 4-5-6-7: %02x, %02x, %02x, %02x", ((data >> 4) & 0x01), ((data >> 5) & 0x01), ((data >> 6) & 0x01), ((data >> 7) & 0x01)); | |
| 654 | 669 | } |
| 655 | 670 | |
| 656 | 671 | static WRITE8_DEVICE_HANDLER( counterlamps_w ) |
| r5666 | r5667 | |
| 1059 | 1074 | |
| 1060 | 1075 | /* sound hardware */ |
| 1061 | 1076 | MDRV_SPEAKER_STANDARD_MONO("mono") |
| 1062 | MDRV_SOUND_ADD("dac", DAC, 0) | |
| 1063 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 1077 | MDRV_SOUND_ADD("discrete", DISCRETE, 0) | |
| 1078 | MDRV_SOUND_CONFIG_DISCRETE(norautp) | |
| 1079 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 1.0) | |
| 1064 | 1080 | MACHINE_DRIVER_END |
| 1065 | 1081 | |
| 1066 | 1082 | static MACHINE_DRIVER_START( norautxp ) |
| r5666 | r5667 | |
| 1316 | 1332 | *************************/ |
| 1317 | 1333 | |
| 1318 | 1334 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS LAYOUT */ |
| 1319 | GAMEL( 1988, norautp, 0, norautp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Poker", GAME_NO_SOUND, layout_noraut11 ) | |
| 1320 | GAMEL( 1988, norautjp, norautp, norautp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Joker Poker", GAME_NO_SOUND, layout_noraut11 ) | |
| 1321 | GAMEL( 1988, norautrh, 0, norautp, norautrh, norautrh, ROT0, "Noraut Ltd.", "Noraut Red Hot Joker Poker", GAME_NO_SOUND, layout_noraut12 ) | |
| 1322 | GAME( 1988, norautu, 0, norautxp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Poker (NTX10A)", GAME_NO_SOUND | GAME_NOT_WORKING ) | |
| 1323 | GAME( 1988, norautv3, 0, norautxp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Joker Poker (V3.010a)", GAME_NO_SOUND | GAME_NOT_WORKING ) | |
| 1324 | GAME( 1983, gtipoker, 0, gtipoker, norautpn, gtipoker, ROT0, "GTI Inc", "GTI Poker", GAME_NO_SOUND | GAME_NOT_WORKING ) | |
| 1335 | GAMEL( 1988, norautp, 0, norautp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Poker", 0, layout_noraut11 ) | |
| 1336 | GAMEL( 1988, norautjp, norautp, norautp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Joker Poker", 0, layout_noraut11 ) | |
| 1337 | GAMEL( 1988, norautrh, 0, norautp, norautrh, norautrh, ROT0, "Noraut Ltd.", "Noraut Red Hot Joker Poker", 0, layout_noraut12 ) | |
| 1338 | GAME( 1988, norautu, 0, norautxp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Poker (NTX10A)", GAME_NOT_WORKING ) | |
| 1339 | GAME( 1988, norautv3, 0, norautxp, norautp, 0, ROT0, "Noraut Ltd.", "Noraut Joker Poker (V3.010a)", GAME_NOT_WORKING ) | |
| 1340 | GAME( 1983, gtipoker, 0, gtipoker, norautpn, gtipoker, ROT0, "GTI Inc", "GTI Poker", GAME_NOT_WORKING ) | |
| 1325 | 1341 | |
| 1326 | 1342 | /*The following has everything uncertain, seems a bootleg/hack and doesn't have any identification strings in program rom. */ |
| 1327 | GAMEL( 198?, norautpn, norautp, norautp, norautpn, norautpn, ROT0, "bootleg?", "Noraut Poker (bootleg)", | |
| 1343 | GAMEL( 198?, norautpn, norautp, norautp, norautpn, norautpn, ROT0, "bootleg?", "Noraut Poker (bootleg)", 0 |
| r5666 | r5667 | |
|---|---|---|
| 817 | 817 | } |
| 818 | 818 | } |
| 819 | 819 | |
| 820 | extern void calc3_mcu_run(running_machine *machine); | |
| 821 | ||
| 822 | WRITE16_HANDLER(shogwarr_calc_w); | |
| 823 | READ16_HANDLER(shogwarr_calc_r); | |
| 824 | ||
| 825 | ||
| 826 | 820 | static ADDRESS_MAP_START( shogwarr, ADDRESS_SPACE_PROGRAM, 16 ) |
| 827 | 821 | AM_RANGE(0x000000, 0x03ffff) AM_ROM // ROM |
| 828 | 822 | AM_RANGE(0x100000, 0x10ffff) AM_RAM AM_BASE(&kaneko16_mainram) // Work RAM |
| r5666 | r5667 | |
| 2103 | 2097 | } |
| 2104 | 2098 | |
| 2105 | 2099 | /* |
| 2106 | unsigned char shogwarr_default_eeprom[128] = { | |
| 2100 | static const unsigned char shogwarr_default_eeprom[128] = { | |
| 2107 | 2101 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2108 | 2102 | 0x4B, 0x41, 0x4E, 0x45, 0x4B, 0x4F, 0x2F, 0x41, 0x54, 0x4F, 0x50, 0x20, 0x31, 0x39, 0x39, 0x32, |
| 2109 | 2103 | 0x46, 0x55, 0x4A, 0x49, 0xFF, 0xFF, 0x4D, 0x41, 0x20, 0x42, 0x55, 0x53, 0x54, 0x45, 0x52, 0x20, |
| r5666 | r5667 | |
| 2116 | 2110 | */ |
| 2117 | 2111 | // the above eeprom looks corrupt, some of the text is wrong, the game never writes this text tho.. maybe it should be as below |
| 2118 | 2112 | // leaving both here incase they relate to which tables get 'locked out' by the MCU somehow |
| 2119 | UINT8 shogwarr_default_eeprom[128] = { | |
| 2113 | static const UINT8 shogwarr_default_eeprom[128] = { | |
| 2120 | 2114 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2121 | 2115 | 0x4B, 0x41, 0x4E, 0x45, 0x4B, 0x4F, 0x2F, 0x41, 0x54, 0x4F, 0x50, 0x20, 0x31, 0x39, 0x39, 0x32, |
| 2122 | 2116 | 0x46, 0x55, 0x4A, 0x49, 0x59, 0x41, 0x4D, 0x41, 0x20, 0x42, 0x55, 0x53, 0x54, 0x45, 0x52, 0x20, |
| r5666 | r5667 | |
| 2127 | 2121 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x10, 0x00, 0x00, 0x00, 0x00, 0xFF, 0xFF |
| 2128 | 2122 | }; |
| 2129 | 2123 | |
| 2130 | UINT8 brapboys_default_eeprom[128] = { | |
| 2124 | static const UINT8 brapboys_default_eeprom[128] = { | |
| 2131 | 2125 | 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, |
| 2132 | 2126 | 0x00, 0x00, 0x00, 0x05, 0x00, 0x06, 0x20, 0x30, 0x00, 0x03, 0x68, 0x18, 0x01, 0x01, 0x01, 0x01, |
| 2133 | 2127 | 0x01, 0x01, 0x00, 0x01, 0x00, 0x04, 0x00, 0x08, 0x4B, 0x41, 0x4E, 0x45, 0x4B, 0x4F, 0x20, 0x20, |
| r5666 | r5667 | |
| 3810 | 3804 | DRIVER_INIT_CALL(decrypt_toybox_rom_alt); |
| 3811 | 3805 | } |
| 3812 | 3806 | |
| 3813 | extern DRIVER_INIT(calc3_scantables); | |
| 3814 | ||
| 3815 | DRIVER_INIT( calc3 ) | |
| 3807 | static DRIVER_INIT( calc3 ) | |
| 3816 | 3808 | { |
| 3817 | 3809 | DRIVER_INIT_CALL(calc3_scantables); |
| 3818 | 3810 |
| r0 | r5667 | |
|---|---|---|
| 1 | /* | |
| 2 | Photon IK2 system | |
| 3 | ||
| 4 | Driver by Mariusz Wojcieszek | |
| 5 | ||
| 6 | Russian arcade system based on ZX Spectrum home computer. | |
| 7 | ||
| 8 | */ | |
| 9 | ||
| 10 | #include "driver.h" | |
| 11 | #include "deprecat.h" | |
| 12 | #include "cpu/z80/z80.h" | |
| 13 | #include "sound/speaker.h" | |
| 14 | ||
| 15 | /************************************* | |
| 16 | * | |
| 17 | * Globals | |
| 18 | * | |
| 19 | *************************************/ | |
| 20 | ||
| 21 | static UINT8 *spectrum_video_ram; | |
| 22 | static int spectrum_frame_number; /* Used for handling FLASH 1 */ | |
| 23 | static int spectrum_flash_invert; | |
| 24 | static UINT8 spectrum_port_fe; | |
| 25 | static UINT8 nmi_enable = 0; | |
| 26 | ||
| 27 | ||
| 28 | /************************************* | |
| 29 | * | |
| 30 | * Video (copied from MESS apart from support | |
| 31 | * for changing border color mid-frame) | |
| 32 | * | |
| 33 | *************************************/ | |
| 34 | ||
| 35 | /* Spectrum screen size in pixels */ | |
| 36 | #define SPEC_UNSEEN_LINES 16 /* Non-visible scanlines before first border | |
| 37 | line. Some of these may be vertical retrace. */ | |
| 38 | #define SPEC_TOP_BORDER 48 /* Number of border lines before actual screen */ | |
| 39 | #define SPEC_DISPLAY_YSIZE 192 /* Vertical screen resolution */ | |
| 40 | #define SPEC_BOTTOM_BORDER 56 /* Number of border lines at bottom of screen */ | |
| 41 | #define SPEC_SCREEN_HEIGHT (SPEC_TOP_BORDER + SPEC_DISPLAY_YSIZE + SPEC_BOTTOM_BORDER) | |
| 42 | ||
| 43 | #define SPEC_LEFT_BORDER 48 /* Number of left hand border pixels */ | |
| 44 | #define SPEC_DISPLAY_XSIZE 256 /* Horizontal screen resolution */ | |
| 45 | #define SPEC_RIGHT_BORDER 48 /* Number of right hand border pixels */ | |
| 46 | #define SPEC_SCREEN_WIDTH (SPEC_LEFT_BORDER + SPEC_DISPLAY_XSIZE + SPEC_RIGHT_BORDER) | |
| 47 | ||
| 48 | #define SPEC_LEFT_BORDER_CYCLES 24 /* Cycles to display left hand border */ | |
| 49 | #define SPEC_DISPLAY_XSIZE_CYCLES 128 /* Horizontal screen resolution */ | |
| 50 | #define SPEC_RIGHT_BORDER_CYCLES 24 /* Cycles to display right hand border */ | |
| 51 | #define SPEC_RETRACE_CYCLES 48 /* Cycles taken for horizonal retrace */ | |
| 52 | #define SPEC_CYCLES_PER_LINE 224 /* Number of cycles to display a single line */ | |
| 53 | ||
| 54 | static const rgb_t spectrum_palette[16] = { | |
| 55 | MAKE_RGB(0x00, 0x00, 0x00), | |
| 56 | MAKE_RGB(0x00, 0x00, 0xbf), | |
| 57 | MAKE_RGB(0xbf, 0x00, 0x00), | |
| 58 | MAKE_RGB(0xbf, 0x00, 0xbf), | |
| 59 | MAKE_RGB(0x00, 0xbf, 0x00), | |
| 60 | MAKE_RGB(0x00, 0xbf, 0xbf), | |
| 61 | MAKE_RGB(0xbf, 0xbf, 0x00), | |
| 62 | MAKE_RGB(0xbf, 0xbf, 0xbf), | |
| 63 | MAKE_RGB(0x00, 0x00, 0x00), | |
| 64 | MAKE_RGB(0x00, 0x00, 0xff), | |
| 65 | MAKE_RGB(0xff, 0x00, 0x00), | |
| 66 | MAKE_RGB(0xff, 0x00, 0xff), | |
| 67 | MAKE_RGB(0x00, 0xff, 0x00), | |
| 68 | MAKE_RGB(0x00, 0xff, 0xff), | |
| 69 | MAKE_RGB(0xff, 0xff, 0x00), | |
| 70 | MAKE_RGB(0xff, 0xff, 0xff) | |
| 71 | }; | |
| 72 | ||
| 73 | /* Initialise the palette */ | |
| 74 | PALETTE_INIT( spectrum ) | |
| 75 | { | |
| 76 | palette_set_colors(machine, 0, spectrum_palette, ARRAY_LENGTH(spectrum_palette)); | |
| 77 | } | |
| 78 | ||
| 79 | VIDEO_START( spectrum ) | |
| 80 | { | |
| 81 | spectrum_frame_number = 0; | |
| 82 | spectrum_flash_invert = 0; | |
| 83 | } | |
| 84 | ||
| 85 | /* return the color to be used inverting FLASHing colors if necessary */ | |
| 86 | INLINE unsigned char get_display_color (unsigned char color, int invert) | |
| 87 | { | |
| 88 | if (invert && (color & 0x80)) | |
| 89 | return (color & 0xc0) + ((color & 0x38) >> 3) + ((color & 0x07) << 3); | |
| 90 | else | |
| 91 | return color; | |
| 92 | } | |
| 93 | ||
| 94 | /* Code to change the FLASH status every 25 frames. Note this must be | |
| 95 | independent of frame skip etc. */ | |
| 96 | VIDEO_EOF( spectrum ) | |
| 97 | { | |
| 98 | spectrum_frame_number++; | |
| 99 | if (spectrum_frame_number >= 25) | |
| 100 | { | |
| 101 | spectrum_frame_number = 0; | |
| 102 | spectrum_flash_invert = !spectrum_flash_invert; | |
| 103 | } | |
| 104 | } | |
| 105 | ||
| 106 | INLINE void spectrum_plot_pixel(bitmap_t *bitmap, int x, int y, UINT32 color) | |
| 107 | { | |
| 108 | *BITMAP_ADDR16(bitmap, y, x) = (UINT16)color; | |
| 109 | } | |
| 110 | ||
| 111 | VIDEO_UPDATE( spectrum ) | |
| 112 | { | |
| 113 | /* for now do a full-refresh */ | |
| 114 | int x, y, b, scrx, scry; | |
| 115 | unsigned short ink, pap; | |
| 116 | unsigned char *attr, *scr; | |
| 117 | // int full_refresh = 1; | |
| 118 | ||
| 119 | scr=spectrum_video_ram; | |
| 120 | ||
| 121 | bitmap_fill(bitmap, cliprect, spectrum_port_fe & 0x07); | |
| 122 | ||
| 123 | for (y=0; y<192; y++) | |
| 124 | { | |
| 125 | scrx=SPEC_LEFT_BORDER; | |
| 126 | scry=((y&7) * 8) + ((y&0x38)>>3) + (y&0xC0); | |
| 127 | attr=spectrum_video_ram + ((scry>>3)*32) + 0x1800; | |
| 128 | ||
| 129 | for (x=0;x<32;x++) | |
| 130 | { | |
| 131 | /* Get ink and paper colour with bright */ | |
| 132 | if (spectrum_flash_invert && (*attr & 0x80)) | |
| 133 | { | |
| 134 | ink=((*attr)>>3) & 0x0f; | |
| 135 | pap=((*attr) & 0x07) + (((*attr)>>3) & 0x08); | |
| 136 | } | |
| 137 | else | |
| 138 | { | |
| 139 | ink=((*attr) & 0x07) + (((*attr)>>3) & 0x08); | |
| 140 | pap=((*attr)>>3) & 0x0f; | |
| 141 | } | |
| 142 | ||
| 143 | for (b=0x80;b!=0;b>>=1) | |
| 144 | { | |
| 145 | if (*scr&b) | |
| 146 | spectrum_plot_pixel(bitmap,scrx++,SPEC_TOP_BORDER+scry,ink); | |
| 147 | else | |
| 148 | spectrum_plot_pixel(bitmap,scrx++,SPEC_TOP_BORDER+scry,pap); | |
| 149 | } | |
| 150 | scr++; | |
| 151 | attr++; | |
| 152 | } | |
| 153 | } | |
| 154 | ||
| 155 | return 0; | |
| 156 | } | |
| 157 | ||
| 158 | /************************************* | |
| 159 | * | |
| 160 | * I/O - memory banking, sound | |
| 161 | * | |
| 162 | *************************************/ | |
| 163 | ||
| 164 | static WRITE8_HANDLER(photon2_membank_w) | |
| 165 | { | |
| 166 | int bank = 0; | |
| 167 | if (data == 0) | |
| 168 | { | |
| 169 | bank = 0; | |
| 170 | } | |
| 171 | else if (data == 1) | |
| 172 | { | |
| 173 | bank = 1; | |
| 174 | } | |
| 175 | else if (data == 5) | |
| 176 | { | |
| 177 | bank = 2; | |
| 178 | } | |
| 179 | else | |
| 180 | { | |
| 181 | logerror( "Unknown banking write: %02X\n", data); | |
| 182 | } | |
| 183 | ||
| 184 | memory_set_bankptr(space->machine, 1, memory_region(space->machine, "maincpu") + 0x4000*bank ); | |
| 185 | } | |
| 186 | ||
| 187 | static READ8_HANDLER(photon2_fe_r) | |
| 188 | { | |
| 189 | return 0xff; | |
| 190 | } | |
| 191 | ||
| 192 | static WRITE8_HANDLER(photon2_fe_w) | |
| 193 | { | |
| 194 | const device_config *speaker = devtag_get_device(space->machine, "speaker"); | |
| 195 | spectrum_port_fe = data; | |
| 196 | ||
| 197 | speaker_level_w(speaker, BIT(data,4)); | |
| 198 | } | |
| 199 | ||
| 200 | static WRITE8_HANDLER(photon2_misc_w) | |
| 201 | { | |
| 202 | nmi_enable = !BIT(data,5); | |
| 203 | } | |
| 204 | ||
| 205 | /************************************* | |
| 206 | * | |
| 207 | * Memory maps | |
| 208 | * | |
| 209 | *************************************/ | |
| 210 | ||
| 211 | static ADDRESS_MAP_START (spectrum_mem, ADDRESS_SPACE_PROGRAM, 8) | |
| 212 | AM_RANGE(0x0000, 0x3fff) AM_ROMBANK(1) | |
| 213 | AM_RANGE(0x4000, 0x5aff) AM_RAM AM_BASE(&spectrum_video_ram ) | |
| 214 | AM_RANGE(0x5b00, 0xffff) AM_RAM | |
| 215 | ADDRESS_MAP_END | |
| 216 | ||
| 217 | static ADDRESS_MAP_START (spectrum_io, ADDRESS_SPACE_IO, 8) | |
| 218 | ADDRESS_MAP_GLOBAL_MASK(0xff) | |
| 219 | AM_RANGE(0x1f, 0x1f) AM_READ_PORT("JOY") | |
| 220 | AM_RANGE(0x5b, 0x5b) AM_READ_PORT("COIN") AM_WRITE(photon2_misc_w) | |
| 221 | AM_RANGE(0x7a, 0x7a) AM_WRITE(photon2_membank_w) | |
| 222 | AM_RANGE(0x7b, 0x7b) AM_WRITENOP // unknown write | |
| 223 | AM_RANGE(0x7e, 0x7e) AM_WRITE(photon2_membank_w) | |
| 224 | AM_RANGE(0xfe, 0xfe) AM_READWRITE(photon2_fe_r, photon2_fe_w) | |
| 225 | ADDRESS_MAP_END | |
| 226 | ||
| 227 | /************************************* | |
| 228 | * | |
| 229 | * Inputs | |
| 230 | * | |
| 231 | *************************************/ | |
| 232 | ||
| 233 | static INPUT_PORTS_START( photon2 ) | |
| 234 | PORT_START("JOY") | |
| 235 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) | |
| 236 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) | |
| 237 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) | |
| 238 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) | |
| 239 | PORT_BIT(0x10, IP_ACTIVE_LOW, IPT_BUTTON1) PORT_PLAYER(1) | |
| 240 | PORT_BIT(0x20, IP_ACTIVE_LOW, IPT_UNUSED) | |
| 241 | PORT_BIT(0x40, IP_ACTIVE_LOW, IPT_UNUSED) | |
| 242 | PORT_BIT(0x80, IP_ACTIVE_LOW, IPT_UNUSED) | |
| 243 | ||
| 244 | PORT_START("COIN") | |
| 245 | PORT_BIT(0x01, IP_ACTIVE_HIGH, IPT_COIN1) PORT_PLAYER(1) PORT_IMPULSE(1) | |
| 246 | PORT_BIT(0x02, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 247 | PORT_BIT(0x04, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 248 | PORT_BIT(0x08, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 249 | PORT_BIT(0x20, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 250 | PORT_BIT(0x10, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 251 | PORT_BIT(0x40, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 252 | PORT_BIT(0x80, IP_ACTIVE_HIGH, IPT_UNUSED) | |
| 253 | INPUT_PORTS_END | |
| 254 | ||
| 255 | static INPUT_PORTS_START( black ) | |
| 256 | PORT_INCLUDE( photon2 ) | |
| 257 | ||
| 258 | PORT_MODIFY("JOY") | |
| 259 | PORT_BIT(0x01, IP_ACTIVE_LOW, IPT_JOYSTICK_LEFT) PORT_PLAYER(1) | |
| 260 | PORT_BIT(0x02, IP_ACTIVE_LOW, IPT_JOYSTICK_RIGHT) PORT_PLAYER(1) | |
| 261 | PORT_BIT(0x04, IP_ACTIVE_LOW, IPT_JOYSTICK_UP) PORT_PLAYER(1) | |
| 262 | PORT_BIT(0x08, IP_ACTIVE_LOW, IPT_JOYSTICK_DOWN) PORT_PLAYER(1) | |
| 263 | INPUT_PORTS_END | |
| 264 | ||
| 265 | /************************************* | |
| 266 | * | |
| 267 | * Machine | |
| 268 | * | |
| 269 | *************************************/ | |
| 270 | ||
| 271 | static INTERRUPT_GEN( spec_interrupt_hack ) | |
| 272 | { | |
| 273 | if (cpu_getiloops(device) == 1) | |
| 274 | { | |
| 275 | cpu_set_input_line(device, 0, HOLD_LINE); | |
| 276 | } | |
| 277 | else | |
| 278 | { | |
| 279 | if ( nmi_enable ) | |
| 280 | { | |
| 281 | cputag_set_input_line(device->machine, "maincpu", INPUT_LINE_NMI, PULSE_LINE); | |
| 282 | } | |
| 283 | } | |
| 284 | } | |
| 285 | ||
| 286 | static MACHINE_RESET( photon2 ) | |
| 287 | { | |
| 288 | memory_set_bankptr(machine, 1, memory_region(machine, "maincpu")); | |
| 289 | } | |
| 290 | ||
| 291 | MACHINE_DRIVER_START( photon2 ) | |
| 292 | /* basic machine hardware */ | |
| 293 | MDRV_CPU_ADD("maincpu", Z80, 3500000) /* 3.5 MHz */ | |
| 294 | MDRV_CPU_PROGRAM_MAP(spectrum_mem) | |
| 295 | MDRV_CPU_IO_MAP(spectrum_io) | |
| 296 | MDRV_CPU_VBLANK_INT_HACK(spec_interrupt_hack, 2) | |
| 297 | MDRV_QUANTUM_TIME(HZ(60)) | |
| 298 | ||
| 299 | MDRV_MACHINE_RESET( photon2 ) | |
| 300 | ||
| 301 | /* video hardware */ | |
| 302 | MDRV_SCREEN_ADD("screen", RASTER) | |
| 303 | MDRV_SCREEN_REFRESH_RATE(50.08) | |
| 304 | MDRV_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500)) /* not accurate */ | |
| 305 | MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16) | |
| 306 | MDRV_SCREEN_SIZE(SPEC_SCREEN_WIDTH, SPEC_SCREEN_HEIGHT) | |
| 307 | MDRV_SCREEN_VISIBLE_AREA(0, SPEC_SCREEN_WIDTH-1, 0, SPEC_SCREEN_HEIGHT-1) | |
| 308 | MDRV_PALETTE_LENGTH(16) | |
| 309 | MDRV_PALETTE_INIT( spectrum ) | |
| 310 | ||
| 311 | MDRV_VIDEO_START( spectrum ) | |
| 312 | MDRV_VIDEO_UPDATE( spectrum ) | |
| 313 | MDRV_VIDEO_EOF( spectrum ) | |
| 314 | ||
| 315 | /* sound hardware */ | |
| 316 | MDRV_SPEAKER_STANDARD_MONO("mono") | |
| 317 | MDRV_SOUND_ADD("speaker", SPEAKER, 0) | |
| 318 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) | |
| 319 | ||
| 320 | MACHINE_DRIVER_END | |
| 321 | ||
| 322 | /************************************* | |
| 323 | * | |
| 324 | * Globals | |
| 325 | * | |
| 326 | *************************************/ | |
| 327 | ||
| 328 | ROM_START( kok ) | |
| 329 | ROM_REGION( 0x20000, "maincpu", 0 ) | |
| 330 | ROM_LOAD( "kok00.bin", 0x0000, 0x2000, CRC(ff790d0b) SHA1(26dce26e43c15fd90d99abf25a86ca55ed13de94) ) | |
| 331 | ROM_LOAD( "kok01.bin", 0x2000, 0x2000, CRC(bf81811e) SHA1(26f073e49f126a70008256ea74394fbf11649503) ) | |
| 332 | ROM_LOAD( "kok10.bin", 0x4000, 0x2000, CRC(73fc7b92) SHA1(226abcb40aa3b8cfa96bc4ac89ba62b79ee79b2a) ) | |
| 333 | ROM_LOAD( "kok11.bin", 0x6000, 0x2000, CRC(7de0f54a) SHA1(3ee73f8e133ff3356e0ee8d1918b99d66f5ba53f) ) | |
| 334 | ROM_END | |
| 335 | ||
| 336 | ROM_START( black ) | |
| 337 | ROM_REGION( 0x20000, "maincpu", 0 ) | |
| 338 | ROM_LOAD( "black1.bin", 0x0000, 0x2000, CRC(8b02b314) SHA1(2e2de2b21634538515d4d6ca0930c4e3e5d1e80f) ) | |
| 339 | ROM_LOAD( "black2.bin", 0x2000, 0x2000, CRC(ed93469a) SHA1(5e23da3f649f5e20f7c8450bfa5d7d0b190f892c) ) | |
| 340 | ROM_LOAD( "black5.bin", 0x4000, 0x2000, CRC(f7c0baf5) SHA1(0d0a6f8b7f9bf65be61c8c78270a8c6e60fa3fe9) ) | |
| 341 | ROM_LOAD( "black6.bin", 0x6000, 0x2000, CRC(1f60bc18) SHA1(fd1a902c51e01dfc6fa42dac94d25566ce5bb3d7) ) | |
| 342 | ROM_LOAD( "black3.bin", 0x8000, 0x2000, CRC(784ea7f4) SHA1(f3008ad180ad14e0728bf0ba78fe85302ef2ff85) ) | |
| 343 | ROM_LOAD( "black4.bin", 0xa000, 0x2000, CRC(20281f74) SHA1(83df590e21a44fa07d4bc76818a8d0d0c4de42b3) ) | |
| 344 | ROM_END | |
| 345 | ||
| 346 | ROM_START( brod ) | |
| 347 | ROM_REGION( 0x20000, "maincpu", 0 ) | |
| 348 | ROM_LOAD( "brod00.bin", 0x0000, 0x2000, CRC(cbd6653f) SHA1(18b9134529a1e56c6e90f3bcef5102d5d4b352e3) ) | |
| 349 | ROM_FILL( 0x2000, 0x2000, 0x00 ) | |
| 350 | ROM_LOAD( "brod10.bin", 0x4000, 0x2000, CRC(9c25d44a) SHA1(f78c7e5b4e6f9fe34f81dc574ca335f70b61e68d) ) | |
| 351 | ROM_LOAD( "brod11.bin", 0x6000, 0x2000, CRC(f6505a16) SHA1(3b2ccca78fd83855003cc752766df83b19f89364) ) | |
| 352 | ROM_LOAD( "brod12.bin", 0x8000, 0x2000, CRC(94e53d47) SHA1(698415c5e25528e3b1dcab7471cc98c1dc9cb335) ) | |
| 353 | ROM_LOAD( "brod13.bin", 0xa000, 0x2000, CRC(1177cd17) SHA1(58c5c09a7b857ce6311339c4d0f4d8c1a7e232a3) ) | |
| 354 | ROM_END | |
| 355 | ||
| 356 | GAME( 19??, kok, 0, photon2, photon2, 0, ROT0, "<unknown>", "Povar / Sobrat' Buran / Agroprom", 0 ) | |
| 357 | GAME( 19??, black, 0, photon2, black, 0, ROT0, "<unknown>", "Czernyj Korabl", 0 ) | |
| 358 | GAME( 19??, brod, 0, photon2, black, 0, ROT0, "<unknown>", "Brodjaga", 0 ) |
| r5666 | r5667 | |
|---|---|---|
| 165 | 165 | INPUT_PORTS_END |
| 166 | 166 | |
| 167 | 167 | |
| 168 | INTERRUPT_GEN( pk8000_interrupt ) | |
| 168 | static INTERRUPT_GEN( pk8000_interrupt ) | |
| 169 | 169 | { |
| 170 | 170 | cpu_set_input_line(device, 0, HOLD_LINE); |
| 171 | 171 | } |
| r5666 | r5667 | |
|---|---|---|
| 421 | 421 | cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE ); |
| 422 | 422 | } |
| 423 | 423 | |
| 424 | extern UINT8 *st0016_charram; | |
| 425 | 424 | static const st0016_interface st0016_config = |
| 426 | 425 | { |
| 427 | 426 | &st0016_charram |
| r5666 | r5667 | |
|---|---|---|
| 30 | 30 | #include "driver.h" |
| 31 | 31 | #include "cpu/m6502/m6502.h" |
| 32 | 32 | |
| 33 | VIDEO_START( cmmb ) | |
| 33 | static VIDEO_START( cmmb ) | |
| 34 | 34 | { |
| 35 | 35 | |
| 36 | 36 | } |
| 37 | 37 | |
| 38 | VIDEO_UPDATE( cmmb ) | |
| 38 | static VIDEO_UPDATE( cmmb ) | |
| 39 | 39 | { |
| 40 | 40 | const gfx_element *gfx = screen->machine->gfx[0]; |
| 41 | 41 | int count = 0x00000; |
| r5666 | r5667 | |
|---|---|---|
| 168 | 168 | ***************************************************************************/ |
| 169 | 169 | |
| 170 | 170 | #include "driver.h" |
| 171 | #include "cpu/m68000/m68000.h" | |
| 172 | 171 | #include "deprecat.h" |
| 173 | #include "m | |
| 172 | #include "cpu/m68000/m68000.h" | |
| 174 | 173 | #include "sound/2151intf.h" |
| 175 | 174 | #include "sound/okim6295.h" |
| 175 | #include "megasys1.h" | |
| 176 | #include "includes/cischeat.h" | |
| 176 | 177 | |
| 177 | /* Variables only used here: */ | |
| 178 | ||
| 179 | 178 | static UINT16 *rom_1, *rom_2, *rom_3; |
| 180 | 179 | static UINT16 *sharedram1, *sharedram2; |
| 181 | 180 | |
| 182 | /* Variables defined in video: */ | |
| 183 | 181 | |
| 184 | extern UINT16 *cischeat_roadram[2]; | |
| 185 | extern UINT16 *f1gpstr2_ioready; | |
| 186 | 182 | |
| 187 | /* Functions defined in video: */ | |
| 188 | ||
| 189 | READ16_HANDLER( bigrun_vregs_r ); | |
| 190 | READ16_HANDLER( cischeat_vregs_r ); | |
| 191 | READ16_HANDLER( f1gpstar_vregs_r ); | |
| 192 | READ16_HANDLER( f1gpstr2_vregs_r ); | |
| 193 | READ16_HANDLER( wildplt_vregs_r ); | |
| 194 | ||
| 195 | WRITE16_HANDLER( bigrun_vregs_w ); | |
| 196 | WRITE16_HANDLER( cischeat_vregs_w ); | |
| 197 | WRITE16_HANDLER( f1gpstar_vregs_w ); | |
| 198 | WRITE16_HANDLER( f1gpstr2_vregs_w ); | |
| 199 | WRITE16_HANDLER( scudhamm_vregs_w ); | |
| 200 | ||
| 201 | CUSTOM_INPUT( cischeat_shift_r ); | |
| 202 | ||
| 203 | VIDEO_START( bigrun ); | |
| 204 | VIDEO_START( cischeat ); | |
| 205 | VIDEO_START( f1gpstar ); | |
| 206 | ||
| 207 | VIDEO_UPDATE( bigrun ); | |
| 208 | VIDEO_UPDATE( cischeat ); | |
| 209 | VIDEO_UPDATE( f1gpstar ); | |
| 210 | VIDEO_UPDATE( scudhamm ); | |
| 211 | ||
| 212 | ||
| 213 | 183 | /************************************************************************** |
| 214 | 184 | |
| 215 | 185 |
| r5666 | r5667 | |
|---|---|---|
| 161 | 161 | return -1; |
| 162 | 162 | } |
| 163 | 163 | |
| 164 | int type2_writes = 0; | |
| 165 | UINT32 lasttype2pc = 0; | |
| 164 | static int type2_writes = 0; | |
| 165 | static UINT32 lasttype2pc = 0; | |
| 166 | 166 | static WRITE16_HANDLER( littlerb_vdp_w ) |
| 167 | 167 | { |
| 168 | 168 |
| r5666 | r5667 | |
|---|---|---|
| 1019 | 1019 | |
| 1020 | 1020 | #define CPU_CLOCK (200000000) |
| 1021 | 1021 | static UINT32 *dc_sound_ram; |
| 1022 | extern UINT64 *naomi_ram64; | |
| 1023 | 1022 | /* MD2 MD1 MD0 MD6 MD4 MD3 MD5 MD7 MD8 */ |
| 1024 | 1023 | static const struct sh4_config sh4cpu_config = { 1, 0, 1, 0, 0, 0, 1, 1, 0, CPU_CLOCK }; |
| 1025 | 1024 | |
| r5666 | r5667 | |
| 1053 | 1052 | * Non-volatile memories |
| 1054 | 1053 | */ |
| 1055 | 1054 | |
| 1056 | extern UINT8 maple0x86data1[0x80]; | |
| 1057 | ||
| 1058 | ||
| 1059 | 1055 | // some default eeprom settings |
| 1060 | 1056 | static const struct |
| 1061 | 1057 | { |
| r5666 | r5667 | |
| 1375 | 1371 | return reg; |
| 1376 | 1372 | } |
| 1377 | 1373 | |
| 1378 | READ64_HANDLER( aw_modem_r ) | |
| 1374 | static READ64_HANDLER( aw_modem_r ) | |
| 1379 | 1375 | { |
| 1380 | 1376 | int reg; |
| 1381 | 1377 | UINT64 shift; |
| r5666 | r5667 | |
| 1402 | 1398 | return 0; |
| 1403 | 1399 | } |
| 1404 | 1400 | |
| 1405 | WRITE64_HANDLER( aw_modem_w ) | |
| 1401 | static WRITE64_HANDLER( aw_modem_w ) | |
| 1406 | 1402 | { |
| 1407 | 1403 | int reg; |
| 1408 | 1404 | UINT64 shift; |
| r5666 | r5667 | |
| 1672 | 1668 | // SHOT4 (1<<10) |
| 1673 | 1669 | // SERVICE (1<<13) |
| 1674 | 1670 | // TEST (1<<14) |
| 1675 | // COIN (1<<15) | |
| 1671 | // COIN (1<<15) | |
| 1676 | 1672 | |
| 1677 | 1673 | static INPUT_PORTS_START( aw ) |
| 1678 | 1674 | PORT_START("P1L") |
| r5666 | r5667 | |
| 2720 | 2716 | ROM_LOAD("mpr-22140.ic19", 0x9800000, 0x0800000, CRC(4cb54893) SHA1(a99b39cc3c82c3cf90f794bb8c8ba60638a6f921) ) |
| 2721 | 2717 | ROM_END |
| 2722 | 2718 | |
| 2723 | ROM_START( smlg99 ) | |
| 2719 | ROM_START( smlg99 ) | |
| 2724 | 2720 | ROM_REGION( 0x200000, "maincpu", 0) |
| 2725 | 2721 | NAOMI_BIOS |
| 2726 | 2722 | |
| 2727 | 2723 | ROM_REGION( 0xb000000, "user1", ROMREGION_ERASEFF) |
| 2728 | ROM_LOAD( "epr-22059.ic22", 0x0000000, 0x200000, CRC(5784f970) SHA1(e9ec692206a95cc260521154305693f6022190bc) ) | |
| 2724 | ROM_LOAD( "epr-22059.ic22", 0x0000000, 0x200000, CRC(5784f970) SHA1(e9ec692206a95cc260521154305693f6022190bc) ) | |
| 2729 | 2725 | ROM_LOAD( "mpr-22038.ic1", 0x0800000, 0x800000, CRC(0a59fc5b) SHA1(efcbe2f847927fba173d333c889dd7df329d6df6) ) |
| 2730 | 2726 | ROM_LOAD( "mpr-22039.ic2", 0x1000000, 0x800000, CRC(4de79b52) SHA1(c63a3ce88db316e882948baf121fa96242010c8d) ) |
| 2731 | 2727 | ROM_LOAD( "mpr-22040.ic3", 0x1800000, 0x800000, CRC(b993fd90) SHA1(609de1509f393f884813ca4bcac533e10088ca84) ) |
| r5666 | r5667 | |
| 2789 | 2785 | ROM_LOAD("mpr-21901.ic21",0xa800000, 0x0800000, BAD_DUMP CRC(55dcbd6d) SHA1(9fec353f9e58016090e177f899a799e2e8fc7c9f) ) // returns bad in Naomi test mode |
| 2790 | 2786 | ROM_END |
| 2791 | 2787 | |
| 2792 | ROM_START( hotd2 ) | |
| 2788 | ROM_START( hotd2 ) | |
| 2793 | 2789 | ROM_REGION( 0x200000, "maincpu", 0) |
| 2794 | 2790 | HOTD2_BIOS |
| 2795 | 2791 | |
| r5666 | r5667 | |
| 2989 | 2985 | IC10 64M 6442 18AC |
| 2990 | 2986 | IC11 64M 4F77 EEFE |
| 2991 | 2987 | |
| 2992 | */ | |
| 2988 | */ | |
| 2993 | 2989 | |
| 2994 | 2990 | |
| 2995 | 2991 | ROM_START( hmgeo ) |
| r5666 | r5667 | |
| 3030 | 3026 | ROM_LOAD( "a313f890.bin", 0x0e0000, 0x00ff04, CRC(8b23c562) SHA1(fcc9d04c150f007dcd4a9a2bbee1e438a81b7c49) ) |
| 3031 | 3027 | ROM_LOAD( "a314f794.bin", 0x0f0000, 0x009104, CRC(0c0a9aa2) SHA1(1b9063a18703ce4a03ffe20e3f13e9bae06bdb57) ) |
| 3032 | 3028 | ROM_LOAD( "a3158898.bin", 0x100000, 0x0000ac, CRC(e23f61d5) SHA1(80ff570a6846f1af2b87e5888675257728e8e253) ) |
| 3033 | ROM_LOAD( "a0800f40.bin", 0x110000, 0x000204, CRC(f4935846) SHA1(d7eaa710274080f378afa4fb2e14f3bd406c45fe) ) | |
| 3034 | ROM_LOAD( "a0801144.bin", 0x120000, 0x000034, CRC(28a62ac0) SHA1(d9bb6baf5feaca655f333e2f0b9b200f44ef1726) ) | |
| 3029 | ROM_LOAD( "a0800f40.bin", 0x110000, 0x000204, CRC(f4935846) SHA1(d7eaa710274080f378afa4fb2e14f3bd406c45fe) ) | |
| 3030 | ROM_LOAD( "a0801144.bin", 0x120000, 0x000034, CRC(28a62ac0) SHA1(d9bb6baf5feaca655f333e2f0b9b200f44ef1726) ) | |
| 3035 | 3031 | ROM_LOAD( "a0801180.bin", 0x130000, 0x00ff04, CRC(4b9e08b7) SHA1(dab208f7af4475210135aeb648e6bed7db7399b9) ) |
| 3036 | 3032 | ROM_LOAD( "a0811084.bin", 0x140000, 0x00ff04, CRC(4003bab7) SHA1(0b1df4b9b1d1a1072719b559a71f5ae5811be63c) ) |
| 3037 | 3033 | ROM_LOAD( "a0820f88.bin", 0x150000, 0x007e04, CRC(67fb4342) SHA1(8b8c384a1628756a08aa8131095e49756967b5e2) ) |
| r5666 | r5667 | |
| 4195 | 4191 | /* xxxx */ GAME( 2001, hmgeo, naomi, naomi, naomi, naomi, ROT0, "Capcom", "Heavy Metal Geomatrix (JPN, USA, EUR, ASI, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 4196 | 4192 | |
| 4197 | 4193 | /* Games with incomplete dumps */ |
| 4198 | /* xxxx */ GAME( 2001, gunsur2, naomi, naomi, naomi, naomi, ROT0, "Capcom / Namco", "Gun Survivor 2: Bio Hazard Code Veronica", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4194 | /* xxxx */ GAME( 2001, gunsur2, naomi, naomi, naomi, naomi, ROT0, "Capcom / Namco", "Gun Survivor 2: Bio Hazard Code Veronica", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 4199 | 4195 | |
| 4200 | 4196 | /* Games with game specific bios sets */ |
| 4201 | 4197 | GAME( 1998, hod2bios, 0, naomi, naomi, 0, ROT0, "Sega", "Naomi House of the Dead 2 Bios", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING|GAME_IS_BIOS_ROOT ) |
| r5666 | r5667 | |
| 5221 | 5217 | ROM_LOAD( "mpr-23782.ic9", 0x8800000, 0x1000000, CRC(4f72e901) SHA1(a1d231c446d2c34e5a7e7145754b2313a2d03fd4) ) |
| 5222 | 5218 | ROM_LOAD( "mpr-23783.ic10", 0x9800000, 0x1000000, CRC(c8d4f6f9) SHA1(9e9df605c050b3780d7df34bd5041d30bc084d2d) ) |
| 5223 | 5219 | ROM_LOAD( "mpr-23784.ic11", 0xa800000, 0x1000000, BAD_DUMP CRC(3a7ebe78) SHA1(6f414db03761be0d2f995193df8146f3b82c18a8) ) |
| 5224 | ROM_END | |
| 5220 | ROM_END | |
| 5225 | 5221 | |
| 5226 | 5222 | ROM_START( clubkrte ) |
| 5227 | 5223 | NAOMI2_BIOS |
| r5666 | r5667 | |
| 5475 | 5471 | /* Complete Dumps */ |
| 5476 | 5472 | GAME( 2001, vstrik3c, naomi2, naomi, naomi, 0, ROT0, "Sega", "Virtua Striker 3 (Cart) (USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 5477 | 5473 | GAME( 2001, wldrider, naomi2, naomi, naomi, 0, ROT0, "Sega", "Wild Riders (JPN, USA, EXP, KOR, AUS)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 5478 | GAME( 2001, vf4cart, naomi2, naomi, naomi, 0, ROT0, "Sega", "Virtua Fighter 4 (Cart)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 5479 | GAME( 2002, clubkrte, naomi2, naomi, naomi, 0, ROT0, "Sega", "Club Kart: European Session", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 5474 | GAME( 2001, vf4cart, naomi2, naomi, naomi, 0, ROT0, "Sega", "Virtua Fighter 4 (Cart)", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 5475 | GAME( 2002, clubkrte, naomi2, naomi, naomi, 0, ROT0, "Sega", "Club Kart: European Session", GAME_UNEMULATED_PROTECTION|GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 5480 | 5476 | |
| 5481 | 5477 | /* GDS-xxxx (Sega first party games) */ |
| 5482 | 5478 | GAME( 2001, vstrik3, naomi2, naomigd, naomi, 0, ROT0, "Sega", "Virtua Striker 3 (GDS-0006)", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| r5666 | r5667 | |
| 5907 | 5903 | AW_BIOS |
| 5908 | 5904 | |
| 5909 | 5905 | ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE) |
| 5910 | ROM_LOAD( "ax0401p01.ic18", 0x0000000, 0x0800000, CRC(195d6328) SHA1(cf3b5699f81235919dd3b1974d2ecb0376cb4552) ) | |
| 5911 | ROM_LOAD( "ax0401m01.ic11", 0x1000000, 0x1000000, CRC(5e5dca57) SHA1(e0623c84f66cada37d4c9399a7a8fc6866933144) ) | |
| 5912 | ROM_LOAD( "ax0402m01.ic12", 0x2000000, 0x1000000, CRC(77dd4771) SHA1(dcd23b8ddc82eab2f325266ffd7ed3fbc1bcdf71) ) | |
| 5913 | ROM_LOAD( "ax0403m01.ic13", 0x3000000, 0x1000000, CRC(911d0674) SHA1(eec35badcfbfe412b7104a86c2111f5a1b5fb5cd) ) | |
| 5914 | ROM_LOAD( "ax0404m01.ic14", 0x4000000, 0x1000000, CRC(f82a4ca3) SHA1(da686d86e176a9f24874d2916b1932f03a99a52d) ) | |
| 5915 | ROM_LOAD( "ax0405m01.ic15", 0x5000000, 0x1000000, CRC(b88298d7) SHA1(490c3ec471018895b7268ee33498dddaccbbfd5a) ) | |
| 5916 | ROM_END | |
| 5917 | ||
| 5906 | ROM_LOAD( "ax0401p01.ic18", 0x0000000, 0x0800000, CRC(195d6328) SHA1(cf3b5699f81235919dd3b1974d2ecb0376cb4552) ) | |
| 5907 | ROM_LOAD( "ax0401m01.ic11", 0x1000000, 0x1000000, CRC(5e5dca57) SHA1(e0623c84f66cada37d4c9399a7a8fc6866933144) ) | |
| 5908 | ROM_LOAD( "ax0402m01.ic12", 0x2000000, 0x1000000, CRC(77dd4771) SHA1(dcd23b8ddc82eab2f325266ffd7ed3fbc1bcdf71) ) | |
| 5909 | ROM_LOAD( "ax0403m01.ic13", 0x3000000, 0x1000000, CRC(911d0674) SHA1(eec35badcfbfe412b7104a86c2111f5a1b5fb5cd) ) | |
| 5910 | ROM_LOAD( "ax0404m01.ic14", 0x4000000, 0x1000000, CRC(f82a4ca3) SHA1(da686d86e176a9f24874d2916b1932f03a99a52d) ) | |
| 5911 | ROM_LOAD( "ax0405m01.ic15", 0x5000000, 0x1000000, CRC(b88298d7) SHA1(490c3ec471018895b7268ee33498dddaccbbfd5a) ) | |
| 5912 | ROM_END | |
| 5913 | ||
| 5918 | 5914 | ROM_START( demofist ) |
| 5919 | 5915 | ROM_REGION( 0x200000, "maincpu", 0) |
| 5920 | 5916 | AW_BIOS |
| 5921 | 5917 | |
| 5922 | 5918 | ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE) |
| 5923 | ROM_LOAD( "ax0601p01.ic18", 0x0000000, 0x0800000, CRC(0efb38ad) SHA1(9400e37efe3e936474d74400ebdf28ad0869b67b) ) | |
| 5924 | ROM_LOAD( "ax0601m01.ic11", 0x1000000, 0x1000000, CRC(12fda2c7) SHA1(3afbac221ffe249386e4cb50b4edd013d9a40062) ) | |
| 5925 | ROM_LOAD( "ax0602m01.ic12", 0x2000000, 0x1000000, CRC(aea61fdf) SHA1(0a088848bbf7a47df8b44b69bf72ed0d4a1088f8) ) | |
| 5926 | ROM_LOAD( "ax0603m01.ic13", 0x3000000, 0x1000000, CRC(d5879d35) SHA1(977cd3b373c6f94eb21ffb24ff564971d3d633e5) ) | |
| 5927 | ROM_LOAD( "ax0604m01.ic14", 0x4000000, 0x1000000, CRC(a7b09048) SHA1(229fa2332b58fec2a712c3ebd672662f35a9485a) ) | |
| 5928 | ROM_LOAD( "ax0605m01.ic15", 0x5000000, 0x1000000, CRC(18d8437e) SHA1(fe2e189e40a89141335e754268d29d46e3eb3bb8) ) | |
| 5929 | ROM_LOAD( "ax0606m01.ic16", 0x6000000, 0x1000000, CRC(42c81617) SHA1(1cc686af5e3fc56143836e3dcc0067893f82fcf9) ) | |
| 5930 | ROM_LOAD( "ax0607m01.ic17", 0x7000000, 0x1000000, CRC(96e5aa84) SHA1(e9841f550f2ef409d97004542bcadabb6b9e84af) ) | |
| 5919 | ROM_LOAD( "ax0601p01.ic18", 0x0000000, 0x0800000, CRC(0efb38ad) SHA1(9400e37efe3e936474d74400ebdf28ad0869b67b) ) | |
| 5920 | ROM_LOAD( "ax0601m01.ic11", 0x1000000, 0x1000000, CRC(12fda2c7) SHA1(3afbac221ffe249386e4cb50b4edd013d9a40062) ) | |
| 5921 | ROM_LOAD( "ax0602m01.ic12", 0x2000000, 0x1000000, CRC(aea61fdf) SHA1(0a088848bbf7a47df8b44b69bf72ed0d4a1088f8) ) | |
| 5922 | ROM_LOAD( "ax0603m01.ic13", 0x3000000, 0x1000000, CRC(d5879d35) SHA1(977cd3b373c6f94eb21ffb24ff564971d3d633e5) ) | |
| 5923 | ROM_LOAD( "ax0604m01.ic14", 0x4000000, 0x1000000, CRC(a7b09048) SHA1(229fa2332b58fec2a712c3ebd672662f35a9485a) ) | |
| 5924 | ROM_LOAD( "ax0605m01.ic15", 0x5000000, 0x1000000, CRC(18d8437e) SHA1(fe2e189e40a89141335e754268d29d46e3eb3bb8) ) | |
| 5925 | ROM_LOAD( "ax0606m01.ic16", 0x6000000, 0x1000000, CRC(42c81617) SHA1(1cc686af5e3fc56143836e3dcc0067893f82fcf9) ) | |
| 5926 | ROM_LOAD( "ax0607m01.ic17", 0x7000000, 0x1000000, CRC(96e5aa84) SHA1(e9841f550f2ef409d97004542bcadabb6b9e84af) ) | |
| 5931 | 5927 | ROM_END |
| 5932 | 5928 | |
| 5933 | 5929 | ROM_START( rumblef ) |
| r5666 | r5667 | |
| 5935 | 5931 | AW_BIOS |
| 5936 | 5932 | |
| 5937 | 5933 | ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE) |
| 5938 | ROM_LOAD( "ax1801p01.ic18", 0x0000000, 0x0800000, CRC(2f7fb163) SHA1(bf819d798d9a3a7bc754e111a3f53b9db6d6042a) ) | |
| 5939 | ROM_LOAD( "ax1801m01.ic11", 0x1000000, 0x1000000, CRC(c38aa61c) SHA1(e2f688a0aa8b0119f5fd3d53c8904e035d43a4b1) ) | |
| 5940 | ROM_LOAD( "ax1802m01.ic12", 0x2000000, 0x1000000, CRC(72e0ebc8) SHA1(e85300a405ea14c4c9d857eb9685c93faaca1d56) ) | |
| 5941 | ROM_LOAD( "ax1803m01.ic13", 0x3000000, 0x1000000, CRC(d0f59d98) SHA1(b854796087e9f76a13a21da8249f7224e451e129) ) | |
| 5942 | ROM_LOAD( "ax1804m01.ic14", 0x4000000, 0x1000000, CRC(15595cba) SHA1(8dd06d1f986cd21a58d20b662b11ed7ba8a6ff7a) ) | |
| 5943 | ROM_LOAD( "ax1805m01.ic15", 0x5000000, 0x1000000, CRC(3d3f8e0d) SHA1(364a0bda890722b9fb72171f96c742b8f3fef23e) ) | |
| 5944 | ROM_LOAD( "ax1806m01.ic16", 0x6000000, 0x1000000, CRC(ac2751bb) SHA1(5070fa12bf109ab87e8f7ea46ac4ae78a73105da) ) | |
| 5945 | ROM_LOAD( "ax1807m01.ic17", 0x7000000, 0x1000000, CRC(3b2fbdb0) SHA1(f9f7e06785d3a07282247aaedd9999aa7c2670b9) ) | |
| 5934 | ROM_LOAD( "ax1801p01.ic18", 0x0000000, 0x0800000, CRC(2f7fb163) SHA1(bf819d798d9a3a7bc754e111a3f53b9db6d6042a) ) | |
| 5935 | ROM_LOAD( "ax1801m01.ic11", 0x1000000, 0x1000000, CRC(c38aa61c) SHA1(e2f688a0aa8b0119f5fd3d53c8904e035d43a4b1) ) | |
| 5936 | ROM_LOAD( "ax1802m01.ic12", 0x2000000, 0x1000000, CRC(72e0ebc8) SHA1(e85300a405ea14c4c9d857eb9685c93faaca1d56) ) | |
| 5937 | ROM_LOAD( "ax1803m01.ic13", 0x3000000, 0x1000000, CRC(d0f59d98) SHA1(b854796087e9f76a13a21da8249f7224e451e129) ) | |
| 5938 | ROM_LOAD( "ax1804m01.ic14", 0x4000000, 0x1000000, CRC(15595cba) SHA1(8dd06d1f986cd21a58d20b662b11ed7ba8a6ff7a) ) | |
| 5939 | ROM_LOAD( "ax1805m01.ic15", 0x5000000, 0x1000000, CRC(3d3f8e0d) SHA1(364a0bda890722b9fb72171f96c742b8f3fef23e) ) | |
| 5940 | ROM_LOAD( "ax1806m01.ic16", 0x6000000, 0x1000000, CRC(ac2751bb) SHA1(5070fa12bf109ab87e8f7ea46ac4ae78a73105da) ) | |
| 5941 | ROM_LOAD( "ax1807m01.ic17", 0x7000000, 0x1000000, CRC(3b2fbdb0) SHA1(f9f7e06785d3a07282247aaedd9999aa7c2670b9) ) | |
| 5946 | 5942 | ROM_END |
| 5947 | 5943 | |
| 5948 | 5944 | ROM_START( ngbc ) |
| r5666 | r5667 | |
| 5950 | 5946 | AW_BIOS |
| 5951 | 5947 | |
| 5952 | 5948 | ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE) |
| 5953 | ROM_LOAD( "ax3301p01.fmem1", 0x000000, 0x800000, CRC(f7e24e67) SHA1(8eef26d44b294faa509304b1b04f4d801337bc99) ) | |
| 5949 | ROM_LOAD( "ax3301p01.fmem1", 0x000000, 0x800000, CRC(f7e24e67) SHA1(8eef26d44b294faa509304b1b04f4d801337bc99) ) | |
| 5954 | 5950 | ROM_END |
| 5955 | 5951 | |
| 5956 | 5952 | ROM_START( kofnw ) |
| r5666 | r5667 | |
| 5958 | 5954 | AW_BIOS |
| 5959 | 5955 | |
| 5960 | 5956 | ROM_REGION( 0x8000000, "user1", ROMREGION_ERASE) |
| 5961 | ROM_LOAD( "ax2201p01.ic18", 0x0000000, 0x0800000, CRC(27aab918) SHA1(41c5ddd8bd4c91481750606ab44aa115b5fe01d0) ) | |
| 5962 | ROM_LOAD( "ax2201m01.ic11", 0x1000000, 0x1000000, CRC(22ea665b) SHA1(292c92c9ae43eea2d1c27cedfb89c3956b8dea32) ) | |
| 5963 | ROM_LOAD( "ax2202m01.ic12", 0x2000000, 0x1000000, CRC(7fad1bea) SHA1(89f3f88af48973a4685955d86ef97a1487b8e7a8) ) | |
| 5964 | ROM_LOAD( "ax2203m01.ic13", 0x3000000, 0x1000000, CRC(78986ca4) SHA1(5a6c8c12955573f33361d2c6f20f85de35ac7bae) ) | |
| 5965 | ROM_LOAD( "ax2204m01.ic14", 0x4000000, 0x1000000, CRC(6ffbeb04) SHA1(975062cf364589dbdd5c5cb5ca945f76d87fc120) ) | |
| 5966 | ROM_LOAD( "ax2205m01.ic15", 0x5000000, 0x1000000, CRC(2851b791) SHA1(566ef95ea066b7bf548986085670242be217befc) ) | |
| 5967 | ROM_LOAD( "ax2206m01.ic16", 0x6000000, 0x1000000, CRC(e53eb965) SHA1(f50cd53a5859f081d8a278d24a519c9d9b49ab96) ) | |
| 5957 | ROM_LOAD( "ax2201p01.ic18", 0x0000000, 0x0800000, CRC(27aab918) SHA1(41c5ddd8bd4c91481750606ab44aa115b5fe01d0) ) | |
| 5958 | ROM_LOAD( "ax2201m01.ic11", 0x1000000, 0x1000000, CRC(22ea665b) SHA1(292c92c9ae43eea2d1c27cedfb89c3956b8dea32) ) | |
| 5959 | ROM_LOAD( "ax2202m01.ic12", 0x2000000, 0x1000000, CRC(7fad1bea) SHA1(89f3f88af48973a4685955d86ef97a1487b8e7a8) ) | |
| 5960 | ROM_LOAD( "ax2203m01.ic13", 0x3000000, 0x1000000, CRC(78986ca4) SHA1(5a6c8c12955573f33361d2c6f20f85de35ac7bae) ) | |
| 5961 | ROM_LOAD( "ax2204m01.ic14", 0x4000000, 0x1000000, CRC(6ffbeb04) SHA1(975062cf364589dbdd5c5cb5ca945f76d87fc120) ) | |
| 5962 | ROM_LOAD( "ax2205m01.ic15", 0x5000000, 0x1000000, CRC(2851b791) SHA1(566ef95ea066b7bf548986085670242be217befc) ) | |
| 5963 | ROM_LOAD( "ax2206m01.ic16", 0x6000000, 0x1000000, CRC(e53eb965) SHA1(f50cd53a5859f081d8a278d24a519c9d9b49ab96) ) | |
| 5968 | 5964 | ROM_END |
| 5969 | 5965 | |
| 5970 | 5966 | ROM_START( kov7sprt ) |
| r5666 | r5667 | |
| 6003 | 5999 | |
| 6004 | 6000 | GAME( 2002, sprtshot, awbios, aw, aw, sprtshot, ROT0, "Sammy USA", "Sports Shooting USA", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 6005 | 6001 | GAME( 2003, demofist, awbios, aw, aw, demofist, ROT0, "Polygon Magic / Dimps", "Demolish Fist", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 6006 | GAME( 2003, dolphin, awbios, aw, aw, dolphin, ROT0, "Sammy", "Dolphin Blue", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) | |
| 6007 | GAME( 2003, ggisuka, awbios, aw, aw, ggisuka, ROT0, "Sammy / Arc System Works", "Guilty Gear Isuka", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 6008 | GAME( 2004, rumblef, awbios, aw, aw, rumblef, ROT0, "Sammy / Dimps", "The Rumble Fish", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) | |
| 6002 | GAME( 2003, dolphin, awbios, aw, aw, dolphin, ROT0, "Sammy", "Dolphin Blue", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) | |
| 6003 | GAME( 2003, ggisuka, awbios, aw, aw, ggisuka, ROT0, "Sammy / Arc System Works", "Guilty Gear Isuka", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 6004 | GAME( 2004, rumblef, awbios, aw, aw, rumblef, ROT0, "Sammy / Dimps", "The Rumble Fish", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) | |
| 6009 | 6005 | GAME( 2004, rangrmsn, awbios, aw, aw, rangrmsn, ROT0, "Sammy", "Ranger Mission", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 6010 | GAME( 2004, kov7sprt, awbios, aw, aw, kov7sprt, ROT0, "Sammy / IGS", "Knights of Valour - The Seven Spirits", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) | |
| 6011 | GAME( 2005, ngbc, awbios, aw, aw, ngbc, ROT0, "Sammy / SNK Playmore", "Neo-Geo Battle Coliseum", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 6006 | GAME( 2004, kov7sprt, awbios, aw, aw, kov7sprt, ROT0, "Sammy / IGS", "Knights of Valour - The Seven Spirits", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND ) | |
| 6007 | GAME( 2005, ngbc, awbios, aw, aw, ngbc, ROT0, "Sammy / SNK Playmore", "Neo-Geo Battle Coliseum", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) | |
| 6012 | 6008 | GAME( 2005, fotns, awbios, aw, aw, fotns, ROT0, "Sega / Arc System Works", "Fist Of The North Star", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 6013 | 6009 | GAME( 2005, kofnw, awbios, aw, aw, kofnw, ROT0, "Sammy / SNK Playmore", "The King of Fighters Neowave", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| 6014 | 6010 | GAME( 2005, xtrmhunt, awbios, aw, aw, xtrmhunt, ROT0, "Sammy", "Extreme Hunting", GAME_IMPERFECT_GRAPHICS|GAME_IMPERFECT_SOUND|GAME_NOT_WORKING ) |
| r5666 | r5667 | |
|---|---|---|
| 52 | 52 | |
| 53 | 53 | #define CRTC_CLOCK XTAL_3_579545MHz |
| 54 | 54 | |
| 55 | VIDEO_START(hitpoker) | |
| 55 | static VIDEO_START(hitpoker) | |
| 56 | 56 | { |
| 57 | 57 | videoram = auto_alloc_array(machine, UINT8, 0x35ff); |
| 58 | 58 | paletteram = auto_alloc_array(machine, UINT8, 0x1000); |
| 59 | 59 | colorram = auto_alloc_array(machine, UINT8, 0x2000); |
| 60 | 60 | } |
| 61 | 61 | |
| 62 | VIDEO_UPDATE(hitpoker) | |
| 62 | static VIDEO_UPDATE(hitpoker) | |
| 63 | 63 | { |
| 64 | 64 | int count = 0; |
| 65 | 65 | int y,x; |
| r5666 | r5667 | |
| 488 | 488 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.50) |
| 489 | 489 | MACHINE_DRIVER_END |
| 490 | 490 | |
| 491 | DRIVER_INIT(hitpoker) | |
| 491 | static DRIVER_INIT(hitpoker) | |
| 492 | 492 | { |
| 493 | 493 | UINT8 *ROM = memory_region(machine, "maincpu"); |
| 494 | 494 |
| r5666 | r5667 | |
|---|---|---|
| 87 | 87 | #define VBEND (16) |
| 88 | 88 | #define VBSTART (224+16) |
| 89 | 89 | |
| 90 | UINT8 *cop_io; | |
| 90 | static UINT8 *cop_io; | |
| 91 | 91 | |
| 92 | 92 | /************************************* |
| 93 | 93 | * |
| r5666 | r5667 | |
|---|---|---|
| 42 | 42 | #include "st0016.h" |
| 43 | 43 | |
| 44 | 44 | #define DEBUG_CHAR |
| 45 | extern UINT8 *st0016_charram; | |
| 46 | 45 | static UINT32 databank; |
| 47 | 46 | static UINT32 srmp5_vidregs[0x120 / 4]; |
| 48 | 47 | static UINT16 *tileram, *palram; |
| r5666 | r5667 | |
|---|---|---|
| 220 | 220 | pxa255_set_irq_line(machine, PXA255_INT_DMA, set_intr); |
| 221 | 221 | } |
| 222 | 222 | |
| 223 | void pxa255_dma_load_descriptor_and_start(running_machine* machine, int channel) | |
| 223 | static void pxa255_dma_load_descriptor_and_start(running_machine* machine, int channel) | |
| 224 | 224 | { |
| 225 | 225 | attotime period; |
| 226 | 226 |
| r5666 | r5667 | |
|---|---|---|
| 28 | 28 | |
| 29 | 29 | static UINT8 *led_vram_lo,*led_vram_hi; |
| 30 | 30 | |
| 31 | VIDEO_START( timetrv ) | |
| 31 | static VIDEO_START( timetrv ) | |
| 32 | 32 | { |
| 33 | 33 | |
| 34 | 34 | } |
| 35 | 35 | |
| 36 | VIDEO_UPDATE( timetrv ) | |
| 36 | static VIDEO_UPDATE( timetrv ) | |
| 37 | 37 | { |
| 38 | 38 | popmessage("%s%s",led_vram_lo,led_vram_hi); |
| 39 | 39 | return 0; |
| r5666 | r5667 | |
|---|---|---|
| 1646 | 1646 | } |
| 1647 | 1647 | } |
| 1648 | 1648 | |
| 1649 | DRIVER_INIT(mastninj) | |
| 1649 | static DRIVER_INIT(mastninj) | |
| 1650 | 1650 | { |
| 1651 | 1651 | // rearrange the graphic roms into a format that MAME can decode |
| 1652 | 1652 | descramble_mastninj_gfx(memory_region(machine,"gfx2")); |
| r5666 | r5667 | |
|---|---|---|
| 97 | 97 | #include "sound/rf5c68.h" |
| 98 | 98 | #include "video/segaic16.h" |
| 99 | 99 | |
| 100 | #define ShadowColorsMultiplier 2 | |
| 101 | ||
| 100 | 102 | /***************************************************************************/ |
| 101 | 103 | |
| 102 | 104 | static UINT16 coinctrl; |
| r5666 | r5667 | |
|---|---|---|
| 1897 | 1897 | |
| 1898 | 1898 | |
| 1899 | 1899 | static MACHINE_DRIVER_START( checkmaj ) |
| 1900 | MDRV_IMPORT_FROM(galaxian) | |
| 1900 | MDRV_IMPORT_FROM(galaxian_base) | |
| 1901 | 1901 | |
| 1902 | 1902 | /* basic machine hardware */ |
| 1903 | MDRV_CPU_MODIFY("maincpu") | |
| 1904 | MDRV_CPU_PROGRAM_MAP(galaxian_map_base) /* no discrete sound */ | |
| 1905 | ||
| 1906 | /* basic machine hardware */ | |
| 1903 | 1907 | MDRV_CPU_ADD("audiocpu", Z80, 1620000) |
| 1904 | 1908 | MDRV_CPU_PROGRAM_MAP(checkmaj_sound_map) |
| 1905 | 1909 | |
| r5666 | r5667 | |
| 1908 | 1912 | /* sound hardware */ |
| 1909 | 1913 | MDRV_SOUND_ADD("ay", AY8910, 1620000) |
| 1910 | 1914 | MDRV_SOUND_CONFIG(checkmaj_ay8910_interface) |
| 1911 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", | |
| 1915 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 2 | |
| 1912 | 1916 | MACHINE_DRIVER_END |
| 1913 | 1917 | |
| 1914 | 1918 |
| r5666 | r5667 | |
|---|---|---|
| 82 | 82 | #include "cpu/m6809/m6809.h" |
| 83 | 83 | #include "machine/6840ptm.h" |
| 84 | 84 | |
| 85 | VIDEO_START( vpoker ) | |
| 85 | static VIDEO_START( vpoker ) | |
| 86 | 86 | { |
| 87 | 87 | videoram = auto_alloc_array(machine, UINT8, 0x200); |
| 88 | 88 | } |
| 89 | 89 | |
| 90 | VIDEO_UPDATE( vpoker ) | |
| 90 | static VIDEO_UPDATE( vpoker ) | |
| 91 | 91 | { |
| 92 | 92 | const gfx_element *gfx = screen->machine->gfx[0]; |
| 93 | 93 | int count = 0x0000; |
| r5666 | r5667 | |
|---|---|---|
| 69 | 69 | } |
| 70 | 70 | |
| 71 | 71 | /* Return the number of pixels processed for timing purposes? */ |
| 72 | int start_dma(void) | |
| 72 | static int start_dma(void) | |
| 73 | 73 | { |
| 74 | 74 | /* Traverse the DMA RAM list */ |
| 75 | 75 | int offs; |
| r5666 | r5667 | |
|---|---|---|
| 541 | 541 | #define GALGAMES_EEPROM_CART3 "eeprom_cart3" |
| 542 | 542 | #define GALGAMES_EEPROM_CART4 "eeprom_cart4" |
| 543 | 543 | |
| 544 | const char *galgames_eeprom_names[5] = { GALGAMES_EEPROM_BIOS, GALGAMES_EEPROM_CART1, GALGAMES_EEPROM_CART2, GALGAMES_EEPROM_CART3, GALGAMES_EEPROM_CART4 }; | |
| 544 | static const char *const galgames_eeprom_names[5] = { GALGAMES_EEPROM_BIOS, GALGAMES_EEPROM_CART1, GALGAMES_EEPROM_CART2, GALGAMES_EEPROM_CART3, GALGAMES_EEPROM_CART4 }; | |
| 545 | 545 | |
| 546 | 546 | static READ16_HANDLER( galgames_eeprom_r ) |
| 547 | 547 | { |
| r5666 | r5667 | |
| 939 | 939 | device_reset(cputag_get_cpu(machine, "maincpu")); |
| 940 | 940 | } |
| 941 | 941 | |
| 942 | UINT8 *galgames_eeprom_data = NULL; | |
| 942 | static UINT8 *galgames_eeprom_data = NULL; | |
| 943 | 943 | |
| 944 | 944 | static MACHINE_DRIVER_START( galgames ) |
| 945 | 945 | MDRV_CPU_ADD("maincpu", M68000, XTAL_24MHz / 2) |
| r5666 | r5667 | |
|---|---|---|
| 18 | 18 | ROM_END |
| 19 | 19 | |
| 20 | 20 | |
| 21 | READ16_HANDLER( sunsetbl_r ) | |
| 21 | static READ16_HANDLER( sunsetbl_r ) | |
| 22 | 22 | { |
| 23 | 23 | return mame_rand(space->machine); |
| 24 | 24 | } |
| 25 | 25 | |
| 26 | READ16_HANDLER( sunsetbl2_r ) | |
| 26 | static READ16_HANDLER( sunsetbl2_r ) | |
| 27 | 27 | { |
| 28 | 28 | return 0x0000;//mame_rand(space->machine); |
| 29 | 29 | } |
| r5666 | r5667 | |
|---|---|---|
| 324 | 324 | |
| 325 | 325 | DISCRETE_INPUTX_STREAM(NODE_01, 0, 1.0, 0) |
| 326 | 326 | DISCRETE_INPUTX_STREAM(NODE_02, 1, 1.0, 0) |
| 327 | DISCRETE_INPUTX_STREAM(NODE_03, | |
| 327 | DISCRETE_INPUTX_STREAM(NODE_03, 2, 2.0, 0) // DAC 0..32767, multiply by 2 | |
| 328 | 328 | |
| 329 | 329 | DISCRETE_INPUT_DATA(NODE_05) |
| 330 | 330 | DISCRETE_INPUT_DATA(NODE_06) |
| r5666 | r5667 | |
|---|---|---|
| 297 | 297 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 298 | 298 | INPUT_PORTS_END |
| 299 | 299 | |
| 300 | INPUT_PORTS_START( macs_m) | |
| 300 | static INPUT_PORTS_START( macs_m) | |
| 301 | 301 | PORT_INCLUDE( macs_base ) |
| 302 | 302 | |
| 303 | 303 | /*MAHJONG PANEL*/ |
| r5666 | r5667 | |
| 344 | 344 | PORT_BIT( 0xf0, IP_ACTIVE_LOW, IPT_UNUSED ) |
| 345 | 345 | INPUT_PORTS_END |
| 346 | 346 | |
| 347 | INPUT_PORTS_START( macs_h) | |
| 347 | static INPUT_PORTS_START( macs_h) | |
| 348 | 348 | PORT_INCLUDE( macs_base ) |
| 349 | 349 | |
| 350 | 350 | /*HANAFUDA PANEL*/ |
| r5666 | r5667 | |
|---|---|---|
| 214 | 214 | The program has 2 hidden menues that allow change parameters without knowledge of the players. |
| 215 | 215 | |
| 216 | 216 | |
| 217 | * Jolly Card (Evona Electronic) | |
| 218 | ||
| 219 | This set has some hidden features. | |
| 220 | In the service 2 screen, press service 1 to enter to a message edit mode. | |
| 221 | ||
| 222 | ||
| 217 | 223 | * Jolly Card (croatian sets) and Jolly Card Professional 2.0 |
| 218 | 224 | |
| 219 | 225 | These games don't operate with regular coins/tokens. Only remote credits are allowed. |
| r5666 | r5667 | |
| 1018 | 1024 | - Added new sets: Bottle 10 (italian, set 1 & 2). |
| 1019 | 1025 | - Updated technical notes. |
| 1020 | 1026 | |
| 1027 | [2009/09/09] | |
| 1028 | - Discovered and documented new features in Jolly Card (Evona Electronics). | |
| 1029 | - Removed the commented hack for joly980 driver init since is not needed anymore. | |
| 1030 | - Fixed a bug introduced with the massive input change, that didn't allow initialize | |
| 1031 | all sets that need the normal procedure to do it. | |
| 1032 | - Updated technical notes. | |
| 1021 | 1033 | |
| 1034 | ||
| 1022 | 1035 | *** TO DO *** |
| 1023 | 1036 | |
| 1024 | 1037 | - Figure out the royalcdc & jokercrd encryption. |
| 1025 | 1038 | - Figure out the remaining PIA connections for almost all games. |
| 1026 | 1039 | - Fix Saloon and move it to its own driver. |
| 1027 | 1040 | - Fix the imperfect sound in Magic Card II. |
| 1028 | - Reverse-engineering the boot code of Jolly Card Professional 2.0 to get the proper codes to boot. | |
| 1041 | - Reverse-engineering the boot code of Jolly Card Professional 2.0, | |
| 1042 | and Royal Card Professional 2.0 to get the proper codes to boot. | |
| 1029 | 1043 | - Analyze the unknown writes to $2000/$4000 in some games. |
| 1030 | 1044 | - Check for the reads to the ay8910 output ports in some games. |
| 1031 | 1045 | - Figure out the MCU in monglfir and soccernw. |
| r5666 | r5667 | |
| 1185 | 1199 | |
| 1186 | 1200 | static INPUT_PORTS_START( funworld ) |
| 1187 | 1201 | PORT_START("IN0") |
| 1188 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1202 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEY | |
| 1189 | 1203 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Halten (Hold) 1") |
| 1190 | 1204 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Loeschen (Cancel) / Kassieren (Take)") |
| 1191 | 1205 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Geben (Start) / Gamble (Play)") |
| r5666 | r5667 | |
| 1202 | 1216 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Hoppersch") PORT_CODE(KEYCODE_H) |
| 1203 | 1217 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1204 | 1218 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1205 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1219 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Abschreib (Payout)") | |
| 1206 | 1220 | |
| 1207 | 1221 | PORT_START("IN2") |
| 1208 | 1222 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r5666 | r5667 | |
| 1246 | 1260 | |
| 1247 | 1261 | static INPUT_PORTS_START( jolycdcr ) |
| 1248 | 1262 | PORT_START("IN0") |
| 1249 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1263 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEY | |
| 1250 | 1264 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop (Hold) 1") |
| 1251 | 1265 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Ponistavange (Cancel) / Kasiranje (Take) / Autohold") |
| 1252 | 1266 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Djelenje (Start) / Gamble (Play)") |
| r5666 | r5667 | |
| 1263 | 1277 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1264 | 1278 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1265 | 1279 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1266 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1280 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Vratiti Nazad (Payout)") | |
| 1267 | 1281 | |
| 1268 | 1282 | PORT_START("IN2") |
| 1269 | 1283 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r5666 | r5667 | |
| 1307 | 1321 | |
| 1308 | 1322 | static INPUT_PORTS_START( jolycdit ) |
| 1309 | 1323 | PORT_START("IN0") |
| 1310 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1324 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEY | |
| 1311 | 1325 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop (Hold) 1 / Alta (High)") |
| 1312 | 1326 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Clear / Doppio (Double) / Autohold") |
| 1313 | 1327 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") |
| r5666 | r5667 | |
| 1324 | 1338 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1325 | 1339 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1326 | 1340 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1327 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1341 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) | |
| 1328 | 1342 | |
| 1329 | 1343 | PORT_START("IN2") |
| 1330 | 1344 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r5666 | r5667 | |
| 1367 | 1381 | |
| 1368 | 1382 | static INPUT_PORTS_START( jolycdib ) |
| 1369 | 1383 | PORT_START("IN0") |
| 1370 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1384 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEY | |
| 1371 | 1385 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop (Hold) 1") |
| 1372 | 1386 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Cancel / Autohold / Accredito (Take)") |
| 1373 | 1387 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start / Doppio (Double)") |
| r5666 | r5667 | |
| 1384 | 1398 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("test3") PORT_CODE(KEYCODE_D) |
| 1385 | 1399 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1386 | 1400 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("test4") PORT_CODE(KEYCODE_F) |
| 1387 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1401 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) | |
| 1388 | 1402 | |
| 1389 | 1403 | PORT_START("IN2") |
| 1390 | 1404 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r5666 | r5667 | |
| 1428 | 1442 | |
| 1429 | 1443 | static INPUT_PORTS_START( jolyc980 ) |
| 1430 | 1444 | PORT_START("IN0") |
| 1431 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1445 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEY | |
| 1432 | 1446 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Stop (Hold) 1") |
| 1433 | 1447 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Ponistavange (Cancel) / Kasiranje (Take) / Autohold") |
| 1434 | 1448 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Djelenje (Start) / Gamble (Play)") |
| r5666 | r5667 | |
| 1445 | 1459 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1446 | 1460 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1447 | 1461 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1448 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1462 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Vratiti Nazad (Payout)") | |
| 1449 | 1463 | |
| 1450 | 1464 | PORT_START("IN2") |
| 1451 | 1465 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| r5666 | r5667 | |
| 1486 | 1500 | |
| 1487 | 1501 | static INPUT_PORTS_START( bigdeal ) |
| 1488 | 1502 | PORT_START("IN0") |
| 1489 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1503 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEY | |
| 1490 | 1504 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1") |
| 1491 | 1505 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Clear / Take") |
| 1492 | 1506 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") |
| r5666 | r5667 | |
| 1503 | 1517 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1504 | 1518 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1505 | 1519 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1506 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1520 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) | |
| 1507 | 1521 | |
| 1508 | 1522 | PORT_START("IN2") |
| 1509 | 1523 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r5666 | r5667 | |
| 1548 | 1562 | |
| 1549 | 1563 | static INPUT_PORTS_START( magicrd2 ) |
| 1550 | 1564 | PORT_START("IN0") |
| 1551 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1565 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEY | |
| 1552 | 1566 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Hold 1") |
| 1553 | 1567 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Clear / Take") |
| 1554 | 1568 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Start") |
| r5666 | r5667 | |
| 1565 | 1579 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Hopper SW") PORT_CODE(KEYCODE_H) |
| 1566 | 1580 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1567 | 1581 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1568 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1582 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) | |
| 1569 | 1583 | |
| 1570 | 1584 | PORT_START("IN2") |
| 1571 | 1585 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r5666 | r5667 | |
| 1609 | 1623 | |
| 1610 | 1624 | static INPUT_PORTS_START( royalcrd ) |
| 1611 | 1625 | PORT_START("IN0") |
| 1612 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1626 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEY | |
| 1613 | 1627 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Halten (Hold) 1 / Hoch (High)") |
| 1614 | 1628 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Loeschen/Gamble (Cancel/Play)") |
| 1615 | 1629 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Geben (Start)") |
| r5666 | r5667 | |
| 1626 | 1640 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Hoppersch") PORT_CODE(KEYCODE_H) |
| 1627 | 1641 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1628 | 1642 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1629 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1643 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Abschreib (Payout)") | |
| 1630 | 1644 | |
| 1631 | 1645 | PORT_START("IN2") |
| 1632 | 1646 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r5666 | r5667 | |
| 1687 | 1701 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1688 | 1702 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1689 | 1703 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1690 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1704 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) | |
| 1691 | 1705 | |
| 1692 | 1706 | PORT_START("IN2") |
| 1693 | 1707 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r5666 | r5667 | |
| 1747 | 1761 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1748 | 1762 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1749 | 1763 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1750 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1764 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) | |
| 1751 | 1765 | |
| 1752 | 1766 | PORT_START("IN2") |
| 1753 | 1767 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r5666 | r5667 | |
| 1789 | 1803 | |
| 1790 | 1804 | static INPUT_PORTS_START( jolyjkra ) |
| 1791 | 1805 | PORT_START("IN0") |
| 1792 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1806 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_GAMBLE_KEY | |
| 1793 | 1807 | PORT_BIT( 0x02, IP_ACTIVE_LOW, IPT_POKER_HOLD1 ) PORT_NAME("Halten (Hold) 1") |
| 1794 | 1808 | PORT_BIT( 0x04, IP_ACTIVE_LOW, IPT_POKER_CANCEL ) PORT_NAME("Loeschen (Cancel) / Kassieren (Take)") |
| 1795 | 1809 | PORT_BIT( 0x08, IP_ACTIVE_LOW, IPT_START1 ) PORT_NAME("Geben (Start) / Gamble (Play)") |
| r5666 | r5667 | |
| 1806 | 1820 | PORT_BIT( 0x10, IP_ACTIVE_LOW, IPT_SERVICE ) PORT_NAME("Hoppersch") PORT_CODE(KEYCODE_H) |
| 1807 | 1821 | PORT_BIT( 0x20, IP_ACTIVE_LOW, IPT_COIN2 ) |
| 1808 | 1822 | PORT_BIT( 0x40, IP_ACTIVE_LOW, IPT_UNKNOWN ) |
| 1809 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_ | |
| 1823 | PORT_BIT( 0x80, IP_ACTIVE_LOW, IPT_GAMBLE_KEYOUT ) PORT_NAME("Abschreib (Payout)") | |
| 1810 | 1824 | |
| 1811 | 1825 | PORT_START("IN2") |
| 1812 | 1826 | PORT_BIT( 0x01, IP_ACTIVE_LOW, IPT_COIN1 ) |
| r5666 | r5667 | |
| 2984 | 2998 | } |
| 2985 | 2999 | } |
| 2986 | 3000 | |
| 2987 | static DRIVER_INIT( jolyc980 ) | |
| 2988 | { | |
| 2989 | /************************************************************************************************ | |
| 2990 | ||
| 2991 | The game need the vector $07F0/$07F1 pointing to $801C to proper boot. | |
| 2992 | ||
| 2993 | Vector $07F0/$07F1 is copied to $0006/$0007 (multipurpose) | |
| 2994 | and then accessed through indirect JMP ($0006). | |
| 2995 | ||
| 2996 | This is a temporary patch to allow boot the game since vector $07F0/$07F1 is normally empty, | |
| 2997 | pointing to $0000 and therefore jumping to $C210 constantly where starts producing unexpected | |
| 2998 | things, like stack overflow. | |
| 2999 | ||
| 3000 | *************************************************************************************************/ | |
| 3001 | ||
| 3002 | // UINT8 *ROM = memory_region(machine, "maincpu"); | |
| 3003 | ||
| 3004 | // ROM[0xc1fc] = 0x4c; | |
| 3005 | // ROM[0xc1fd] = 0x1c; | |
| 3006 | // ROM[0xc1fe] = 0x80; | |
| 3007 | } | |
| 3008 | ||
| 3009 | 3001 | static DRIVER_INIT( magicd2a ) |
| 3010 | 3002 | /***************************************************************** |
| 3011 | 3003 | |
| r5666 | r5667 | |
| 3179 | 3171 | /* YEAR NAME PARENT MACHINE INPUT INIT ROT COMPANY FULLNAME FLAGS */ |
| 3180 | 3172 | GAME( 1985, jollycrd, 0, funworld, funworld, 0, ROT0, "TAB-Austria", "Jolly Card (austrian)", 0 ) |
| 3181 | 3173 | GAME( 1985, jolyc3x3, jollycrd, funworld, funworld, 0, ROT0, "TAB-Austria", "Jolly Card (3x3 deal)", 0 ) |
| 3182 | GAME( 2000, jolyc980, jollycrd, jolyc980, jolyc980, | |
| 3174 | GAME( 2000, jolyc980, jollycrd, jolyc980, jolyc980, | |
| 3183 | 3175 | GAME( 1998, jolycdev, jollycrd, funworld, funworld, 0, ROT0, "TAB/Evona", "Jolly Card (Evona Electronic)", 0 ) |
| 3184 | 3176 | GAME( 1985, jolyccra, jollycrd, cuoreuno, jolycdcr, 0, ROT0, "TAB-Austria", "Jolly Card (croatian, set 1)", 0 ) |
| 3185 | 3177 | GAME( 1993, jolyccrb, jollycrd, cuoreuno, jolycdcr, 0, ROT0, "Soft Design", "Jolly Card (croatian, set 2)", 0 ) |
| r5666 | r5667 | |
|---|---|---|
| 73 | 73 | |
| 74 | 74 | ***************************************************************************/ |
| 75 | 75 | |
| 76 | extern UINT8 *st0016_charram; | |
| 77 | ||
| 78 | 76 | static VIDEO_START( darkhors ); |
| 79 | 77 | static VIDEO_UPDATE( darkhors ); |
| 80 | 78 | |
| r5666 | r5667 | |
| 331 | 329 | static UINT32* jclub2_tileram; |
| 332 | 330 | static int jclub2_gfx_index; |
| 333 | 331 | |
| 334 | WRITE32_HANDLER( jclub2_tileram_w ) | |
| 332 | static WRITE32_HANDLER( jclub2_tileram_w ) | |
| 335 | 333 | { |
| 336 | 334 | COMBINE_DATA(&jclub2_tileram[offset]); |
| 337 | 335 | gfx_element_mark_dirty(space->machine->gfx[jclub2_gfx_index], offset/(256/4)); |
| r5666 | r5667 | |
| 672 | 670 | |
| 673 | 671 | |
| 674 | 672 | |
| 675 | VIDEO_START(jclub2) | |
| 673 | static VIDEO_START(jclub2) | |
| 676 | 674 | { |
| 677 | 675 | /* find first empty slot to decode gfx */ |
| 678 | 676 | for (jclub2_gfx_index = 0; jclub2_gfx_index < MAX_GFX_ELEMENTS; jclub2_gfx_index++) |
| r5666 | r5667 | |
| 687 | 685 | |
| 688 | 686 | } |
| 689 | 687 | |
| 690 | VIDEO_UPDATE(jclub2) | |
| 688 | static VIDEO_UPDATE(jclub2) | |
| 691 | 689 | { |
| 692 | 690 | return 0; |
| 693 | 691 | } |
| r5666 | r5667 | |
| 738 | 736 | &st0016_charram |
| 739 | 737 | }; |
| 740 | 738 | |
| 741 | VIDEO_START(jclub2o) | |
| 739 | static VIDEO_START(jclub2o) | |
| 742 | 740 | { |
| 743 | 741 | |
| 744 | 742 | } |
| 745 | 743 | |
| 746 | VIDEO_UPDATE(jclub2o) | |
| 744 | static VIDEO_UPDATE(jclub2o) | |
| 747 | 745 | { |
| 748 | 746 | return 0; |
| 749 | 747 | } |
| r5666 | r5667 | |
|---|---|---|
| 1780 | 1780 | *************************************/ |
| 1781 | 1781 | |
| 1782 | 1782 | static MACHINE_DRIVER_START( system24 ) |
| 1783 | /* basic machine hardware */ | |
| 1783 | 1784 | MDRV_CPU_ADD("maincpu", M68000, MASTER_CLOCK/2) |
| 1784 | 1785 | MDRV_CPU_PROGRAM_MAP(system24_cpu1_map) |
| 1785 | 1786 | MDRV_CPU_VBLANK_INT_HACK(irq_vbl, 2) |
| r5666 | r5667 | |
| 1791 | 1792 | |
| 1792 | 1793 | MDRV_MACHINE_START(system24) |
| 1793 | 1794 | MDRV_MACHINE_RESET(system24) |
| 1794 | MDRV_NVRAM_HANDLER(system24) | |
| 1795 | 1795 | |
| 1796 | 1796 | MDRV_VIDEO_ATTRIBUTES(VIDEO_UPDATE_AFTER_VBLANK) |
| 1797 | 1797 | |
| r5666 | r5667 | |
| 1816 | 1816 | MDRV_SOUND_ROUTE(ALL_OUTPUTS, "rspeaker", 0.50) |
| 1817 | 1817 | MACHINE_DRIVER_END |
| 1818 | 1818 | |
| 1819 | static MACHINE_DRIVER_START( system24_floppy ) | |
| 1820 | MDRV_IMPORT_FROM(system24) | |
| 1821 | MDRV_NVRAM_HANDLER(system24) | |
| 1822 | MACHINE_DRIVER_END | |
| 1819 | 1823 | |
| 1820 | 1824 | |
| 1821 | 1825 | /************************************* |
| r5666 | r5667 | |
| 2310 | 2314 | *************************************/ |
| 2311 | 2315 | |
| 2312 | 2316 | /* Disk Based Games */ |
| 2313 | /* 01 */GAME( 1988, hotrod, 0, system24, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 1, Floppy Based)", 0 ) | |
| 2314 | /* 01 */GAME( 1988, hotroda, hotrod, system24, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 2, Floppy Based)", 0 ) | |
| 2315 | /* 01 */GAME( 1988, hotrodj, hotrod, system24, hotrodj, hotrod, ROT0, "Sega", "Hot Rod (Japan, 4 Players, Floppy Based)", 0 ) | |
| 2316 | /* 02 */GAME( 1988, sspirits, 0, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based)", 0 ) | |
| 2317 | /* 02 */GAME( 1988, sspiritj, sspirits, system24, sspirits, sspiritj, ROT270, "Sega", "Scramble Spirits (Japan, Floppy DS3-5000-02-REV-A Based)", 0 ) | |
| 2318 | /* 02 */GAME( 1988, sspirtfc, sspirits, system24, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based, FD1094 317-0058-02c)",GAME_NOT_WORKING ) /* MISSING disk image */ | |
| 2319 | /* 03 */GAME( 1988, gground, 0, system24, gground, gground, ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03d Rev A)", 0 ) | |
| 2320 | /* 03 */GAME( 1988, ggroundj, gground, system24, gground, gground, ROT270, "Sega", "Gain Ground (Japan, 2 Players, Floppy Based, FD1094 317-0058-03b)", 0 ) | |
| 2321 | /* 04 */GAME( 1989, crkdown, 0, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (World, Floppy Based, FD1094 317-0058-04c)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) | |
| 2322 | /* 04 */GAME( 1989, crkdownu, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (US, Floppy Based, FD1094 317-0058-04d)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) | |
| 2323 | /* 04 */GAME( 1989, crkdownj, crkdown, system24, crkdown, crkdown, ROT0, "Sega", "Crack Down (Japan, Floppy Based, FD1094 317-0058-04b Rev A)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) | |
| 2324 | /* 05 */GAME( 1989, sgmast, 0, system24, sgmast, sgmast, ROT0, "Sega", "Super Masters Golf (World?, Floppy Based, FD1094 317-0058-05d?)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION ) // NOT decrypted | |
| 2325 | /* 05 */GAME( 1989, sgmastc, sgmast, system24, sgmast, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (World, Floppy Based, FD1094 317-0058-05c)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs? | |
| 2326 | /* 05 */GAME( 1989, sgmastj, sgmast, system24, sgmastj, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (Japan, Floppy Based, FD1094 317-0058-05b)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs? | |
| 2327 | /* 06 */GAME( 1990, roughrac, 0, system24, roughrac, roughrac, ROT0, "Sega", "Rough Racer (Japan, Floppy Based, FD1094 317-0058-06b)", 0 ) | |
| 2328 | /* 07 */GAME( 1990, bnzabros, 0, system24, bnzabros, bnzabros, ROT0, "Sega", "Bonanza Bros (US, Floppy DS3-5000-07d? Based)", 0 ) | |
| 2329 | /* 07 */GAME( 1990, bnzabrosj,bnzabros, system24, bnzabros, bnzabros, ROT0, "Sega", "Bonanza Bros (Japan, Floppy DS3-5000-07b Based)", 0 ) | |
| 2330 | /* 08 */GAME( 1991, qsww, 0, system24, qsww, qsww, ROT0, "Sega", "Quiz Syukudai wo Wasuremashita (Japan, Floppy Based, FD1094 317-0058-08b)", GAME_IMPERFECT_GRAPHICS ) // wrong bg colour on title | |
| 2331 | /* 09 */GAME( 1991, dcclubfd, dcclub, system24, dcclub, dcclubfd, ROT0, "Sega", "Dynamic Country Club (US, Floppy Based, FD1094 317-0058-09d)", 0 ) | |
| 2317 | /* 01 */GAME( 1988, hotrod, 0, system24_floppy, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 1, Floppy Based)", 0 ) | |
| 2318 | /* 01 */GAME( 1988, hotroda, hotrod, system24_floppy, hotrod, hotrod, ROT0, "Sega", "Hot Rod (World, 3 Players, Turbo set 2, Floppy Based)", 0 ) | |
| 2319 | /* 01 */GAME( 1988, hotrodj, hotrod, system24_floppy, hotrodj, hotrod, ROT0, "Sega", "Hot Rod (Japan, 4 Players, Floppy Based)", 0 ) | |
| 2320 | /* 02 */GAME( 1988, sspirits, 0, system24_floppy, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based)", 0 ) | |
| 2321 | /* 02 */GAME( 1988, sspiritj, sspirits, system24_floppy, sspirits, sspiritj, ROT270, "Sega", "Scramble Spirits (Japan, Floppy DS3-5000-02-REV-A Based)", 0 ) | |
| 2322 | /* 02 */GAME( 1988, sspirtfc, sspirits, system24_floppy, sspirits, sspirits, ROT270, "Sega", "Scramble Spirits (World, Floppy Based, FD1094 317-0058-02c)",GAME_NOT_WORKING ) /* MISSING disk image */ | |
| 2323 | /* 03 */GAME( 1988, gground, 0, system24_floppy, gground, gground, ROT270, "Sega", "Gain Ground (World, 3 Players, Floppy Based, FD1094 317-0058-03d Rev A)", 0 ) | |
| 2324 | /* 03 */GAME( 1988, ggroundj, gground, system24_floppy, gground, gground, ROT270, "Sega", "Gain Ground (Japan, 2 Players, Floppy Based, FD1094 317-0058-03b)", 0 ) | |
| 2325 | /* 04 */GAME( 1989, crkdown, 0, system24_floppy, crkdown, crkdown, ROT0, "Sega", "Crack Down (World, Floppy Based, FD1094 317-0058-04c)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) | |
| 2326 | /* 04 */GAME( 1989, crkdownu, crkdown, system24_floppy, crkdown, crkdown, ROT0, "Sega", "Crack Down (US, Floppy Based, FD1094 317-0058-04d)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) | |
| 2327 | /* 04 */GAME( 1989, crkdownj, crkdown, system24_floppy, crkdown, crkdown, ROT0, "Sega", "Crack Down (Japan, Floppy Based, FD1094 317-0058-04b Rev A)", GAME_IMPERFECT_GRAPHICS ) // clipping probs / solid layer probs? (radar display) | |
| 2328 | /* 05 */GAME( 1989, sgmast, 0, system24_floppy, sgmast, sgmast, ROT0, "Sega", "Super Masters Golf (World?, Floppy Based, FD1094 317-0058-05d?)", GAME_NOT_WORKING|GAME_UNEMULATED_PROTECTION ) // NOT decrypted | |
| 2329 | /* 05 */GAME( 1989, sgmastc, sgmast, system24_floppy, sgmast, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (World, Floppy Based, FD1094 317-0058-05c)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs? | |
| 2330 | /* 05 */GAME( 1989, sgmastj, sgmast, system24_floppy, sgmastj, sgmast, ROT0, "Sega", "Jumbo Ozaki Super Masters Golf (Japan, Floppy Based, FD1094 317-0058-05b)", GAME_IMPERFECT_GRAPHICS ) // some gfx offset / colour probs? | |
| 2331 | /* 06 */GAME( 1990, roughrac, 0, system24_floppy, roughrac, roughrac, ROT0, "Sega", "Rough Racer (Japan, Floppy Based, FD1094 317-0058-06b)", 0 ) | |
| 2332 | /* 07 */GAME( 1990, bnzabros, 0, system24_floppy, bnzabros, bnzabros, ROT0, "Sega", "Bonanza Bros (US, Floppy DS3-5000-07d? Based)", 0 ) | |
| 2333 | /* 07 */GAME( 1990, bnzabrosj,bnzabros, system24_floppy, bnzabros, bnzabros, ROT0, "Sega", "Bonanza Bros (Japan, Floppy DS3-5000-07b Based)", 0 ) | |
| 2334 | /* 08 */GAME( 1991, qsww, 0, system24_floppy, qsww, qsww, ROT0, "Sega", "Quiz Syukudai wo Wasuremashita (Japan, Floppy Based, FD1094 317-0058-08b)", GAME_IMPERFECT_GRAPHICS ) // wrong bg colour on title | |
| 2335 | /* 09 */GAME( 1991, dcclubfd, dcclub, system24_floppy, dcclub, dcclubfd, ROT0, "Sega", "Dynamic Country Club (US, Floppy Based, FD1094 317-0058-09d)", 0 ) | |
| 2332 | 2336 | |
| 2333 | 2337 | /* ROM Based */ |
| 2334 | 2338 | GAME( 1991, dcclub, 0, system24, dcclub, dcclub, ROT0, "Sega", "Dynamic Country Club (World, ROM Based)", 0 ) |
| r5666 | r5667 | |
|---|---|---|
| 65 | 65 | #define R3041_CLOCK 25000000 |
| 66 | 66 | |
| 67 | 67 | |
| 68 | VIDEO_START(turrett) | |
| 68 | static VIDEO_START(turrett) | |
| 69 | 69 | { |
| 70 | 70 | |
| 71 | 71 | } |
| 72 | 72 | |
| 73 | VIDEO_UPDATE(turrett) | |
| 73 | static VIDEO_UPDATE(turrett) | |
| 74 | 74 | { |
| 75 | 75 | return 0; |
| 76 | 76 | } |
| r5666 | r5667 | |
|---|---|---|
| 326 | 326 | } |
| 327 | 327 | |
| 328 | 328 | |
| 329 | int parse_options(int argc, char *argv[], options *opts) | |
| 329 | static int parse_options(int argc, char *argv[], options *opts) | |
| 330 | 330 | { |
| 331 | 331 | int pending_base = FALSE; |
| 332 | 332 | int pending_arch = FALSE; |
| r5666 | r5667 | |
|---|---|---|
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | /* loop over CPUs and build up their info */ |
| 186 | for (cpu = machine->cpu | |
| 186 | for (cpu = machine->firstcpu | |
| 187 | 187 | { |
| 188 | 188 | cpu_class_header *classheader = cpu_get_class_header(cpu); |
| 189 | 189 | cpu_debug_data *info; |
| r5666 | r5667 | |
| 249 | 249 | } |
| 250 | 250 | |
| 251 | 251 | /* first CPU is visible by default */ |
| 252 | global->visiblecpu = machine->cpu | |
| 252 | global->visiblecpu = machine->firstcpu | |
| 253 | 253 | |
| 254 | 254 | /* add callback for breaking on VBLANK */ |
| 255 | 255 | if (machine->primary_screen != NULL) |
| r5666 | r5667 | |
| 269 | 269 | { |
| 270 | 270 | const device_config *cpu; |
| 271 | 271 | |
| 272 | for (cpu = machine->cpu | |
| 272 | for (cpu = machine->firstcpu | |
| 273 | 273 | { |
| 274 | 274 | cpu_debug_data *info = cpu_get_debug_data(cpu); |
| 275 | 275 | |
| r5666 | r5667 | |
| 1014 | 1014 | const device_config *cpu; |
| 1015 | 1015 | |
| 1016 | 1016 | /* loop over CPUs and find the requested breakpoint */ |
| 1017 | for (cpu = machine->cpu | |
| 1017 | for (cpu = machine->firstcpu | |
| 1018 | 1018 | { |
| 1019 | 1019 | cpu_debug_data *info = cpu_get_debug_data(cpu); |
| 1020 | 1020 | for (pbp = NULL, bp = info->bplist; bp != NULL; pbp = bp, bp = bp->next) |
| r5666 | r5667 | |
| 1055 | 1055 | const device_config *cpu; |
| 1056 | 1056 | |
| 1057 | 1057 | /* loop over CPUs and find the requested breakpoint */ |
| 1058 | for (cpu = machine->cpu | |
| 1058 | for (cpu = machine->firstcpu | |
| 1059 | 1059 | { |
| 1060 | 1060 | cpu_debug_data *info = cpu_get_debug_data(cpu); |
| 1061 | 1061 | for (bp = info->bplist; bp != NULL; bp = bp->next) |
| r5666 | r5667 | |
| 1123 | 1123 | int spacenum; |
| 1124 | 1124 | |
| 1125 | 1125 | /* loop over CPUs and find the requested watchpoint */ |
| 1126 | for (cpu = machine->cpu | |
| 1126 | for (cpu = machine->firstcpu | |
| 1127 | 1127 | { |
| 1128 | 1128 | cpu_debug_data *info = cpu_get_debug_data(cpu); |
| 1129 | 1129 | |
| r5666 | r5667 | |
| 1166 | 1166 | int spacenum; |
| 1167 | 1167 | |
| 1168 | 1168 | /* loop over CPUs and address spaces and find the requested watchpoint */ |
| 1169 | for (cpu = machine->cpu | |
| 1169 | for (cpu = machine->firstcpu | |
| 1170 | 1170 | { |
| 1171 | 1171 | cpu_debug_data *info = cpu_get_debug_data(cpu); |
| 1172 | 1172 | |
| r5666 | r5667 | |
| 1934 | 1934 | int spacenum; |
| 1935 | 1935 | |
| 1936 | 1936 | /* loop over all watchpoints and breakpoints to free their memory */ |
| 1937 | for (cpu = machine->cpu | |
| 1937 | for (cpu = machine->firstcpu | |
| 1938 | 1938 | { |
| 1939 | 1939 | cpu_debug_data *info = cpu_get_debug_data(cpu); |
| 1940 | 1940 | |
| r5666 | r5667 | |
| 1989 | 1989 | const device_config *cpu; |
| 1990 | 1990 | |
| 1991 | 1991 | /* loop over CPUs and reset the transient flags */ |
| 1992 | for (cpu = machine->cpu | |
| 1992 | for (cpu = machine->firstcpu | |
| 1993 | 1993 | cpu_get_debug_data(cpu)->flags &= ~DEBUG_FLAG_TRANSIENT; |
| 1994 | 1994 | } |
| 1995 | 1995 | |
| r5666 | r5667 | |
| 2445 | 2445 | |
| 2446 | 2446 | static const device_config *expression_cpu_index(running_machine *machine, const char *tag) |
| 2447 | 2447 | { |
| 2448 | | |
| 2448 | const | |
| 2449 | 2449 | |
| 2450 | for (index = 0; index < ARRAY_LENGTH(machine->cpu); index++) | |
| 2451 | if (machine->cpu[index] != NULL && mame_stricmp(machine->cpu[index]->tag, tag) == 0) | |
| 2452 | return machine->cpu[index]; | |
| 2450 | for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu)) | |
| 2451 | if (mame_stricmp(cpu->tag, tag) == 0) | |
| 2452 | return cpu; | |
| 2453 | 2453 | |
| 2454 | 2454 | return NULL; |
| 2455 | 2455 | } |
| r5666 | r5667 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | typedef struct _debug_cpu_breakpoint debug_cpu_breakpoint; |
| 73 | 73 | typedef struct _debug_cpu_watchpoint debug_cpu_watchpoint; |
| 74 | typedef struct _debug_cpu_comment_group debug_cpu_comment_group; | |
| 74 | 75 | |
| 75 | 76 | |
| 76 | 77 | typedef struct _debug_trace_info debug_trace_info; |
| r5666 | r5667 | |
| 126 | 127 | cpu_disassemble_func dasm_override; /* pointer to provided override function */ |
| 127 | 128 | debug_instruction_hook_func instrhook; /* per-instruction callback hook */ |
| 128 | 129 | debug_cpu_watchpoint * wplist[ADDRESS_SPACES]; /* watchpoint lists for each address space */ |
| 130 | debug_cpu_comment_group *comments; /* disassembly comments */ | |
| 129 | 131 | }; |
| 130 | 132 | |
| 131 | 133 |
| r5666 | r5667 | |
|---|---|---|
| 1046 | 1046 | int curindex = 0; |
| 1047 | 1047 | |
| 1048 | 1048 | /* iterate over CPUs with program address spaces */ |
| 1049 | for (cpu = machine->cpu | |
| 1049 | for (cpu = machine->firstcpu | |
| 1050 | 1050 | { |
| 1051 | 1051 | registers_subview_item *subview; |
| 1052 | 1052 | |
| r5666 | r5667 | |
| 1187 | 1187 | |
| 1188 | 1188 | /* if no CPU, reset to the first one */ |
| 1189 | 1189 | if (regdata->device == NULL) |
| 1190 | regdata->device = view->machine->cpu | |
| 1190 | regdata->device = view->machine->firstcpu | |
| 1191 | 1191 | table = cpu_get_state_table(regdata->device); |
| 1192 | 1192 | |
| 1193 | 1193 | /* reset the view parameters */ |
| r5666 | r5667 | |
| 1512 | 1512 | int curindex = 0; |
| 1513 | 1513 | |
| 1514 | 1514 | /* iterate over CPUs with program address spaces */ |
| 1515 | for (cpu = machine->cpu | |
| 1515 | for (cpu = machine->firstcpu | |
| 1516 | 1516 | { |
| 1517 | 1517 | const address_space *space = cpu_get_address_space(cpu, ADDRESS_SPACE_PROGRAM); |
| 1518 | 1518 | if (space != NULL) |
| r5666 | r5667 | |
| 1569 | 1569 | debug_view_expression_alloc(&dasmdata->expression); |
| 1570 | 1570 | |
| 1571 | 1571 | /* count the number of comments */ |
| 1572 | for (cpu = view->machine->cpu | |
| 1572 | for (cpu = view->machine->firstcpu | |
| 1573 | 1573 | total_comments += debug_comment_get_count(cpu); |
| 1574 | 1574 | |
| 1575 | 1575 | /* initialize */ |
| r5666 | r5667 | |
| 1781 | 1781 | static void disasm_view_generate_bytes(const address_space *space, offs_t pcbyte, int numbytes, int minbytes, char *string, int maxchars, int encrypted) |
| 1782 | 1782 | { |
| 1783 | 1783 | int byte, offset = 0; |
| 1784 | UINT64 val; | |
| 1785 | 1784 | |
| 1786 | switch (minbytes) | |
| 1787 | { | |
| 1788 | case 1: | |
| 1789 | if (maxchars >= 2) | |
| 1790 | offset = sprintf(string, "%02X", (UINT32)debug_read_opcode(space, pcbyte, 1, FALSE)); | |
| 1791 | for (byte = 1; byte < numbytes && offset + 3 < maxchars; byte++) | |
| 1792 | offset += sprintf(&string[offset], " %02X", (UINT32)debug_read_opcode(space, pcbyte + byte, 1, encrypted)); | |
| 1793 | break; | |
| 1785 | /* output the first value */ | |
| 1786 | if (maxchars >= 2 * minbytes) | |
| 1787 | offset = sprintf(string, "%s", core_i64_hex_format(debug_read_opcode(space, pcbyte, minbytes, FALSE), minbytes * 2)); | |
| 1794 | 1788 | |
| 1795 | case 2: | |
| 1796 | if (maxchars >= 4) | |
| 1797 | offset = sprintf(string, "%04X", (UINT32)debug_read_opcode(space, pcbyte, 2, FALSE)); | |
| 1798 | for (byte = 2; byte < numbytes && offset + 5 < maxchars; byte += 2) | |
| 1799 | offset += sprintf(&string[offset], " %04X", (UINT32)debug_read_opcode(space, pcbyte + byte, 2, encrypted)); | |
| 1800 | break; | |
| 1789 | /* output subsequent values */ | |
| 1790 | for (byte = minbytes; byte < numbytes && offset + 1 + 2 * minbytes < maxchars; byte += minbytes) | |
| 1791 | offset += sprintf(&string[offset], " %s", core_i64_hex_format(debug_read_opcode(space, pcbyte + byte, minbytes, encrypted), minbytes * 2)); | |
| 1801 | 1792 | |
| 1802 | case 4: | |
| 1803 | if (maxchars >= 8) | |
| 1804 | offset = sprintf(string, "%08X", (UINT32)debug_read_opcode(space, pcbyte, 4, FALSE)); | |
| 1805 | for (byte = 4; byte < numbytes && offset + 9 < maxchars; byte += 4) | |
| 1806 | offset += sprintf(&string[offset], " %08X", (UINT32)debug_read_opcode(space, pcbyte + byte, 4, encrypted)); | |
| 1807 | break; | |
| 1808 | ||
| 1809 | case 8: | |
| 1810 | if (maxchars >= 16) | |
| 1811 | { | |
| 1812 | val = debug_read_opcode(space, pcbyte, 8, FALSE); | |
| 1813 | offset = sprintf(string, "%08X%08X", (UINT32)(val >> 32), (UINT32)val); | |
| 1814 | } | |
| 1815 | for (byte = 8; byte < numbytes && offset + 17 < maxchars; byte += 8) | |
| 1816 | { | |
| 1817 | val = debug_read_opcode(space, pcbyte + byte, 8, encrypted); | |
| 1818 | offset += sprintf(&string[offset], " %08X%08X", (UINT32)(val >> 32), (UINT32)val); | |
| 1819 | } | |
| 1820 | break; | |
| 1821 | ||
| 1822 | default: | |
| 1823 | fatalerror("disasm_view_generate_bytes: unknown size = %d", minbytes); | |
| 1824 | break; | |
| 1825 | } | |
| 1826 | ||
| 1827 | 1793 | /* if we ran out of room, indicate more */ |
| 1828 | 1794 | string[maxchars - 1] = 0; |
| 1829 | 1795 | if (byte < numbytes && maxchars > 3) |
| r5666 | r5667 | |
| 1904 | 1870 | |
| 1905 | 1871 | /* convert back and set the address of this instruction */ |
| 1906 | 1872 | dasmdata->byteaddress[instr] = pcbyte; |
| 1907 | sprintf(&destbuf[0], " % | |
| 1873 | sprintf(&destbuf[0], " %s | |
| 1908 | 1874 | |
| 1909 | 1875 | /* make sure we can translate the address, and then disassemble the result */ |
| 1910 | 1876 | physpcbyte = pcbyte; |
| r5666 | r5667 | |
| 2048 | 2014 | if (view->recompute) |
| 2049 | 2015 | { |
| 2050 | 2016 | /* recompute the view */ |
| 2051 | if (dasmdata->last_change_count != debug_comment_all_change_count(space->machine)) | |
| 2017 | if (dasmdata->byteaddress != NULL && dasmdata->last_change_count != debug_comment_all_change_count(space->machine)) | |
| 2052 | 2018 | { |
| 2053 | 2019 | /* smoosh us against the left column, but not the top row */ |
| 2054 | 2020 | view->topleft.x = 0; |
| r5666 | r5667 | |
| 2433 | 2399 | int itemnum; |
| 2434 | 2400 | |
| 2435 | 2401 | /* first add all the CPUs' address spaces */ |
| 2436 | for (cpu = machine->cpu | |
| 2402 | for (cpu = machine->firstcpu | |
| 2437 | 2403 | for (spacenum = 0; spacenum < ADDRESS_SPACES; spacenum++) |
| 2438 | 2404 | { |
| 2439 | 2405 | const address_space *space = cpu_get_address_space(cpu, spacenum); |
| r5666 | r5667 | |
|---|---|---|
| 335 | 335 | debug_console_register_command(machine, "hardreset", CMDFLAG_NONE, 0, 0, 1, execute_hardreset); |
| 336 | 336 | |
| 337 | 337 | /* ask all the CPUs if they would like to register functions or symbols */ |
| 338 | for (cpu = machine->cpu | |
| 338 | for (cpu = machine->firstcpu | |
| 339 | 339 | { |
| 340 | 340 | cpu_debug_init_func debug_init; |
| 341 | 341 | debug_init = (cpu_debug_init_func)device_get_info_fct(cpu, CPUINFO_FCT_DEBUG_INIT); |
| r5666 | r5667 | |
| 361 | 361 | const device_config *cpu; |
| 362 | 362 | |
| 363 | 363 | /* turn off all traces */ |
| 364 | for (cpu = machine->cpu | |
| 364 | for (cpu = machine->firstcpu | |
| 365 | 365 | debug_cpu_trace(cpu, NULL, 0, NULL); |
| 366 | 366 | |
| 367 | 367 | if (cheat.length) |
| r5666 | r5667 | |
| 510 | 510 | return FALSE; |
| 511 | 511 | } |
| 512 | 512 | |
| 513 | /* if we got a valid one, return */ | |
| 514 | *result = device_list_find_by_index(machine->config->devicelist, CPU, cpunum); | |
| 515 | if (*result != NULL) | |
| 516 | return TRUE; | |
| 517 | ||
| 513 | 518 | /* if out of range, complain */ |
| 514 | if (cpunum >= ARRAY_LENGTH(machine->cpu) || machine->cpu[cpunum] == NULL) | |
| 515 | { | |
| 516 | debug_console_printf(machine, "Invalid CPU index %d\n", (UINT32)cpunum); | |
| 517 | return FALSE; | |
| 518 | } | |
| 519 | *result = machine->cpu[cpunum]; | |
| 520 | return TRUE; | |
| 519 | debug_console_printf(machine, "Invalid CPU index %d\n", (UINT32)cpunum); | |
| 520 | return FALSE; | |
| 521 | 521 | } |
| 522 | 522 | |
| 523 | 523 | |
| r5666 | r5667 | |
| 635 | 635 | |
| 636 | 636 | /* then print each one */ |
| 637 | 637 | for (i = 0; i < params; i++) |
| 638 | { | |
| 639 | if ((values[i] >> 32) != 0) | |
| 640 | debug_console_printf(machine, "%X%08X ", (UINT32)(values[i] >> 32), (UINT32)values[i]); | |
| 641 | else | |
| 642 | debug_console_printf(machine, "%X ", (UINT32)values[i]); | |
| 643 | } | |
| 638 | debug_console_printf(machine, "%s", core_i64_hex_format(values[i], 0)); | |
| 644 | 639 | debug_console_printf(machine, "\n"); |
| 645 | 640 | } |
| 646 | 641 | |
| r5666 | r5667 | |
| 957 | 952 | debug_cpu_ignore_cpu(cpu, 0); |
| 958 | 953 | |
| 959 | 954 | /* then loop over CPUs and set the ignore flags on all other CPUs */ |
| 960 | for (scancpu = machine->cpu | |
| 955 | for (scancpu = machine->firstcpu | |
| 961 | 956 | if (scancpu != cpu) |
| 962 | 957 | debug_cpu_ignore_cpu(scancpu, 1); |
| 963 | 958 | debug_console_printf(machine, "Now focused on CPU '%s'\n", cpu->tag); |
| r5666 | r5667 | |
| 980 | 975 | if (params == 0) |
| 981 | 976 | { |
| 982 | 977 | /* loop over all CPUs */ |
| 983 | for (cpu = machine->cpu | |
| 978 | for (cpu = machine->firstcpu | |
| 984 | 979 | { |
| 985 | 980 | const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu); |
| 986 | 981 | |
| r5666 | r5667 | |
| 1012 | 1007 | for (paramnum = 0; paramnum < params; paramnum++) |
| 1013 | 1008 | { |
| 1014 | 1009 | /* make sure this isn't the last live CPU */ |
| 1015 | for (cpu = machine->cpu | |
| 1010 | for (cpu = machine->firstcpu | |
| 1016 | 1011 | if (cpu != cpuwhich[paramnum] && (cpu_get_debug_data(cpu)->flags & DEBUG_FLAG_OBSERVING) != 0) |
| 1017 | 1012 | break; |
| 1018 | 1013 | if (cpu == NULL) |
| r5666 | r5667 | |
| 1044 | 1039 | if (params == 0) |
| 1045 | 1040 | { |
| 1046 | 1041 | /* loop over all CPUs */ |
| 1047 | for (cpu = machine->cpu | |
| 1042 | for (cpu = machine->firstcpu | |
| 1048 | 1043 | { |
| 1049 | 1044 | const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu); |
| 1050 | 1045 | |
| r5666 | r5667 | |
| 1196 | 1191 | { |
| 1197 | 1192 | const device_config *cpu; |
| 1198 | 1193 | |
| 1199 | for (cpu = machine->cpu | |
| 1194 | for (cpu = machine->firstcpu | |
| 1200 | 1195 | { |
| 1201 | 1196 | const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu); |
| 1202 | 1197 | debug_cpu_breakpoint *bp; |
| r5666 | r5667 | |
| 1234 | 1229 | { |
| 1235 | 1230 | const device_config *cpu; |
| 1236 | 1231 | |
| 1237 | for (cpu = machine->cpu | |
| 1232 | for (cpu = machine->firstcpu | |
| 1238 | 1233 | { |
| 1239 | 1234 | const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu); |
| 1240 | 1235 | debug_cpu_breakpoint *bp; |
| r5666 | r5667 | |
| 1273 | 1268 | char buffer[256]; |
| 1274 | 1269 | |
| 1275 | 1270 | /* loop over all CPUs */ |
| 1276 | for (cpu = machine->cpu | |
| 1271 | for (cpu = machine->firstcpu | |
| 1277 | 1272 | { |
| 1278 | 1273 | const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu); |
| 1274 | const address_space *space = cpu_get_address_space(cpu, ADDRESS_SPACE_PROGRAM); | |
| 1279 | 1275 | |
| 1280 | 1276 | if (cpuinfo->bplist != NULL) |
| 1281 | 1277 | { |
| r5666 | r5667 | |
| 1287 | 1283 | for (bp = cpuinfo->bplist; bp != NULL; bp = bp->next) |
| 1288 | 1284 | { |
| 1289 | 1285 | int buflen; |
| 1290 | buflen = sprintf(buffer, "%c%4X @ % | |
| 1286 | buflen = sprintf(buffer, "%c%4X @ %s | |
| 1291 | 1287 | if (bp->condition) |
| 1292 | 1288 | buflen += sprintf(&buffer[buflen], " if %s", expression_original_string(bp->condition)); |
| 1293 | 1289 | if (bp->action) |
| r5666 | r5667 | |
| 1370 | 1366 | { |
| 1371 | 1367 | const device_config *cpu; |
| 1372 | 1368 | |
| 1373 | for (cpu = machine->cpu | |
| 1369 | for (cpu = machine->firstcpu | |
| 1374 | 1370 | { |
| 1375 | 1371 | const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu); |
| 1376 | 1372 | int spacenum; |
| r5666 | r5667 | |
| 1413 | 1409 | { |
| 1414 | 1410 | const device_config *cpu; |
| 1415 | 1411 | |
| 1416 | for (cpu = machine->cpu | |
| 1412 | for (cpu = machine->firstcpu | |
| 1417 | 1413 | { |
| 1418 | 1414 | const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu); |
| 1419 | 1415 | int spacenum; |
| r5666 | r5667 | |
| 1457 | 1453 | char buffer[256]; |
| 1458 | 1454 | |
| 1459 | 1455 | /* loop over all CPUs */ |
| 1460 | for (cpu = machine->cpu | |
| 1456 | for (cpu = machine->firstcpu | |
| 1461 | 1457 | { |
| 1462 | 1458 | const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu); |
| 1463 | 1459 | int spacenum; |
| r5666 | r5667 | |
| 1475 | 1471 | for (wp = cpuinfo->wplist[spacenum]; wp != NULL; wp = wp->next) |
| 1476 | 1472 | { |
| 1477 | 1473 | int buflen; |
| 1478 | buflen = sprintf(buffer, "%c%4X @ %08X-%08X %s", wp->enabled ? ' ' : 'D', | |
| 1479 | wp->index, memory_byte_to_address(space, wp->address), memory_byte_to_address_end(space, wp->address + wp->length) - 1, types[wp->type & 3]); | |
| 1474 | buflen = sprintf(buffer, "%c%4X @ %s-%s %s", wp->enabled ? ' ' : 'D', wp->index, | |
| 1475 | core_i64_hex_format(memory_byte_to_address(space, wp->address), space->addrchars), | |
| 1476 | core_i64_hex_format(memory_byte_to_address_end(space, wp->address + wp->length) - 1, space->addrchars), | |
| 1477 | types[wp->type & 3]); | |
| 1480 | 1478 | if (wp->condition) |
| 1481 | 1479 | buflen += sprintf(&buffer[buflen], " if %s", expression_original_string(wp->condition)); |
| 1482 | 1480 | if (wp->action) |
| r5666 | r5667 | |
| 1509 | 1507 | int cleared = FALSE; |
| 1510 | 1508 | |
| 1511 | 1509 | /* loop over CPUs and find live spots */ |
| 1512 | for (cpu = machine->cpu | |
| 1510 | for (cpu = machine->firstcpu | |
| 1513 | 1511 | { |
| 1514 | 1512 | const cpu_debug_data *cpuinfo = cpu_get_debug_data(cpu); |
| 1515 | 1513 | |
| r5666 | r5667 | |
| 1639 | 1637 | int outdex = 0; |
| 1640 | 1638 | |
| 1641 | 1639 | /* print the address */ |
| 1642 | outdex += sprintf(&output[outdex], "% | |
| 1640 | outdex += sprintf(&output[outdex], "%s | |
| 1643 | 1641 | |
| 1644 | 1642 | /* print the bytes */ |
| 1645 | | |
| 1643 | for | |
| 1646 | 1644 | { |
| 1647 | case 1: | |
| 1648 | for (j = 0; j < 16; j++) | |
| 1645 | if (i + j <= endoffset) | |
| 1646 | { | |
| 1647 | offs_t curaddr = i + j; | |
| 1648 | if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr)) | |
| 1649 | 1649 | { |
| 1650 | if (i + j <= endoffset) | |
| 1651 | { | |
| 1652 | offs_t curaddr = i + j; | |
| 1653 | if (debug_cpu_translate(space, TRANSLATE_READ, &curaddr)) | |
| 1654 | { | |
| 1655 | UINT8 byte = debug_read_byte(space, i + j, TRUE); | |
| 1656 | outdex += sprintf(&output[outdex], " %02X", byte); | |
| 1657 | } | |
| 1658 | else | |
| 1659 | outdex += sprintf(&output[outdex], " **"); | |
| 1660 | } | |
| 1661 | else | |
| 1662 | outdex += sprintf(&output[outdex], " "); | |
| 1650 | UINT64 value = debug_read_memory(space, i + j, width, TRUE); | |
| 1651 | outdex += sprintf(&output[outdex], " %s", core_i64_hex_format(value, width * 2)); | |
| 1663 | 1652 | } |
| 1664 | break; | |
| 1665 | ||
| 1666 | case 2: | |
| 1667 | for (j = 0; j < 16; j += 2) | |
| 1668 | { | |
| 1669 | if (i + j <= endoffset) | |
| 1670 | { | |
| 1671 | offs_t curaddr = i + j; | |
| 1672 | if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr)) | |
| 1673 | { | |
| 1674 | UINT16 word = debug_read_word(space, i + j, TRUE); | |
| 1675 | outdex += sprintf(&output[outdex], " %04X", word); | |
| 1676 | } | |
| 1677 | else | |
| 1678 | outdex += sprintf(&output[outdex], " ****"); | |
| 1679 | } | |
| 1680 | else | |
| 1681 | outdex += sprintf(&output[outdex], " "); | |
| 1682 | } | |
| 1683 | break; | |
| 1684 | ||
| 1685 | case 4: | |
| 1686 | for (j = 0; j < 16; j += 4) | |
| 1687 | { | |
| 1688 | if (i + j <= endoffset) | |
| 1689 | { | |
| 1690 | offs_t curaddr = i + j; | |
| 1691 | if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr)) | |
| 1692 | { | |
| 1693 | UINT32 dword = debug_read_dword(space, i + j, TRUE); | |
| 1694 | outdex += sprintf(&output[outdex], " %08X", dword); | |
| 1695 | } | |
| 1696 | else | |
| 1697 | outdex += sprintf(&output[outdex], " ********"); | |
| 1698 | } | |
| 1699 | else | |
| 1700 | outdex += sprintf(&output[outdex], " "); | |
| 1701 | } | |
| 1702 | break; | |
| 1703 | ||
| 1704 | case 8: | |
| 1705 | for (j = 0; j < 16; j += 8) | |
| 1706 | { | |
| 1707 | if (i + j <= endoffset) | |
| 1708 | { | |
| 1709 | offs_t curaddr = i + j; | |
| 1710 | if (debug_cpu_translate(space, TRANSLATE_READ_DEBUG, &curaddr)) | |
| 1711 | { | |
| 1712 | UINT64 qword = debug_read_qword(space, i + j, TRUE); | |
| 1713 | outdex += sprintf(&output[outdex], " %08X%08X", (UINT32)(qword >> 32), (UINT32)qword); | |
| 1714 | } | |
| 1715 | else | |
| 1716 | outdex += sprintf(&output[outdex], " ****************"); | |
| 1717 | } | |
| 1718 | else | |
| 1719 | outdex += sprintf(&output[outdex], " "); | |
| 1720 | } | |
| 1721 | break; | |
| 1653 | else | |
| 1654 | outdex += sprintf(&output[outdex], " %.*s", (int)width * 2, "****************"); | |
| 1655 | } | |
| 1656 | else | |
| 1657 | outdex += sprintf(&output[outdex], " %*s", (int)width * 2, ""); | |
| 1722 | 1658 | } |
| 1723 | 1659 | |
| 1724 | 1660 | /* print the ASCII */ |
| r5666 | r5667 | |
| 1853 | 1789 | /* initialize new cheat system */ |
| 1854 | 1790 | if (cheat.cheatmap != NULL) |
| 1855 | 1791 | free(cheat.cheatmap); |
| 1856 | cheat.cheatmap = malloc(real_length * sizeof(cheat_map)); | |
| 1792 | cheat.cheatmap = (cheat_map *)malloc(real_length * sizeof(cheat_map)); | |
| 1857 | 1793 | if (cheat.cheatmap == NULL) |
| 1858 | 1794 | { |
| 1859 | 1795 | debug_console_printf(machine, "Unable of allocate the necessary memory\n"); |
| r5666 | r5667 | |
| 1878 | 1814 | if (!debug_command_parameter_cpu_space(machine, &cheat.cpu, ADDRESS_SPACE_PROGRAM, &space)) |
| 1879 | 1815 | return; |
| 1880 | 1816 | |
| 1881 | cheat.cheatmap = realloc(cheat.cheatmap, (cheat.length + real_length) * sizeof(cheat_map)); | |
| 1817 | cheat.cheatmap = (cheat_map *)realloc(cheat.cheatmap, (cheat.length + real_length) * sizeof(cheat_map)); | |
| 1882 | 1818 | if (cheat.cheatmap == NULL) |
| 1883 | 1819 | { |
| 1884 | 1820 | cheat.cheatmap = cheatmap_bak; |
| r5666 | r5667 | |
| 1927 | 1863 | CHEAT_NOTEQUALTO, |
| 1928 | 1864 | CHEAT_DECREASE, |
| 1929 | 1865 | CHEAT_INCREASE, |
| 1866 | CHEAT_DECREASE_OR_EQUAL, | |
| 1867 | CHEAT_INCREASE_OR_EQUAL, | |
| 1930 | 1868 | CHEAT_DECREASEOF, |
| 1931 | 1869 | CHEAT_INCREASEOF, |
| 1932 | 1870 | CHEAT_SMALLEROF, |
| r5666 | r5667 | |
| 1957 | 1895 | condition = (params > 1) ? CHEAT_DECREASEOF : CHEAT_DECREASE; |
| 1958 | 1896 | else if (!strcmp(param[0], "increase") || !strcmp(param[0], "in") || !strcmp(param[0], "+")) |
| 1959 | 1897 | condition = (params > 1) ? CHEAT_INCREASEOF : CHEAT_INCREASE; |
| 1898 | else if (!strcmp(param[0], "decreaseorequal") || !strcmp(param[0], "deeq")) | |
| 1899 | condition = CHEAT_DECREASE_OR_EQUAL; | |
| 1900 | else if (!strcmp(param[0], "increaseorequal") || !strcmp(param[0], "ineq")) | |
| 1901 | condition = CHEAT_INCREASE_OR_EQUAL; | |
| 1960 | 1902 | else if (!strcmp(param[0], "smallerof") || !strcmp(param[0], "lt") || !strcmp(param[0], "<")) |
| 1961 | 1903 | condition = CHEAT_SMALLEROF; |
| 1962 | 1904 | else if (!strcmp(param[0], "greaterof") || !strcmp(param[0], "gt") || !strcmp(param[0], ">")) |
| r5666 | r5667 | |
| 2012 | 1954 | disable_byte = ((UINT64)cheat_value <= (UINT64)comp_byte); |
| 2013 | 1955 | break; |
| 2014 | 1956 | |
| 1957 | case CHEAT_DECREASE_OR_EQUAL: | |
| 1958 | if (cheat.signed_cheat) | |
| 1959 | disable_byte = ((INT64)cheat_value > (INT64)comp_byte); | |
| 1960 | else | |
| 1961 | disable_byte = ((UINT64)cheat_value > (UINT64)comp_byte); | |
| 1962 | break; | |
| 1963 | ||
| 1964 | case CHEAT_INCREASE_OR_EQUAL: | |
| 1965 | if (cheat.signed_cheat) | |
| 1966 | disable_byte = ((INT64)cheat_value < (INT64)comp_byte); | |
| 1967 | else | |
| 1968 | disable_byte = ((UINT64)cheat_value < (UINT64)comp_byte); | |
| 1969 | break; | |
| 1970 | ||
| 2015 | 1971 | case CHEAT_DECREASEOF: |
| 2016 | 1972 | disable_byte = (cheat_value != comp_byte - comp_value); |
| 2017 | 1973 | break; |
| r5666 | r5667 | |
| 2101 | 2057 | if (params > 0) |
| 2102 | 2058 | { |
| 2103 | 2059 | active_cheat++; |
| 2104 | fprintf(f, " <cheat desc=\"Possibility %d : % | |
| 2060 | fprintf(f, " <cheat desc=\"Possibility %d : %s | |
| 2105 | 2061 | fprintf(f, " <script state=\"run\">\n"); |
| 2106 | fprintf(f, " <action>maincpu.%c%c@% | |
| 2062 | fprintf(f, " <action>maincpu.%c%c@%s | |
| 2107 | 2063 | fprintf(f, " </script>\n"); |
| 2108 | 2064 | fprintf(f, " </cheat>\n\n"); |
| 2109 | 2065 | } |
| 2110 | 2066 | else |
| 2111 | debug_console_printf(machine, "Address=% | |
| 2067 | debug_console_printf(machine, "Address=%s | |
| 2112 | 2068 | } |
| 2113 | 2069 | } |
| 2114 | 2070 | if (params > 0) |
| r5666 | r5667 | |
| 2234 | 2190 | if (match) |
| 2235 | 2191 | { |
| 2236 | 2192 | found++; |
| 2237 | debug_console_printf(machine, "Found at % | |
| 2193 | debug_console_printf(machine, "Found at %s | |
| 2238 | 2194 | } |
| 2239 | 2195 | } |
| 2240 | 2196 | |
| r5666 | r5667 | |
| 2295 | 2251 | int numbytes = 0; |
| 2296 | 2252 | |
| 2297 | 2253 | /* print the address */ |
| 2298 | outdex += sprintf(&output[outdex], "% | |
| 2254 | outdex += sprintf(&output[outdex], "%s | |
| 2299 | 2255 | |
| 2300 | 2256 | /* make sure we can translate the address */ |
| 2301 | 2257 | tempaddr = pcbyte; |
| r5666 | r5667 | |
| 2319 | 2275 | { |
| 2320 | 2276 | int startdex = outdex; |
| 2321 | 2277 | numbytes = memory_address_to_byte(space, numbytes); |
| 2322 | switch (minbytes) | |
| 2323 | { | |
| 2324 | case 1: | |
| 2325 | for (j = 0; j < numbytes; j++) | |
| 2326 | outdex += sprintf(&output[outdex], "%02X ", (UINT32)debug_read_opcode(space, pcbyte + j, 1, FALSE)); | |
| 2327 | break; | |
| 2328 | ||
| 2329 | case 2: | |
| 2330 | for (j = 0; j < numbytes; j += 2) | |
| 2331 | outdex += sprintf(&output[outdex], "%04X ", (UINT32)debug_read_opcode(space, pcbyte + j, 2, FALSE)); | |
| 2332 | break; | |
| 2333 | ||
| 2334 | case 4: | |
| 2335 | for (j = 0; j < numbytes; j += 4) | |
| 2336 | outdex += sprintf(&output[outdex], "%08X ", (UINT32)debug_read_opcode(space, pcbyte + j, 4, FALSE)); | |
| 2337 | break; | |
| 2338 | ||
| 2339 | case 8: | |
| 2340 | for (j = 0; j < numbytes; j += 8) | |
| 2341 | { | |
| 2342 | UINT64 val = debug_read_opcode(space, pcbyte + j, 8, FALSE); | |
| 2343 | outdex += sprintf(&output[outdex], "%08X%08X ", (UINT32)(val >> 32), (UINT32)val); | |
| 2344 | } | |
| 2345 | break; | |
| 2346 | } | |
| 2278 | for (j = 0; j < numbytes; j += minbytes) | |
| 2279 | outdex += sprintf(&output[outdex], "%s ", core_i64_hex_format(debug_read_opcode(space, pcbyte + j, minbytes, FALSE), minbytes * 2)); | |
| 2347 | 2280 | if (outdex - startdex < byteswidth) |
| 2348 | 2281 | outdex += sprintf(&output[outdex], "%*s", byteswidth - (outdex - startdex), ""); |
| 2349 | 2282 | outdex += sprintf(&output[outdex], " "); |
| r5666 | r5667 | |
| 2504 | 2437 | |
| 2505 | 2438 | debug_cpu_disassemble(space->cpu, buffer, pc, opbuf, argbuf); |
| 2506 | 2439 | |
| 2507 | debug_console_printf(machine, "% | |
| 2440 | debug_console_printf(machine, "%s | |
| 2508 | 2441 | } |
| 2509 | 2442 | } |
| 2510 | 2443 | |
| r5666 | r5667 | |
| 2595 | 2528 | if (debug_cpu_translate(space, intention, &taddress)) |
| 2596 | 2529 | { |
| 2597 | 2530 | const char *mapname = memory_get_handler_string(space, intention == TRANSLATE_WRITE_DEBUG, taddress); |
| 2598 | debug_console_printf(machine, "%7s: % | |
| 2531 | debug_console_printf(machine, "%7s: %s | |
| 2599 | 2532 | } |
| 2600 | 2533 | else |
| 2601 | debug_console_printf(machine, "%7s: % | |
| 2534 | debug_console_printf(machine, "%7s: %s | |
| 2602 | 2535 | } |
| 2603 | 2536 | } |
| 2604 | 2537 | |
| r5666 | r5667 | |
| 2689 | 2622 | assert(entry != NULL); |
| 2690 | 2623 | |
| 2691 | 2624 | /* only display "register" type symbols */ |
| 2692 | debug_console_printf(machine, "%s = ", namelist[symnum]); | |
| 2693 | if ((value >> 32) != 0) | |
| 2694 | debug_console_printf(machine, "%X%08X", (UINT32)(value >> 32), (UINT32)value); | |
| 2695 | else | |
| 2696 | debug_console_printf(machine, "%X", (UINT32)value); | |
| 2625 | debug_console_printf(machine, "%s = %s", namelist[symnum], core_i64_hex_format(value, 0)); | |
| 2697 | 2626 | if (entry->info.reg.setter == NULL) |
| 2698 | 2627 | debug_console_printf(machine, " (read-only)"); |
| 2699 | 2628 | debug_console_printf(machine, "\n"); |
| r5666 | r5667 | |
|---|---|---|
| 54 | 54 | typedef struct _debug_comment debug_comment; |
| 55 | 55 | struct _debug_comment |
| 56 | 56 | { |
| 57 | UINT8 is_valid; | |
| 58 | UINT32 address; | |
| 59 | char text[DEBUG_COMMENT_MAX_LINE_LENGTH]; | |
| 60 | rgb_t color; | |
| 61 | UINT32 crc; | |
| 57 | UINT8 is_valid; | |
| 58 | UINT32 address; | |
| 59 | char text[DEBUG_COMMENT_MAX_LINE_LENGTH]; | |
| 60 | rgb_t color; | |
| 61 | UINT32 crc; | |
| 62 | 62 | }; |
| 63 | 63 | |
| 64 | typedef struct _comment_group comment_group; | |
| 65 | struct _comment_group | |
| 64 | ||
| 65 | /* in debugcpu.h -- typedef struct _debug_cpu_comment_group debug_cpu_comment_group; */ | |
| 66 | struct _debug_cpu_comment_group | |
| 66 | 67 | { |
| 67 | int comment_count; | |
| 68 | UINT32 change_count; | |
| 69 | debug_comment *comment_info[DEBUG_COMMENT_MAX_NUM]; | |
| 68 | int comment_count; | |
| 69 | UINT32 change_count; | |
| 70 | debug_comment * comment_info[DEBUG_COMMENT_MAX_NUM]; | |
| 70 | 71 | }; |
| 71 | 72 | |
| 72 | 73 | |
| 73 | 74 | |
| 74 | 75 | /*************************************************************************** |
| 75 | GLOBAL VARIABLES | |
| 76 | ***************************************************************************/ | |
| 77 | ||
| 78 | static comment_group *debug_comments; | |
| 79 | ||
| 80 | ||
| 81 | ||
| 82 | /*************************************************************************** | |
| 83 | 76 | FUNCTION PROTOTYPES |
| 84 | 77 | ***************************************************************************/ |
| 85 | 78 | |
| r5666 | r5667 | |
| 90 | 83 | |
| 91 | 84 | |
| 92 | 85 | /*************************************************************************** |
| 93 | ||
| 94 | Initialization | |
| 95 | ||
| 86 | INITIALIZATION | |
| 96 | 87 | ***************************************************************************/ |
| 97 | 88 | |
| 98 | 89 | /*------------------------------------------------------------------------- |
| r5666 | r5667 | |
| 102 | 93 | |
| 103 | 94 | int debug_comment_init(running_machine *machine) |
| 104 | 95 | { |
| 105 | | |
| 96 | const device_config *cpu; | |
| 106 | 97 | |
| 107 | for (numcpu = 0; numcpu < ARRAY_LENGTH(machine->cpu); numcpu++) | |
| 108 | if (machine->cpu[numcpu] == NULL) | |
| 109 | break; | |
| 110 | if (numcpu > 0) | |
| 98 | /* allocate memory for the comments */ | |
| 99 | for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu)) | |
| 111 | 100 | { |
| 112 | /* allocate enough comment groups for the total # of cpu's */ | |
| 113 | debug_comments = auto_alloc_array_clear(machine, comment_group, numcpu); | |
| 114 | ||
| 115 | /* automatically load em up */ | |
| 116 | debug_comment_load(machine); | |
| 117 | ||
| 118 | add_exit_callback(machine, debug_comment_exit); | |
| 101 | cpu_debug_data *cpudata = cpu_get_debug_data(cpu); | |
| 102 | cpudata->comments = auto_alloc_clear(machine, debug_cpu_comment_group); | |
| 119 | 103 | } |
| 120 | 104 | |
| 105 | /* automatically load em up */ | |
| 106 | debug_comment_load(machine); | |
| 107 | add_exit_callback(machine, debug_comment_exit); | |
| 121 | 108 | return 1; |
| 122 | 109 | } |
| 123 | 110 | |
| r5666 | r5667 | |
| 130 | 117 | |
| 131 | 118 | int debug_comment_add(const device_config *device, offs_t addr, const char *comment, rgb_t color, UINT32 c_crc) |
| 132 | 119 | { |
| 133 | int cpu_num = cpu_get_index(device); | |
| 134 | int i = 0; | |
| 135 | int insert_point = debug_comments[cpu_num].comment_count; | |
| 120 | debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments; | |
| 121 | int insert_point = comments->comment_count; | |
| 136 | 122 | int match = 0; |
| 123 | int i = 0; | |
| 137 | 124 | |
| 138 | 125 | /* Create a new item to insert into the list */ |
| 139 | 126 | debug_comment *insert_me = alloc_or_die(debug_comment); |
| r5666 | r5667 | |
| 144 | 131 | strcpy(insert_me->text, comment); |
| 145 | 132 | |
| 146 | 133 | /* Find the insert point */ |
| 147 | for (i = 0; i < | |
| 134 | for (i = 0; i < | |
| 148 | 135 | { |
| 149 | if (insert_me->address < | |
| 136 | if (insert_me->address < | |
| 150 | 137 | { |
| 151 | 138 | insert_point = i; |
| 152 | 139 | break; |
| 153 | 140 | } |
| 154 | else if (insert_me->address == debug_comments[cpu_num].comment_info[i]->address && | |
| 155 | insert_me->crc == debug_comments[cpu_num].comment_info[i]->crc) | |
| 141 | else if (insert_me->address == comments->comment_info[i]->address && | |
| 142 | insert_me->crc == comments->comment_info[i]->crc) | |
| 156 | 143 | { |
| 157 | 144 | insert_point = i; |
| 158 | 145 | match = 1; |
| r5666 | r5667 | |
| 163 | 150 | /* Got an exact match? Just replace */ |
| 164 | 151 | if (match == 1) |
| 165 | 152 | { |
| 166 | free(debug_comments[cpu_num].comment_info[insert_point]); | |
| 167 | debug_comments[cpu_num].comment_info[insert_point] = insert_me; | |
| 168 | debug_comments[cpu_num].change_count++; | |
| 153 | free(comments->comment_info[insert_point]); | |
| 154 | comments->comment_info[insert_point] = insert_me; | |
| 155 | comments->change_count++; | |
| 169 | 156 | |
| 170 | 157 | /* force an update of disassembly views */ |
| 171 | 158 | debug_view_update_type(device->machine, DVT_DISASSEMBLY); |
| r5666 | r5667 | |
| 174 | 161 | |
| 175 | 162 | /* Otherwise insert */ |
| 176 | 163 | /* First, shift the list down */ |
| 177 | for (i = debug_comments[cpu_num].comment_count; i >= insert_point; i--) | |
| 178 | debug_comments[cpu_num].comment_info[i] = debug_comments[cpu_num].comment_info[i-1]; | |
| 164 | for (i = comments->comment_count; i >= insert_point; i--) | |
| 165 | comments->comment_info[i] = comments->comment_info[i-1]; | |
| 179 | 166 | |
| 180 | 167 | /* do the insertion */ |
| 181 | debug_comments[cpu_num].comment_info[insert_point] = insert_me; | |
| 182 | debug_comments[cpu_num].comment_count++; | |
| 183 | debug_comments[cpu_num].change_count++; | |
| 168 | comments->comment_info[insert_point] = insert_me; | |
| 169 | comments->comment_count++; | |
| 170 | comments->change_count++; | |
| 184 | 171 | |
| 185 | 172 | /* force an update of disassembly views */ |
| 186 | 173 | debug_view_update_type(device->machine, DVT_DISASSEMBLY); |
| r5666 | r5667 | |
| 197 | 184 | |
| 198 | 185 | int debug_comment_remove(const device_config *device, offs_t addr, UINT32 c_crc) |
| 199 | 186 | { |
| 200 | int cpu_num = cpu_get_index(device); | |
| 201 | int i; | |
| 187 | debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments; | |
| 202 | 188 | int remove_index = -1; |
| 189 | int i; | |
| 203 | 190 | |
| 204 | for (i = 0; i < debug_comments[cpu_num].comment_count; i++) | |
| 205 | { | |
| 206 | if (debug_comments[cpu_num].comment_info[i]->address == addr) /* got an address match */ | |
| 207 | { | |
| 208 | if (debug_comments[cpu_num].comment_info[i]->crc == c_crc) | |
| 209 | { | |
| 191 | for (i = 0; i < comments->comment_count; i++) | |
| 192 | if (comments->comment_info[i]->address == addr) /* got an address match */ | |
| 193 | if (comments->comment_info[i]->crc == c_crc) | |
| 210 | 194 | remove_index = i; |
| 211 | } | |
| 212 | } | |
| 213 | } | |
| 214 | 195 | |
| 215 | 196 | /* The comment doesn't exist? */ |
| 216 | 197 | if (remove_index == -1) |
| 217 | 198 | return 0; |
| 218 | 199 | |
| 219 | 200 | /* Okay, it's there, now remove it */ |
| 220 | free( | |
| 201 | free( | |
| 221 | 202 | |
| 222 | for (i = remove_index; i < debug_comments[cpu_num].comment_count-1; i++) | |
| 223 | { | |
| 224 | debug_comments[cpu_num].comment_info[i] = debug_comments[cpu_num].comment_info[i+1]; | |
| 225 | } | |
| 203 | for (i = remove_index; i < comments->comment_count-1; i++) | |
| 204 | comments->comment_info[i] = comments->comment_info[i+1]; | |
| 226 | 205 | |
| 227 | debug_comments[cpu_num].comment_count--; | |
| 228 | debug_comments[cpu_num].change_count++; | |
| 206 | comments->comment_count--; | |
| 207 | comments->change_count++; | |
| 229 | 208 | |
| 230 | 209 | /* force an update of disassembly views */ |
| 231 | 210 | debug_view_update_type(device->machine, DVT_DISASSEMBLY); |
| r5666 | r5667 | |
| 242 | 221 | |
| 243 | 222 | const char *debug_comment_get_text(const device_config *device, offs_t addr, UINT32 c_crc) |
| 244 | 223 | { |
| 245 | | |
| 224 | debug_cpu_comment_group *comments = cpu_get_ | |
| 246 | 225 | int i; |
| 247 | 226 | |
| 248 | 227 | /* inefficient - should use bsearch - but will be a little tricky with multiple comments per addr */ |
| 249 | for (i = 0; i < debug_comments[cpu_num].comment_count; i++) | |
| 250 | { | |
| 251 | if (debug_comments[cpu_num].comment_info[i]->address == addr) /* got an address match */ | |
| 228 | for (i = 0; i < comments->comment_count; i++) | |
| 229 | if (comments->comment_info[i]->address == addr) /* got an address match */ | |
| 252 | 230 | { |
| 253 | 231 | /* now check the bank information to be sure */ |
| 254 | if (debug_comments[cpu_num].comment_info[i]->crc == c_crc) | |
| 255 | { | |
| 256 | return debug_comments[cpu_num].comment_info[i]->text; | |
| 257 | } | |
| 232 | if (comments->comment_info[i]->crc == c_crc) | |
| 233 | return comments->comment_info[i]->text; | |
| 258 | 234 | } |
| 259 | } | |
| 260 | 235 | |
| 261 | 236 | return 0x00; |
| 262 | 237 | } |
| r5666 | r5667 | |
| 269 | 244 | |
| 270 | 245 | int debug_comment_get_count(const device_config *device) |
| 271 | 246 | { |
| 272 | return debug_comments[cpu_get_index(device)].comment_count; | |
| 247 | debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments; | |
| 248 | return comments->comment_count; | |
| 273 | 249 | } |
| 274 | 250 | |
| 275 | 251 | |
| r5666 | r5667 | |
| 280 | 256 | |
| 281 | 257 | UINT32 debug_comment_get_change_count(const device_config *device) |
| 282 | 258 | { |
| 283 | return debug_comments[cpu_get_index(device)].change_count; | |
| 259 | debug_cpu_comment_group *comments = cpu_get_debug_data(device)->comments; | |
| 260 | return comments->change_count; | |
| 284 | 261 | } |
| 285 | 262 | |
| 286 | 263 | /*------------------------------------------------------------------------- |
| r5666 | r5667 | |
| 290 | 267 | |
| 291 | 268 | UINT32 debug_comment_all_change_count(running_machine *machine) |
| 292 | 269 | { |
| 293 | | |
| 270 | const device_config *cpu; | |
| 294 | 271 | UINT32 retVal = 0; |
| 295 | 272 | |
| 296 | for (i = 0; i < ARRAY_LENGTH(machine->cpu); i++) | |
| 297 | if (machine->cpu[i] != NULL) | |
| 298 | retVal += debug_comments[i].change_count ; | |
| 273 | for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu)) | |
| 274 | { | |
| 275 | debug_cpu_comment_group *comments = cpu_get_debug_data(cpu)->comments; | |
| 276 | retVal += comments->change_count; | |
| 277 | } | |
| 299 | 278 | |
| 300 | 279 | return retVal; |
| 301 | 280 | } |
| r5666 | r5667 | |
| 342 | 321 | |
| 343 | 322 | void debug_comment_dump(const device_config *device, offs_t addr) |
| 344 | 323 | { |
| 345 | | |
| 324 | debug_cpu_comment_group *comments = cpu_get_ | |
| 346 | 325 | int i; |
| 347 | 326 | int ff = 0; |
| 348 | 327 | |
| 349 | 328 | if (addr == -1) |
| 350 | 329 | { |
| 351 | for (i = 0; i < debug_comments[cpu_num].comment_count; i++) | |
| 352 | { | |
| 353 | if (debug_comments[cpu_num].comment_info[i]->is_valid) | |
| 354 | { | |
| 355 | logerror("%d : %s (%d %d)\n", i, debug_comments[cpu_num].comment_info[i]->text, | |
| 356 | debug_comments[cpu_num].comment_info[i]->address, | |
| 357 | debug_comments[cpu_num].comment_info[i]->crc); | |
| 358 | } | |
| 359 | } | |
| 330 | for (i = 0; i < comments->comment_count; i++) | |
| 331 | if (comments->comment_info[i]->is_valid) | |
| 332 | logerror("%d : %s (%d %d)\n", i, comments->comment_info[i]->text, | |
| 333 | comments->comment_info[i]->address, | |
| 334 | comments->comment_info[i]->crc); | |
| 360 | 335 | } |
| 361 | 336 | else |
| 362 | 337 | { |
| 363 | 338 | UINT32 c_crc = debug_comment_get_opcode_crc32(device, addr); |
| 364 | 339 | |
| 365 | for (i = 0; i < debug_comments[cpu_num].comment_count; i++) | |
| 366 | { | |
| 367 | if (debug_comments[cpu_num].comment_info[i]->address == addr) /* got an address match */ | |
| 340 | for (i = 0; i < comments->comment_count; i++) | |
| 341 | if (comments->comment_info[i]->address == addr) /* got an address match */ | |
| 368 | 342 | { |
| 369 | 343 | /* now check the bank information to be sure */ |
| 370 | if ( | |
| 344 | if ( | |
| 371 | 345 | { |
| 372 | 346 | logerror("%d : %s (%d %d)\n", addr, |
| 373 | debug_comments[cpu_num].comment_info[addr]->text, | |
| 374 | debug_comments[cpu_num].comment_info[addr]->address, | |
| 375 | debug_comments[cpu_num].comment_info[addr]->crc); | |
| 347 | comments->comment_info[addr]->text, | |
| 348 | comments->comment_info[addr]->address, | |
| 349 | comments->comment_info[addr]->crc); | |
| 376 | 350 | ff = 1; |
| 377 | 351 | } |
| 378 | 352 | } |
| 379 | } | |
| 380 | 353 | |
| 381 | 354 | if (!ff) logerror("No comment exists for address : 0x%x\n", addr); |
| 382 | 355 | } |
| r5666 | r5667 | |
| 389 | 362 | |
| 390 | 363 | int debug_comment_save(running_machine *machine) |
| 391 | 364 | { |
| 392 | int | |
| 365 | int | |
| 393 | 366 | char crc_buf[20]; |
| 394 | 367 | xml_data_node *root = xml_file_create(); |
| 395 | 368 | xml_data_node *commentnode, *systemnode; |
| 396 | 369 | int total_comments = 0; |
| 370 | const device_config *cpu; | |
| 397 | 371 | |
| 398 | 372 | /* if we don't have a root, bail */ |
| 399 | if ( | |
| 373 | if ( | |
| 400 | 374 | return 0; |
| 401 | 375 | |
| 402 | 376 | /* create a comment node */ |
| 403 | 377 | commentnode = xml_add_child(root, "mamecommentfile", NULL); |
| 404 | if ( | |
| 378 | if ( | |
| 405 | 379 | goto error; |
| 406 | 380 | xml_set_attribute_int(commentnode, "version", COMMENT_VERSION); |
| 407 | 381 | |
| 408 | 382 | /* create a system node */ |
| 409 | 383 | systemnode = xml_add_child(commentnode, "system", NULL); |
| 410 | if ( | |
| 384 | if ( | |
| 411 | 385 | goto error; |
| 412 | 386 | xml_set_attribute(systemnode, "name", machine->gamedrv->name); |
| 413 | 387 | |
| 414 | 388 | /* for each cpu */ |
| 415 | for (i = 0; i < ARRAY_LENGTH(machine->cpu); i++) | |
| 416 | if (machine->cpu[i] != NULL) | |
| 389 | for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu)) | |
| 390 | { | |
| 391 | debug_cpu_comment_group *comments = cpu_get_debug_data(cpu)->comments; | |
| 392 | ||
| 393 | xml_data_node *curnode = xml_add_child(systemnode, "cpu", NULL); | |
| 394 | if (curnode == NULL) | |
| 395 | goto error; | |
| 396 | xml_set_attribute(curnode, "tag", cpu->tag); | |
| 397 | ||
| 398 | for (j = 0; j < comments->comment_count; j++) | |
| 417 | 399 | { |
| 418 | xml_data_node *curnode = xml_add_child(systemnode, "cpu", NULL); | |
| 419 | if (!curnode) | |
| 400 | xml_data_node *datanode = xml_add_child(curnode, "comment", xml_normalize_string(comments->comment_info[j]->text)); | |
| 401 | if (datanode == NULL) | |
| 420 | 402 | goto error; |
| 421 | xml_set_attribute_int(curnode, "num", i); | |
| 422 | ||
| 423 | for (j = 0; j < debug_comments[i].comment_count; j++) | |
| 424 | { | |
| 425 | xml_data_node *datanode = xml_add_child(curnode, "comment", xml_normalize_string(debug_comments[i].comment_info[j]->text)); | |
| 426 | if (!datanode) | |
| 427 | goto error; | |
| 428 | xml_set_attribute_int(datanode, "address", debug_comments[i].comment_info[j]->address); | |
| 429 | xml_set_attribute_int(datanode, "color", debug_comments[i].comment_info[j]->color); | |
| 430 | sprintf(crc_buf, "%08X", debug_comments[i].comment_info[j]->crc); | |
| 431 | xml_set_attribute(datanode, "crc", crc_buf); | |
| 432 | total_comments++; | |
| 433 | } | |
| 403 | xml_set_attribute_int(datanode, "address", comments->comment_info[j]->address); | |
| 404 | xml_set_attribute_int(datanode, "color", comments->comment_info[j]->color); | |
| 405 | sprintf(crc_buf, "%08X", comments->comment_info[j]->crc); | |
| 406 | xml_set_attribute(datanode, "crc", crc_buf); | |
| 407 | total_comments++; | |
| 434 | 408 | } |
| 409 | } | |
| 435 | 410 | |
| 436 | 411 | /* flush the file */ |
| 437 | 412 | if (total_comments > 0) |
| r5666 | r5667 | |
| 484 | 459 | |
| 485 | 460 | static int debug_comment_load_xml(running_machine *machine, mame_file *fp) |
| 486 | 461 | { |
| 487 | int | |
| 462 | int | |
| 488 | 463 | xml_data_node *root, *commentnode, *systemnode, *cpunode, *datanode; |
| 489 | 464 | const char *name; |
| 490 | 465 | int version; |
| 491 | 466 | |
| 492 | 467 | /* read the file */ |
| 493 | 468 | root = xml_file_read(mame_core_file(fp), NULL); |
| 494 | if ( | |
| 469 | if ( | |
| 495 | 470 | goto error; |
| 496 | 471 | |
| 497 | 472 | /* find the config node */ |
| 498 | 473 | commentnode = xml_get_sibling(root->child, "mamecommentfile"); |
| 499 | if ( | |
| 474 | if ( | |
| 500 | 475 | goto error; |
| 501 | 476 | |
| 502 | 477 | /* validate the config data version */ |
| r5666 | r5667 | |
| 510 | 485 | if (strcmp(name, machine->gamedrv->name) != 0) |
| 511 | 486 | goto error; |
| 512 | 487 | |
| 513 | i = 0; | |
| 514 | ||
| 515 | 488 | for (cpunode = xml_get_sibling(systemnode->child, "cpu"); cpunode; cpunode = xml_get_sibling(cpunode->next, "cpu")) |
| 516 | 489 | { |
| 517 | j = 0; | |
| 518 | ||
| 519 | for (datanode = xml_get_sibling(cpunode->child, "comment"); datanode; datanode = xml_get_sibling(datanode->next, "comment")) | |
| 490 | const device_config *cpu = cputag_get_cpu(machine, xml_get_attribute_string(cpunode, "tag", "")); | |
| 491 | if (cpu != NULL) | |
| 520 | 492 | { |
| 521 | /* Malloc the comment */ | |
| 522 | debug_comments[i].comment_info[j] = (debug_comment*) malloc(sizeof(debug_comment)); | |
| 493 | debug_cpu_comment_group *comments = cpu_get_debug_data(cpu)->comments; | |
| 494 | j = 0; | |
| 523 | 495 | |
| 524 | debug_comments[i].comment_info[j]->address = xml_get_attribute_int(datanode, "address", 0); | |
| 525 | debug_comments[i].comment_info[j]->color = xml_get_attribute_int(datanode, "color", 0); | |
| 526 | sscanf(xml_get_attribute_string(datanode, "crc", 0), "%08X", &debug_comments[i].comment_info[j]->crc); | |
| 527 | strcpy(debug_comments[i].comment_info[j]->text, datanode->value); | |
| 528 | debug_comments[i].comment_info[j]->is_valid = 1; | |
| 496 | for (datanode = xml_get_sibling(cpunode->child, "comment"); datanode; datanode = xml_get_sibling(datanode->next, "comment")) | |
| 497 | { | |
| 498 | /* Malloc the comment */ | |
| 499 | comments->comment_info[j] = (debug_comment*) malloc(sizeof(debug_comment)); | |
| 529 | 500 | |
| 530 | j++; | |
| 531 | } | |
| 501 | comments->comment_info[j]->address = xml_get_attribute_int(datanode, "address", 0); | |
| 502 | comments->comment_info[j]->color = xml_get_attribute_int(datanode, "color", 0); | |
| 503 | sscanf(xml_get_attribute_string(datanode, "crc", 0), "%08X", &comments->comment_info[j]->crc); | |
| 504 | strcpy(comments->comment_info[j]->text, datanode->value); | |
| 505 | comments->comment_info[j]->is_valid = 1; | |
| 532 | 506 | |
| 533 | debug_comments[i].comment_count = j; | |
| 507 | j++; | |
| 508 | } | |
| 534 | 509 | |
| 535 | i++; | |
| 510 | comments->comment_count = j; | |
| 511 | } | |
| 536 | 512 | } |
| 537 | 513 | |
| 538 | 514 | /* free the parser */ |
| r5666 | r5667 | |
| 564 | 540 | |
| 565 | 541 | static void debug_comment_free(running_machine *machine) |
| 566 | 542 | { |
| 567 | | |
| 543 | const device_config *cpu; | |
| 568 | 544 | |
| 569 | for (i = 0; i < ARRAY_LENGTH(machine->cpu); i++) | |
| 570 | if (machine->cpu[i] != NULL) | |
| 545 | for (cpu = machine->firstcpu; cpu != NULL; cpu = cpu_next(cpu)) | |
| 546 | { | |
| 547 | debug_cpu_comment_group *comments = cpu_get_debug_data(cpu)->comments; | |
| 548 | if (comments != NULL) | |
| 571 | 549 | { |
| 572 | for (j = 0; j < debug_comments[i].comment_count; j++) | |
| 573 | { | |
| 574 | free(debug_comments[i].comment_info[j]); | |
| 575 | } | |
| 550 | int j; | |
| 576 | 551 | |
| 577 | debug_comments[i].comment_count = 0; | |
| 552 | for (j = 0; j < comments->comment_count; j++) | |
| 553 | free(comments->comment_info[j]); | |
| 554 | ||
| 555 | comments->comment_count = 0; | |
| 578 | 556 | } |
| 557 | } | |
| 579 | 558 | } |
| r5666 | r5667 | |
|---|---|---|
| 1112 | 1112 | " increase [in, -]\n" |
| 1113 | 1113 | " without <comparisonvalue> search for all bytes that have increased since the last search.\n" |
| 1114 | 1114 | " with <comparisonvalue> search for all bytes that have increased by the <comparisonvalue> since the last search.\n" |
| 1115 | " decreaseorequal [deeq]\n" | |
| 1116 | " no <comparisonvalue> needed.\n" | |
| 1117 | " search for all bytes that have decreased or have same value since the last search.\n" | |
| 1118 | " increaseorequal [ineq]\n" | |
| 1119 | " no <comparisonvalue> needed.\n" | |
| 1120 | " search for all bytes that have decreased or have same value since the last search.\n" | |
| 1115 | 1121 | " smallerof [lt]\n" |
| 1116 | 1122 | " without <comparisonvalue> this condition is invalid\n" |
| 1117 | 1123 | " with <comparisonvalue> search for all bytes that are smaller than the <comparisonvalue>.\n" |
| r5666 | r5667 | |
| 1149 | 1155 | " increase [in, -]\n" |
| 1150 | 1156 | " without <comparisonvalue> search for all bytes that have increased since the initial search.\n" |
| 1151 | 1157 | " with <comparisonvalue> search for all bytes that have increased by the <comparisonvalue> since the initial search.\n" |
| 1158 | " decreaseorequal [deeq]\n" | |
| 1159 | " no <comparisonvalue> needed.\n" | |
| 1160 | " search for all bytes that have decreased or have same value since the initial search.\n" | |
| 1161 | " increaseorequal [ineq]\n" | |
| 1162 | " no <comparisonvalue> needed.\n" | |
| 1163 | " search for all bytes that have decreased or have same value since the initial search.\n" | |
| 1152 | 1164 | " smallerof [lt]\n" |
| 1153 | 1165 | " without <comparisonvalue> this condition is invalid.\n" |
| 1154 | 1166 | " with <comparisonvalue> search for all bytes that are smaller than the <comparisonvalue>.\n" |
| r5666 | r5667 | |
|---|---|---|
| 30 | 30 | }; |
| 31 | 31 | |
| 32 | 32 | |
| 33 | static const char *s_mnemonic[] = { | |
| 33 | static const char *const s_mnemonic[] = { | |
| 34 | 34 | "a10aac", "a6aac", "a8aac", "ac1ac", "acacc", "acnaa", "alec", "alem", "amaac", "branch", "call", "ccla", |
| 35 | 35 | "cla", "clo", "comc", "comx", "comx8", "cpaiz", "ctmdyn", "dan", "dman", "dmea", "dnaa", |
| 36 | 36 | "dyn", "ia", "imac", "iyc", "kne", "knez", "ldp", "ldx", "ldx", "mnea", "mnez", |
| r5666 | r5667 | |
|---|---|---|
| 29 | 29 | #define h8_mem_read16(x) ((oprom[x] << 8) | oprom[(x) + 1]) |
| 30 | 30 | #define h8_mem_read32(x) ((oprom[x] << 24) | (oprom[(x) + 1] << 16) | (oprom[(x) + 2] << 8) | oprom[(x) + 3]) |
| 31 | 31 | |
| 32 | offs_t h8_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 addr_mask) | |
| 32 | static offs_t h8_disasm(char *buffer, offs_t pc, const UINT8 *oprom, const UINT8 *opram, UINT32 addr_mask) | |
| 33 | 33 | { |
| 34 | 34 | UINT32 size = 0; |
| 35 | 35 | UINT16 opcode; |
| r5666 | r5667 | |
|---|---|---|
| 1139 | 1139 | int x; |
| 1140 | 1140 | |
| 1141 | 1141 | /* find the owning CPU */ |
| 1142 | for (cpu = screen->machine->cpu | |
| 1142 | for (cpu = screen->machine->firstcpu | |
| 1143 | 1143 | { |
| 1144 | 1144 | cpu_type type = cpu_get_type(cpu); |
| 1145 | 1145 | if (type == CPU_TMS34010 || type == CPU_TMS34020) |
| r5666 | r5667 | |
|---|---|---|
| 373 | 373 | |
| 374 | 374 | |
| 375 | 375 | |
| 376 | unsigned dasm_tms32031(char *buffer, unsigned pc, UINT32 op) | |
| 376 | static unsigned dasm_tms32031(char *buffer, unsigned pc, UINT32 op) | |
| 377 | 377 | { |
| 378 | 378 | UINT32 flags = 0; |
| 379 | 379 |
| r5666 | r5667 | |
|---|---|---|
| 1152 | 1152 | } |
| 1153 | 1153 | } |
| 1154 | 1154 | |
| 1155 | UINT32 sharc_dasm_one(char *buffer, offs_t pc, UINT64 opcode) | |
| 1155 | static UINT32 sharc_dasm_one(char *buffer, offs_t pc, UINT64 opcode) | |
| 1156 | 1156 | { |
| 1157 | 1157 | #define DEFAULT_DASM_WIDTH (64) |
| 1158 | 1158 |
| r5666 | r5667 | |
|---|---|---|
| 78 | 78 | } |
| 79 | 79 | |
| 80 | 80 | |
| 81 | unsigned dasm_ssp1601(char *buffer, unsigned pc, const UINT8 *oprom) | |
| 81 | static unsigned dasm_ssp1601(char *buffer, unsigned pc, const UINT8 *oprom) | |
| 82 | 82 | { |
| 83 | 83 | const UINT8 *base_oprom; |
| 84 | 84 | UINT16 op; |
| r5666 | r5667 | |
|---|---|---|
| 1637 | 1637 | switch ((op2 >> 3) & 0x7) |
| 1638 | 1638 | { |
| 1639 | 1639 | case 0: sprintf(s, "fadd st(0),st(%d)", op2 & 0x7); break; |
| 1640 | case 1: sprintf(s, "fcom st(0),st(%d)", op2 & 0x7); break; | |
| 1641 | case 2: sprintf(s, "fsub st(0),st(%d)", op2 & 0x7); break; | |
| 1642 | case 3: sprintf(s, "fdiv st(0),st(%d)", op2 & 0x7); break; | |
| 1643 | case 4: sprintf(s, "fmul st(0),st(%d)", op2 & 0x7); break; | |
| 1644 | case 5: sprintf(s, "fcomp st(0),st(%d)", op2 & 0x7); break; | |
| 1645 | case 6: sprintf(s, "fsubr st(0),st(%d)", op2 & 0x7); break; | |
| 1640 | case 1: sprintf(s, "fmul st(0),st(%d)", op2 & 0x7); break; | |
| 1641 | case 2: sprintf(s, "fcom st(0),st(%d)", op2 & 0x7); break; | |
| 1642 | case 3: sprintf(s, "fcomp st(0),st(%d)", op2 & 0x7); break; | |
| 1643 | case 4: sprintf(s, "fsub st(0),st(%d)", op2 & 0x7); break; | |
| 1644 | case 5: sprintf(s, "fsubr st(0),st(%d)", op2 & 0x7); break; | |
| 1645 | case 6: sprintf(s, "fdiv st(0),st(%d)", op2 & 0x7); break; | |
| 1646 | 1646 | case 7: sprintf(s, "fdivr st(0),st(%d)", op2 & 0x7); break; |
| 1647 | 1647 | } |
| 1648 | 1648 | } |
| r5666 | r5667 | |
| 1747 | 1747 | |
| 1748 | 1748 | case 0x18: case 0x19: case 0x1a: case 0x1b: case 0x1c: case 0x1d: case 0x1e: case 0x1f: |
| 1749 | 1749 | sprintf(s, "fcmovu st(0),st(%d)", op2 & 0x7); break; |
| 1750 | case 0x29: | |
| 1751 | sprintf(s, "fucompp"); break; | |
| 1750 | 1752 | |
| 1751 | 1753 | default: sprintf(s, "??? (FPU)"); break; |
| 1752 | 1754 |
| r5666 | r5667 | |
|---|---|---|
| 119 | 119 | { 0x60, OP_I386, I386OP(pusha), I386OP(pushad), }, |
| 120 | 120 | { 0x61, OP_I386, I386OP(popa), I386OP(popad), }, |
| 121 | 121 | { 0x62, OP_I386, I386OP(bound_r16_m16_m16), I386OP(bound_r32_m32_m32), }, |
| 122 | { 0x63, OP_I386, I386OP( | |
| 122 | { 0x63, OP_I386, I386OP(ar | |
| 123 | 123 | { 0x64, OP_I386, I386OP(segment_FS), I386OP(segment_FS), }, |
| 124 | 124 | { 0x65, OP_I386, I386OP(segment_GS), I386OP(segment_GS), }, |
| 125 | 125 | { 0x66, OP_I386, I386OP(operand_size), I386OP(operand_size), }, |
| r5666 | r5667 | |
|---|---|---|
| 887 | 887 | CYCLES(cpustate,CYCLES_OUT); |
| 888 | 888 | } |
| 889 | 889 | |
| 890 | ||
| 891 | static void I386OP(arpl)(i386_state *cpustate) // Opcode 0x63 | |
| 892 | { | |
| 893 | UINT16 src, dst; | |
| 894 | UINT8 modrm = FETCH(cpustate); | |
| 895 | UINT8 flag = 0; | |
| 896 | ||
| 897 | if( modrm >= 0xc0 ) { | |
| 898 | src = LOAD_REG16(modrm); | |
| 899 | dst = LOAD_RM16(modrm); | |
| 900 | if( (dst&0x3) < (src&0x3) ) { | |
| 901 | dst = (dst&0xfffc) | (src&0x3); | |
| 902 | flag = 1; | |
| 903 | STORE_RM16(modrm, dst); | |
| 904 | } | |
| 905 | } else { | |
| 906 | UINT32 ea = GetEA(cpustate, modrm); | |
| 907 | src = LOAD_REG16(modrm); | |
| 908 | dst = READ16(cpustate, ea); | |
| 909 | if( (dst&0x3) < (src&0x3) ) { | |
| 910 | dst = (dst&0xfffc) | (src&0x3); | |
| 911 | flag = 1; | |
| 912 | WRITE16(cpustate, ea, dst); | |
| 913 | } | |
| 914 | } | |
| 915 | SetZF(flag); | |
| 916 | } | |
| 917 | ||
| 890 | 918 | static void I386OP(push_i8)(i386_state *cpustate) // Opcode 0x6a |
| 891 | 919 | { |
| 892 | 920 | UINT8 value = FETCH(cpustate); |
| r5666 | r5667 | |
| 2170 | 2198 | static void I386OP(decimal_adjust)(i386_state *cpustate, int direction) |
| 2171 | 2199 | { |
| 2172 | 2200 | UINT8 tmpAL = REG8(AL); |
| 2201 | UINT8 tmpCF = cpustate->CF; | |
| 2173 | 2202 | |
| 2174 | 2203 | if (cpustate->AF || ((REG8(AL) & 0xf) > 9)) |
| 2175 | 2204 | { |
| 2176 | REG8(AL) = REG8(AL) + (direction * 0x06); | |
| 2205 | UINT16 t= (UINT16)REG8(AL) + (direction * 0x06); | |
| 2206 | REG8(AL) = (UINT8)t&0xff; | |
| 2177 | 2207 | cpustate->AF = 1; |
| 2178 | if ( | |
| 2208 | if (t | |
| 2179 | 2209 | cpustate->CF = 1; |
| 2180 | 2210 | if (direction > 0) |
| 2181 | 2211 | tmpAL = REG8(AL); |
| 2182 | 2212 | } |
| 2183 | 2213 | |
| 2184 | if ( | |
| 2214 | if ( | |
| 2185 | 2215 | { |
| 2186 | 2216 | REG8(AL) += (direction * 0x60); |
| 2187 | 2217 | cpustate->CF = 1; |
| r5666 | r5667 | |
| 2204 | 2234 | |
| 2205 | 2235 | static void I386OP(aaa)(i386_state *cpustate) // Opcode 0x37 |
| 2206 | 2236 | { |
| 2207 | if( (REG8(AL) & 0x0f) || cpustate->AF != 0 ) { | |
| 2237 | if( ( (REG8(AL) & 0x0f) > 9) || (cpustate->AF != 0) ) { | |
| 2208 | 2238 | REG16(AX) = REG16(AX) + 6; |
| 2209 | 2239 | REG8(AH) = REG8(AH) + 1; |
| 2210 | 2240 | cpustate->AF = 1; |
| r5666 | r5667 | |
|---|---|---|
| 196 | 196 | } |
| 197 | 197 | |
| 198 | 198 | |
| 199 | unsigned dasm_dsp32(char *buffer, unsigned pc, UINT32 op) | |
| 199 | static unsigned dasm_dsp32(char *buffer, unsigned pc, UINT32 op) | |
| 200 | 200 | { |
| 201 | 201 | UINT32 flags = 0; |
| 202 | 202 |
| r5666 | r5667 | |
|---|---|---|
| 14 | 14 | |
| 15 | 15 | #define LOG(x) do { if (VERBOSE) logerror x; } while (0) |
| 16 | 16 | |
| 17 | static UINT8 kbp_table[] = { 0x00,0x01,0x02,0x0f,0x03,0x0f,0x0f,0x0f,0x04,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f }; | |
| 17 | static const UINT8 kbp_table[] = { 0x00,0x01,0x02,0x0f,0x03,0x0f,0x0f,0x0f,0x04,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f,0x0f }; | |
| 18 | 18 | |
| 19 | 19 | /*************************************************************************** |
| 20 | 20 | TYPE DEFINITIONS |
| r5666 | r5667 | |
|---|---|---|
| 76 | 76 | return temp; |
| 77 | 77 | } |
| 78 | 78 | |
| 79 | unsigned dasmjag(int variant, char *buffer, unsigned pc, const UINT8 *oprom) | |
| 79 | static unsigned dasmjag(int variant, char *buffer, unsigned pc, const UINT8 *oprom) | |
| 80 | 80 | { |
| 81 | 81 | UINT32 flags = 0; |
| 82 | 82 | int op = ROPCODE(0); |
| r5666 | r5667 | |
|---|---|---|
| 47 | 47 | }; |
| 48 | 48 | |
| 49 | 49 | #define M6502_IRQ_LINE 0 |
| 50 | /* use cpu_set_input_line( | |
| 50 | /* use cpu_set_input_line( | |
| 51 | 51 | to change level of the so input line |
| 52 | 52 | positiv edge sets overflow flag */ |
| 53 | 53 | #define M6502_SET_OVERFLOW 1 |
| r5666 | r5667 | |
|---|---|---|
| 34 | 34 | }; |
| 35 | 35 | |
| 36 | 36 | #define M6509_IRQ_LINE M6502_IRQ_LINE |
| 37 | /* use cpu_set_input_line( | |
| 37 | /* use cpu_set_input_line( | |
| 38 | 38 | to change level of the so input line |
| 39 | 39 | positiv edge sets overflow flag */ |
| 40 | 40 | #define M6509_SET_OVERFLOW 3 |
| r5666 | r5667 | |
|---|---|---|
| 250 | 250 | ***************************************************************************/ |
| 251 | 251 | |
| 252 | 252 | /* cycles lookup */ |
| 253 | const UINT8 lut_cycles_8080[256]={ | |
| 253 | static const UINT8 lut_cycles_8080[256]={ | |
| 254 | 254 | /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ |
| 255 | 255 | /* 0 */ 4, 10,7, 5, 5, 5, 7, 4, 4, 10,7, 5, 5, 5, 7, 4, |
| 256 | 256 | /* 1 */ 4, 10,7, 5, 5, 5, 7, 4, 4, 10,7, 5, 5, 5, 7, 4, |
| r5666 | r5667 | |
| 268 | 268 | /* D */ 5, 10,10,10,11,11,7, 11,5, 10,10,10,11,11,7, 11, |
| 269 | 269 | /* E */ 5, 10,10,18,11,11,7, 11,5, 5, 10,5, 11,11,7, 11, |
| 270 | 270 | /* F */ 5, 10,10,4, 11,11,7, 11,5, 5, 10,4, 11,11,7, 11 }; |
| 271 | const UINT8 lut_cycles_8085[256]={ | |
| 271 | static const UINT8 lut_cycles_8085[256]={ | |
| 272 | 272 | /* 0 1 2 3 4 5 6 7 8 9 A B C D E F */ |
| 273 | 273 | /* 0 */ 4, 10,7, 6, 4, 4, 7, 4, 10,10,7, 6, 4, 4, 7, 4, |
| 274 | 274 | /* 1 */ 7, 10,7, 6, 4, 4, 7, 4, 10,10,7, 6, 4, 4, 7, 4, |
| r5666 | r5667 | |
|---|---|---|
| 232 | 232 | return flags; |
| 233 | 233 | } |
| 234 | 234 | |
| 235 | unsigned dasmr3k(char *buffer, unsigned pc, UINT32 op) | |
| 235 | static unsigned dasmr3k(char *buffer, unsigned pc, UINT32 op) | |
| 236 | 236 | { |
| 237 | 237 | int rs = (op >> 21) & 31; |
| 238 | 238 | int rt = (op >> 16) & 31; |
| r5666 | r5667 | |
|---|---|---|
| 412 | 412 | LOGICAL INSTRUCTIONS |
| 413 | 413 | ***************************************************************************/ |
| 414 | 414 | |
| 415 | static void and(z8_state *cpustate, UINT8 dst, UINT8 src) | |
| 415 | static void _and(z8_state *cpustate, UINT8 dst, UINT8 src) | |
| 416 | 416 | { |
| 417 | 417 | /* dst <- dst AND src */ |
| 418 | 418 | UINT8 data = register_read(cpustate, dst) & src; |
| r5666 | r5667 | |
| 423 | 423 | set_flag_v(0); |
| 424 | 424 | } |
| 425 | 425 | |
| 426 | INSTRUCTION( and_r1_r2 ) { mode_r1_r2(and) } | |
| 427 | INSTRUCTION( and_r1_Ir2 ) { mode_r1_Ir2(and) } | |
| 428 | INSTRUCTION( and_R2_R1 ) { mode_R2_R1(and) } | |
| 429 | INSTRUCTION( and_IR2_R1 ) { mode_IR2_R1(and) } | |
| 430 | INSTRUCTION( and_R1_IM ) { mode_R1_IM(and) } | |
| 431 | INSTRUCTION( and_IR1_IM ) { mode_IR1_IM(and) } | |
| 426 | INSTRUCTION( and_r1_r2 ) { mode_r1_r2(_and) } | |
| 427 | INSTRUCTION( and_r1_Ir2 ) { mode_r1_Ir2(_and) } | |
| 428 | INSTRUCTION( and_R2_R1 ) { mode_R2_R1(_and) } | |
| 429 | INSTRUCTION( and_IR2_R1 ) { mode_IR2_R1(_and) } | |
| 430 | INSTRUCTION( and_R1_IM ) { mode_R1_IM(_and) } | |
| 431 | INSTRUCTION( and_IR1_IM ) { mode_IR1_IM(_and) } | |
| 432 | 432 | |
| 433 | 433 | static void complement(z8_state *cpustate, UINT8 dst) |
| 434 | 434 | { |
| r5666 | r5667 | |
| 444 | 444 | INSTRUCTION( com_R1 ) { mode_R1(complement) } |
| 445 | 445 | INSTRUCTION( com_IR1 ) { mode_IR1(complement) } |
| 446 | 446 | |
| 447 | static void or(z8_state *cpustate, UINT8 dst, UINT8 src) | |
| 447 | static void _or(z8_state *cpustate, UINT8 dst, UINT8 src) | |
| 448 | 448 | { |
| 449 | 449 | /* dst <- dst OR src */ |
| 450 | 450 | UINT8 data = register_read(cpustate, dst) | src; |
| r5666 | r5667 | |
| 455 | 455 | set_flag_v(0); |
| 456 | 456 | } |
| 457 | 457 | |
| 458 | INSTRUCTION( or_r1_r2 ) { mode_r1_r2(or) } | |
| 459 | INSTRUCTION( or_r1_Ir2 ) { mode_r1_Ir2(or) } | |
| 460 | INSTRUCTION( or_R2_R1 ) { mode_R2_R1(or) } | |
| 461 | INSTRUCTION( or_IR2_R1 ) { mode_IR2_R1(or) } | |
| 462 | INSTRUCTION( or_R1_IM ) { mode_R1_IM(or) } | |
| 463 | INSTRUCTION( or_IR1_IM ) { mode_IR1_IM(or) } | |
| 458 | INSTRUCTION( or_r1_r2 ) { mode_r1_r2(_or) } | |
| 459 | INSTRUCTION( or_r1_Ir2 ) { mode_r1_Ir2(_or) } | |
| 460 | INSTRUCTION( or_R2_R1 ) { mode_R2_R1(_or) } | |
| 461 | INSTRUCTION( or_IR2_R1 ) { mode_IR2_R1(_or) } | |
| 462 | INSTRUCTION( or_R1_IM ) { mode_R1_IM(_or) } | |
| 463 | INSTRUCTION( or_IR1_IM ) { mode_IR1_IM(_or) } | |
| 464 | 464 | |
| 465 | static void xor(z8_state *cpustate, UINT8 dst, UINT8 src) | |
| 465 | static void _xor(z8_state *cpustate, UINT8 dst, UINT8 src) | |
| 466 | 466 | { |
| 467 | 467 | /* dst <- dst XOR src */ |
| 468 | 468 | UINT8 data = register_read(cpustate, dst) ^ src; |
| r5666 | r5667 | |
| 473 | 473 | set_flag_v(0); |
| 474 | 474 | } |
| 475 | 475 | |
| 476 | INSTRUCTION( xor_r1_r2 ) { mode_r1_r2(xor) } | |
| 477 | INSTRUCTION( xor_r1_Ir2 ) { mode_r1_Ir2(xor) } | |
| 478 | INSTRUCTION( xor_R2_R1 ) { mode_R2_R1(xor) } | |
| 479 | INSTRUCTION( xor_IR2_R1 ) { mode_IR2_R1(xor) } | |
| 480 | INSTRUCTION( xor_R1_IM ) { mode_R1_IM(xor) } | |
| 481 | INSTRUCTION( xor_IR1_IM ) { mode_IR1_IM(xor) } | |
| 476 | INSTRUCTION( xor_r1_r2 ) { mode_r1_r2(_xor) } | |
| 477 | INSTRUCTION( xor_r1_Ir2 ) { mode_r1_Ir2(_xor) } | |
| 478 | INSTRUCTION( xor_R2_R1 ) { mode_R2_R1(_xor) } | |
| 479 | INSTRUCTION( xor_IR2_R1 ) { mode_IR2_R1(_xor) } | |
| 480 | INSTRUCTION( xor_R1_IM ) { mode_R1_IM(_xor) } | |
| 481 | INSTRUCTION( xor_IR1_IM ) { mode_IR1_IM(_xor) } | |
| 482 | 482 | |
| 483 | 483 | /*************************************************************************** |
| 484 | 484 | PROGRAM CONTROL INSTRUCTIONS |
| r5666 | r5667 | |
|---|---|---|
| 6 | 6 | CONSTANTS |
| 7 | 7 | ***************************************************************************/ |
| 8 | 8 | |
| 9 | static const char* REGISTER_NAME[256] = | |
| 9 | static const char *const REGISTER_NAME[256] = | |
| 10 | 10 | { |
| 11 | 11 | "P0", "P1", "P2", "P3", "", "", "", "", "", "", "", "", "", "", "", "", |
| 12 | 12 | "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", "", |
| r5666 | r5667 | |
| 26 | 26 | "SIO", "TMR", "T1", "PRE1", "T0", "PRE0", "P2M", "P3M", "P01M", "IPR", "IRQ", "IMR", "FLAGS", "RP", "SPH", "SPL" |
| 27 | 27 | }; |
| 28 | 28 | |
| 29 | static const char* CONDITION_CODE[16] = | |
| 29 | static const char *const CONDITION_CODE[16] = | |
| 30 | 30 | { |
| 31 | 31 | "F", "LT", "LE", "ULE", "OV", "MI", "Z", "C", |
| 32 | 32 | "", "GE", "GT", "UGT", "NOV", "PL", "NZ", "NC" |
| r5666 | r5667 | |
|---|---|---|
| 38 | 38 | * the W register. * |
| 39 | 39 | * - 'tris' instruction no longer modifies Port-C on PIC models that * |
| 40 | 40 | * do not have Port-C implemented. * |
| 41 | * TLP (07-Sep-2009) Ver 1.14 * | |
| 42 | * - Edge sense control for the T0 count input was incorrectly reversed * | |
| 41 | 43 | * * |
| 42 | 44 | * * |
| 43 | 45 | * **** Notes: **** * |
| r5666 | r5667 | |
| 160 | 162 | |
| 161 | 163 | #define ADDR (cpustate->opcode.b.l & 0x1f) |
| 162 | 164 | |
| 163 | #define POSITIVE_EDGE_T0 (( (int)(T0_in - cpustate->old_T0) > 0) ? 1 : 0) | |
| 164 | #define NEGATIVE_EDGE_T0 (( (int)(cpustate->old_T0 - T0_in) > 0) ? 1 : 0) | |
| 165 | #define RISING_EDGE_T0 (( (int)(T0_in - cpustate->old_T0) > 0) ? 1 : 0) | |
| 166 | #define FALLING_EDGE_T0 (( (int)(T0_in - cpustate->old_T0) < 0) ? 1 : 0) | |
| 165 | 167 | |
| 166 | 168 | |
| 167 | 169 | /******** The following is the Status Flag register definition. *********/ |
| r5666 | r5667 | |
| 882 | 884 | static CPU_EXECUTE( pic16c5x ) |
| 883 | 885 | { |
| 884 | 886 | pic16c5x_state *cpustate = get_safe_token(device); |
| 885 | | |
| 887 | UINT8 T0_in; | |
| 886 | 888 | |
| 887 | 889 | update_internalram_ptr(cpustate); |
| 888 | 890 | |
| r5666 | r5667 | |
| 919 | 921 | |
| 920 | 922 | if (T0CS) { /* Count mode */ |
| 921 | 923 | T0_in = S_T0_IN; |
| 922 | if (T0SE) { /* Count rising edge */ | |
| 923 | if (POSITIVE_EDGE_T0) { | |
| 924 | if (T0_in) T0_in = 1; | |
| 925 | if (T0SE) { /* Count falling edge T0 input */ | |
| 926 | if (FALLING_EDGE_T0) { | |
| 924 | 927 | pic16c5x_update_timer(cpustate, 1); |
| 925 | 928 | } |
| 926 | 929 | } |
| 927 | else { /* Count falling edge */ | |
| 928 | if (NEGATIVE_EDGE_T0) { | |
| 930 | else { /* Count rising edge T0 input */ | |
| 931 | if (RISING_EDGE_T0) { | |
| 929 | 932 | pic16c5x_update_timer(cpustate, 1); |
| 930 | 933 | } |
| 931 | 934 | } |
| r5666 | r5667 | |
| 1052 | 1055 | /* --- the following bits of info are returned as NULL-terminated strings --- */ |
| 1053 | 1056 | case DEVINFO_STR_NAME: strcpy(info->s, "PIC16C5x"); break; |
| 1054 | 1057 | case DEVINFO_STR_FAMILY: strcpy(info->s, "Microchip"); break; |
| 1055 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.1 | |
| 1058 | case DEVINFO_STR_VERSION: strcpy(info->s, "1.14"); break; | |
| 1056 | 1059 | case DEVINFO_STR_SOURCE_FILE: strcpy(info->s, __FILE__); break; |
| 1057 | 1060 | case DEVINFO_STR_CREDITS: strcpy(info->s, "Copyright Tony La Porta"); break; |
| 1058 | 1061 |
| r5666 | r5667 | |
|---|---|---|
| 21 | 21 | TX0_IO_COMPLETE /* hack, do not use directly, use tx0_pulse_io_complete instead */ |
| 22 | 22 | }; |
| 23 | 23 | |
| 24 | #define tx0_pulse_reset() cpu_set_reg(machine->cpu[0], TX0_RESET, 0) | |
| 25 | #define tx0_pulse_io_complete() cpu_set_reg(machine->cpu[0], TX0_IO_COMPLETE, 0) | |
| 24 | #define tx0_pulse_reset(cpudevice) cpu_set_reg(cpudevice, TX0_RESET, 0) | |
| 25 | #define tx0_pulse_io_complete(cpudevice) cpu_set_reg(cpudevice, TX0_IO_COMPLETE, 0) | |
| 26 | 26 | |
| 27 | 27 | typedef struct _tx0_reset_param_t tx0_reset_param_t; |
| 28 | 28 | struct _tx0_reset_param_t |
| r5666 | r5667 | |
|---|---|---|
| 1711 | 1711 | if (LOG_IOT_EXTRA) |
| 1712 | 1712 | { |
| 1713 | 1713 | if (op2 == 000) |
| 1714 | logerror("IOT sync instruction: mb=0%06o, pc=0%06o\n", (unsigned) mb, (unsigned) cpu_get_reg(device | |
| 1714 | logerror("IOT sync instruction: mb=0%06o, pc=0%06o\n", (unsigned) mb, (unsigned) cpu_get_reg(device | |
| 1715 | 1715 | } |
| 1716 | 1716 | if (LOG) |
| 1717 | 1717 | { |
| r5666 | r5667 | |
|---|---|---|
| 20 | 20 | PDP1_IO_COMPLETE /* hack, do not use directly, use pdp1_pulse_iot_done instead */ |
| 21 | 21 | }; |
| 22 | 22 | |
| 23 | #define pdp1_pulse_start_clear() cpu_set_reg(machine->cpu[0], PDP1_START_CLEAR, 0) | |
| 24 | #define pdp1_pulse_iot_done() cpu_set_reg(machine->cpu[0], PDP1_IO_COMPLETE, 0) | |
| 23 | #define pdp1_pulse_start_clear(cpudevice) cpu_set_reg(cpudevice, PDP1_START_CLEAR, 0) | |
| 24 | #define pdp1_pulse_iot_done(cpudevice) cpu_set_reg(cpudevice, PDP1_IO_COMPLETE, 0) | |
| 25 | 25 | |
| 26 | 26 | typedef void (*pdp1_extern_iot_func)(const device_config *device, int op2, int nac, int mb, int *io, int ac); |
| 27 | 27 | typedef void (*pdp1_read_binary_word_func)(const device_config *device); |
| r5666 | r5667 | |
|---|---|---|
| 372 | 372 | return buf; |
| 373 | 373 | } |
| 374 | 374 | |
| 375 | unsigned dasm_mb86233(char *buffer, UINT32 opcode ) | |
| 375 | static unsigned dasm_mb86233(char *buffer, UINT32 opcode ) | |
| 376 | 376 | { |
| 377 | 377 | char *p = buffer; |
| 378 | 378 | UINT32 grp = ( opcode >> 26 ) & 0x3f; |
| r5666 | r5667 | |
|---|---|---|
| 1228 | 1228 | if (!ignorepause && exclusive_input_pressed(menu, IPT_UI_PAUSE, 0)) |
| 1229 | 1229 | mame_pause(menu->machine, !mame_is_paused(menu->machine)); |
| 1230 | 1230 | |
| 1231 | /* handle a toggle cheats request */ | |
| 1232 | if (exclusive_input_pressed(menu, IPT_UI_TOGGLE_CHEAT, 0)) | |
| 1233 | cheat_set_global_enable(menu->machine, !cheat_get_global_enable(menu->machine)); | |
| 1234 | ||
| 1231 | 1235 | /* see if any other UI keys are pressed */ |
| 1232 | 1236 | if (menu->event.iptkey == IPT_INVALID) |
| 1233 | 1237 | for (code = __ipt_ui_start; code <= __ipt_ui_end; code++) |
| r5666 | r5667 | |
|---|---|---|
| 921 | 921 | spacerw->direct.byteend = 0; |
| 922 | 922 | spacerw->direct.bytestart = 1; |
| 923 | 923 | if (!spacerw->debugger_access) |
| 924 | logerror("Device '%s': warning - attempt to direct-map address % | |
| 924 | logerror("Device '%s': warning - attempt to direct-map address %s | |
| 925 | 925 | return FALSE; |
| 926 | 926 | } |
| 927 | 927 | |
| r5666 | r5667 | |
| 3211 | 3211 | |
| 3212 | 3212 | static READ8_HANDLER( unmap_read8 ) |
| 3213 | 3213 | { |
| 3214 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory byte read from % | |
| 3214 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory byte read from %s | |
| 3215 | 3215 | return space->unmap; |
| 3216 | 3216 | } |
| 3217 | 3217 | static READ16_HANDLER( unmap_read16 ) |
| 3218 | 3218 | { |
| 3219 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory word read from % | |
| 3219 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory word read from %s | |
| 3220 | 3220 | return space->unmap; |
| 3221 | 3221 | } |
| 3222 | 3222 | static READ32_HANDLER( unmap_read32 ) |
| 3223 | 3223 | { |
| 3224 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory dword read from % | |
| 3224 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory dword read from %s | |
| 3225 | 3225 | return space->unmap; |
| 3226 | 3226 | } |
| 3227 | 3227 | static READ64_HANDLER( unmap_read64 ) |
| 3228 | 3228 | { |
| 3229 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory qword read from % | |
| 3229 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory qword read from %s | |
| 3230 | 3230 | return space->unmap; |
| 3231 | 3231 | } |
| 3232 | 3232 | |
| 3233 | 3233 | static WRITE8_HANDLER( unmap_write8 ) |
| 3234 | 3234 | { |
| 3235 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory byte write to % | |
| 3235 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory byte write to %s | |
| 3236 | 3236 | } |
| 3237 | 3237 | static WRITE16_HANDLER( unmap_write16 ) |
| 3238 | 3238 | { |
| 3239 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory word write to % | |
| 3239 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory word write to %s | |
| 3240 | 3240 | } |
| 3241 | 3241 | static WRITE32_HANDLER( unmap_write32 ) |
| 3242 | 3242 | { |
| 3243 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory dword write to % | |
| 3243 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory dword write to %s | |
| 3244 | 3244 | } |
| 3245 | 3245 | static WRITE64_HANDLER( unmap_write64 ) |
| 3246 | 3246 | { |
| 3247 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory qword write to % | |
| 3247 | if (space->log_unmap && !space->debugger_access) logerror("%s: unmapped %s memory qword write to %s | |
| 3248 | 3248 | } |
| 3249 | 3249 | |
| 3250 | 3250 |
| r5666 | r5667 | |
|---|---|---|
| 1699 | 1699 | mame_printf_error("Invalid %s value %s; reverting to keyboard\n", option, stemp); |
| 1700 | 1700 | |
| 1701 | 1701 | /* only scan the list if we haven't already enabled this class of control */ |
| 1702 | if (portlist) | |
| 1703 | { | |
| 1704 | if (!input_device_class_enabled(portlist->machine, autoenable)) | |
| 1705 | for (port = portlist; port != NULL; port = port->next) | |
| 1706 | for (field = port->fieldlist; field != NULL; field = field->next) | |
| 1702 | if (portlist != NULL && !input_device_class_enabled(portlist->machine, autoenable)) | |
| 1703 | for (port = portlist; port != NULL; port = port->next) | |
| 1704 | for (field = port->fieldlist; field != NULL; field = field->next) | |
| 1707 | 1705 | |
| 1708 | /* if this port type is in use, apply the autoselect criteria */ | |
| 1709 | if ((type1 != 0 && field->type == type1) || | |
| 1710 | (type2 != 0 && field->type == type2) || | |
| 1711 | (type3 != 0 && field->type == type3)) | |
| 1712 | { | |
| 1713 | mame_printf_verbose("Input: Autoenabling %s due to presence of a %s\n", autostring, ananame); | |
| 1714 | input_device_class_enable(portlist->machine, autoenable, TRUE); | |
| 1715 | break; | |
| 1716 | } | |
| 1717 | } | |
| 1706 | /* if this port type is in use, apply the autoselect criteria */ | |
| 1707 | if ((type1 != 0 && field->type == type1) || | |
| 1708 | (type2 != 0 && field->type == type2) || | |
| 1709 | (type3 != 0 && field->type == type3)) | |
| 1710 | { | |
| 1711 | mame_printf_verbose("Input: Autoenabling %s due to presence of a %s\n", autostring, ananame); | |
| 1712 | input_device_class_enable(portlist->machine, autoenable, TRUE); | |
| 1713 | break; | |
| 1714 | } | |
| 1718 | 1715 | } |
| 1719 | 1716 | |
| 1720 | 1717 |
| r5666 | r5667 | |
|---|---|---|
| 21 | 21 | - calls mame_validitychecks() [validity.c] to perform validity checks on all compiled drivers |
| 22 | 22 | - calls setjmp to prepare for deep error handling |
| 23 | 23 | - begins resource tracking (level 1) |
| 24 | - calls create_machine [mame.c] to initialize the | |
| 24 | - calls create_machine [mame.c] to initialize the running_machine structure | |
| 25 | 25 | - calls init_machine() [mame.c] |
| 26 | 26 | |
| 27 | 27 | init_machine() [mame.c] |
| r5666 | r5667 | |
| 96 | 96 | |
| 97 | 97 | |
| 98 | 98 | /*************************************************************************** |
| 99 | CONSTANTS | |
| 100 | ***************************************************************************/ | |
| 101 | ||
| 102 | #define MAX_MEMORY_REGIONS 32 | |
| 103 | ||
| 104 | ||
| 105 | ||
| 106 | /*************************************************************************** | |
| 107 | 99 | TYPE DEFINITIONS |
| 108 | 100 | ***************************************************************************/ |
| 109 | 101 | |
| r5666 | r5667 | |
| 180 | 172 | ***************************************************************************/ |
| 181 | 173 | |
| 182 | 174 | /* the active machine */ |
| 183 | static running_machine * | |
| 175 | static running_machine *global_machine; | |
| 184 | 176 | |
| 185 | 177 | /* the current options */ |
| 186 | 178 | static core_options *mame_opts; |
| r5666 | r5667 | |
| 240 | 232 | { |
| 241 | 233 | const device_config *cpu; |
| 242 | 234 | |
| 243 | for (cpu = machine->cpu | |
| 235 | for (cpu = machine->firstcpu | |
| 244 | 236 | cpu_eat_cycles(cpu, 1000000000); |
| 245 | 237 | } |
| 246 | 238 | |
| r5666 | r5667 | |
| 303 | 295 | mame->current_phase = MAME_PHASE_PREINIT; |
| 304 | 296 | |
| 305 | 297 | /* looooong term: remove this */ |
| 306 | | |
| 298 | global_machine = machine; | |
| 307 | 299 | |
| 308 | 300 | init_resource_tracking(); |
| 309 | 301 | |
| r5666 | r5667 | |
| 551 | 543 | } |
| 552 | 544 | |
| 553 | 545 | |
| 546 | /*------------------------------------------------- | |
| 547 | mame_is_valid_machine - return true if the | |
| 548 | given machine is valid | |
| 549 | -------------------------------------------------*/ | |
| 554 | 550 | |
| 551 | int mame_is_valid_machine(running_machine *machine) | |
| 552 | { | |
| 553 | return (machine != NULL && machine == global_machine); | |
| 554 | } | |
| 555 | ||
| 556 | ||
| 557 | ||
| 555 | 558 | /*************************************************************************** |
| 556 | 559 | GLOBAL SYSTEM STATES |
| 557 | 560 | ***************************************************************************/ |
| r5666 | r5667 | |
| 1145 | 1148 | |
| 1146 | 1149 | void CLIB_DECL fatalerror(const char *text, ...) |
| 1147 | 1150 | { |
| 1148 | extern running_machine *Machine; | |
| 1149 | running_machine *machine = Machine; | |
| 1151 | running_machine *machine = global_machine; | |
| 1150 | 1152 | va_list arg; |
| 1151 | 1153 | |
| 1152 | 1154 | /* dump to the buffer; assume no one writes >2k lines this way */ |
| r5666 | r5667 | |
| 1204 | 1206 | |
| 1205 | 1207 | void CLIB_DECL logerror(const char *format, ...) |
| 1206 | 1208 | { |
| 1207 | extern running_machine *Machine; | |
| 1208 | running_machine *machine = Machine; | |
| 1209 | running_machine *machine = global_machine; | |
| 1209 | 1210 | |
| 1210 | 1211 | /* currently, we need a machine to do this */ |
| 1211 | 1212 | if (machine != NULL) |
| r5666 | r5667 | |
| 1390 | 1391 | static running_machine *create_machine(const game_driver *driver) |
| 1391 | 1392 | { |
| 1392 | 1393 | running_machine *machine; |
| 1393 | int cpunum; | |
| 1394 | 1394 | |
| 1395 | 1395 | /* allocate memory for the machine */ |
| 1396 | 1396 | machine = (running_machine *)malloc(sizeof(*machine)); |
| r5666 | r5667 | |
| 1419 | 1419 | } |
| 1420 | 1420 | |
| 1421 | 1421 | /* find devices */ |
| 1422 | machine->cpu[0] = cpu_first(machine->config); | |
| 1423 | for (cpunum = 1; cpunum < ARRAY_LENGTH(machine->cpu) && machine->cpu[cpunum - 1] != NULL; cpunum++) | |
| 1424 | machine->cpu[cpunum] = machine->cpu[cpunum - 1]->typenext; | |
| 1422 | machine->firstcpu = cpu_first(machine->config); | |
| 1425 | 1423 | machine->primary_screen = video_screen_first(machine->config); |
| 1426 | 1424 | |
| 1427 | 1425 | /* attach this machine to all the devices in the configuration */ |
| r5666 | r5667 | |
| 1452 | 1450 | |
| 1453 | 1451 | static void destroy_machine(running_machine *machine) |
| 1454 | 1452 | { |
| 1455 | assert(machine == | |
| 1453 | assert(machine == global_machine); | |
| 1456 | 1454 | |
| 1457 | 1455 | if (machine->driver_data != NULL) |
| 1458 | 1456 | free(machine->driver_data); |
| r5666 | r5667 | |
| 1463 | 1461 | if (machine->basename != NULL) |
| 1464 | 1462 | free((void *)machine->basename); |
| 1465 | 1463 | free(machine); |
| 1466 | | |
| 1464 | global_machine = NULL; | |
| 1467 | 1465 | } |
| 1468 | 1466 | |
| 1469 | 1467 |
| r5666 | r5667 | |
|---|---|---|
| 956 | 956 | } |
| 957 | 957 | } |
| 958 | 958 | |
| 959 |
| r5666 | r5667 | |
|---|---|---|
| 14 | 14 | #define RES_2_PARALLEL(r1, r2) (((r1) * (r2)) / ((r1) + (r2))) |
| 15 | 15 | #define RES_3_PARALLEL(r1, r2, r3) (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3))) |
| 16 | 16 | #define RES_4_PARALLEL(r1, r2, r3, r4) (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3) + 1.0 / (r4))) |
| 17 | #define RES_5_PARALLEL(r1, r2, r3, r4, r5) (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3) + 1.0 / (r4) + 1.0 / (r5))) | |
| 18 | #define RES_6_PARALLEL(r1, r2, r3, r4, r5, r6) (1.0 / (1.0 / (r1) + 1.0 / (r2) + 1.0 / (r3) + 1.0 / (r4) + 1.0 / (r5) + 1.0 / (r6))) | |
| 17 | 19 | |
| 18 | 20 | #define RES_2_SERIAL(r1,r2) ((r1)+(r2)) |
| 19 | 21 |
| r5666 | r5667 | |
|---|---|---|
| 379 | 379 | |
| 380 | 380 | // send the byte unless we're in loopback mode; |
| 381 | 381 | // in loopback mode do NOT 'actually' send the byte: the TXn pin is held high when loopback mode is on. |
| 382 | if ((duart68681->duart_config->tx_callback) && ((duart68681->channel[ch].MR2&0xC0) != 0x80)) | |
| 382 | if ((duart68681->duart_config->tx_callback) && ((duart68681->channel[ch].MR2&0xC0) != 0x80)) | |
| 383 | 383 | duart68681->duart_config->tx_callback(device, ch, duart68681->channel[ch].tx_data); |
| 384 | 384 | |
| 385 | 385 | duart68681->channel[ch].tx_ready = 1; |
| r5666 | r5667 | |
|---|---|---|
| 262 | 262 | |
| 263 | 263 | /* Default clock is from CPU1 */ |
| 264 | 264 | if (device->clock == 0) |
| 265 | device_set_clock(device, device->machine->cpu | |
| 265 | device_set_clock(device, device->machine->firstcpu | |
| 266 | 266 | } |
| 267 | 267 | |
| 268 | 268 |
| r5666 | r5667 | |
|---|---|---|
| 40 | 40 | |
| 41 | 41 | |
| 42 | 42 | |
| 43 | ||
| 44 | 43 | /*************************************************************************** |
| 45 | 44 | FUNCTION PROTOTYPES |
| 46 | 45 | ***************************************************************************/ |
| r5666 | r5667 | |
| 52 | 51 | |
| 53 | 52 | |
| 54 | 53 | /*************************************************************************** |
| 54 | INLINE FUNCTIONS | |
| 55 | ***************************************************************************/ | |
| 56 | ||
| 57 | /*------------------------------------------------- | |
| 58 | interrupt_enabled - return true if interrupts | |
| 59 | are enabled for the given CPU | |
| 60 | -------------------------------------------------*/ | |
| 61 | ||
| 62 | INLINE int interrupt_enabled(const device_config *device) | |
| 63 | { | |
| 64 | int cpunum = cpu_get_index(device); | |
| 65 | return (cpunum >= ARRAY_LENGTH(interrupt_enable) || interrupt_enable[cpunum]); | |
| 66 | } | |
| 67 | ||
| 68 | ||
| 69 | ||
| 70 | /*************************************************************************** | |
| 55 | 71 | INITIALIZATION |
| 56 | 72 | ***************************************************************************/ |
| 57 | 73 | |
| r5666 | r5667 | |
| 128 | 144 | return; |
| 129 | 145 | |
| 130 | 146 | /* might not have any data */ |
| 131 | if ( | |
| 147 | if ( | |
| 132 | 148 | return; |
| 133 | 149 | |
| 134 | 150 | /* iterate over coins nodes */ |
| r5666 | r5667 | |
| 141 | 157 | |
| 142 | 158 | /* get the single tickets node */ |
| 143 | 159 | ticketnode = xml_get_sibling(parentnode->child, "tickets"); |
| 144 | if (ticketnode) | |
| 160 | if (ticketnode != NULL) | |
| 145 | 161 | dispensed_tickets = xml_get_attribute_int(ticketnode, "number", 0); |
| 146 | 162 | } |
| 147 | 163 | |
| r5666 | r5667 | |
| 164 | 180 | if (coin_count[i] != 0) |
| 165 | 181 | { |
| 166 | 182 | xml_data_node *coinnode = xml_add_child(parentnode, "coins", NULL); |
| 167 | if (coinnode) | |
| 183 | if (coinnode != NULL) | |
| 168 | 184 | { |
| 169 | 185 | xml_set_attribute_int(coinnode, "index", i); |
| 170 | 186 | xml_set_attribute_int(coinnode, "number", coin_count[i]); |
| r5666 | r5667 | |
| 175 | 191 | if (dispensed_tickets != 0) |
| 176 | 192 | { |
| 177 | 193 | xml_data_node *tickets = xml_add_child(parentnode, "tickets", NULL); |
| 178 | if (tickets) | |
| 194 | if (tickets != NULL) | |
| 179 | 195 | xml_set_attribute_int(tickets, "number", dispensed_tickets); |
| 180 | 196 | } |
| 181 | 197 | } |
| r5666 | r5667 | |
| 185 | 201 | coin_counter_w - sets input for coin counter |
| 186 | 202 | -------------------------------------------------*/ |
| 187 | 203 | |
| 188 | void coin_counter_w(int num,int on) | |
| 204 | void coin_counter_w(int num, int on) | |
| 189 | 205 | { |
| 190 | if (num >= COIN_COUNTERS) return; | |
| 206 | if (num >= COIN_COUNTERS) | |
| 207 | return; | |
| 208 | ||
| 191 | 209 | /* Count it only if the data has changed from 0 to non-zero */ |
| 192 | 210 | if (on && (lastcoin[num] == 0)) |
| 193 | { | |
| 194 | 211 | coin_count[num]++; |
| 195 | } | |
| 196 | 212 | lastcoin[num] = on; |
| 197 | 213 | } |
| 198 | 214 | |
| r5666 | r5667 | |
| 203 | 219 | |
| 204 | 220 | void coin_lockout_w(int num,int on) |
| 205 | 221 | { |
| 206 | if (num >= COIN_COUNTERS) return; | |
| 207 | ||
| 222 | if (num >= COIN_COUNTERS) | |
| 223 | return; | |
| 208 | 224 | coinlockedout[num] = on; |
| 209 | 225 | } |
| 210 | 226 | |
| r5666 | r5667 | |
| 219 | 235 | int i; |
| 220 | 236 | |
| 221 | 237 | for (i = 0; i < COIN_COUNTERS; i++) |
| 222 | { | |
| 223 | coin_lockout_w(i,on); | |
| 224 | } | |
| 238 | coin_lockout_w(i, on); | |
| 225 | 239 | } |
| 226 | 240 | |
| 227 | 241 | |
| r5666 | r5667 | |
| 237 | 251 | |
| 238 | 252 | INLINE void *nvram_select(void) |
| 239 | 253 | { |
| 240 | if (generic_nvram) | |
| 254 | if (generic_nvram != NULL) | |
| 241 | 255 | return generic_nvram; |
| 242 | if (generic_nvram16) | |
| 256 | if (generic_nvram16 != NULL) | |
| 243 | 257 | return generic_nvram16; |
| 244 | if (generic_nvram32) | |
| 258 | if (generic_nvram32 != NULL) | |
| 245 | 259 | return generic_nvram32; |
| 246 | if (generic_nvram64) | |
| 260 | if (generic_nvram64 != NULL) | |
| 247 | 261 | return generic_nvram64; |
| 248 | 262 | fatalerror("generic nvram handler called without nvram in the memory map"); |
| 249 | 263 | return 0; |
| r5666 | r5667 | |
| 277 | 291 | mame_file *nvram_file = NULL; |
| 278 | 292 | const device_config *device; |
| 279 | 293 | |
| 294 | /* read data from general NVRAM handler first */ | |
| 280 | 295 | if (machine->config->nvram_handler != NULL) |
| 281 | 296 | { |
| 282 | 297 | nvram_file = nvram_fopen(machine, OPEN_FLAG_READ); |
| 283 | 298 | (*machine->config->nvram_handler)(machine, nvram_file, 0); |
| 284 | 299 | } |
| 285 | 300 | |
| 301 | /* find all devices with NVRAM handlers, and read from them next */ | |
| 286 | 302 | for (device = machine->config->devicelist; device != NULL; device = device->next) |
| 287 | 303 | { |
| 288 | 304 | device_nvram_func nvram = (device_nvram_func)device_get_info_fct(device, DEVINFO_FCT_NVRAM); |
| r5666 | r5667 | |
| 308 | 324 | mame_file *nvram_file = NULL; |
| 309 | 325 | const device_config *device; |
| 310 | 326 | |
| 327 | /* write data from general NVRAM handler first */ | |
| 311 | 328 | if (machine->config->nvram_handler != NULL) |
| 312 | 329 | { |
| 313 | 330 | nvram_file = nvram_fopen(machine, OPEN_FLAG_WRITE | OPEN_FLAG_CREATE | OPEN_FLAG_CREATE_PATHS); |
| 314 | 331 | (*machine->config->nvram_handler)(machine, nvram_file, 1); |
| 315 | 332 | } |
| 316 | 333 | |
| 334 | /* find all devices with NVRAM handlers, and write them next */ | |
| 317 | 335 | for (device = machine->config->devicelist; device != NULL; device = device->next) |
| 318 | 336 | { |
| 319 | 337 | device_nvram_func nvram = (device_nvram_func)device_get_info_fct(device, DEVINFO_FCT_NVRAM); |
| r5666 | r5667 | |
| 568 | 586 | int cpunum; |
| 569 | 587 | |
| 570 | 588 | /* on a reset, enable all interrupts */ |
| 571 | for (cpunum = 0; cpunum < ARRAY_LENGTH( | |
| 589 | for (cpunum = 0; cpunum < ARRAY_LENGTH( | |
| 572 | 590 | interrupt_enable[cpunum] = 1; |
| 573 | 591 | } |
| 574 | 592 | |
| r5666 | r5667 | |
| 645 | 663 | assert_always(device != NULL, "cpu_interrupt_enable() called for invalid cpu!"); |
| 646 | 664 | |
| 647 | 665 | /* set the new state */ |
| 648 | interrupt_enable[cpunum] = enabled; | |
| 666 | if (cpunum < ARRAY_LENGTH(interrupt_enable)) | |
| 667 | interrupt_enable[cpunum] = enabled; | |
| 649 | 668 | |
| 650 | 669 | /* make sure there are no queued interrupts */ |
| 651 | 670 | if (enabled == 0) |
| r5666 | r5667 | |
| 671 | 690 | |
| 672 | 691 | READ8_HANDLER( interrupt_enable_r ) |
| 673 | 692 | { |
| 674 | return interrupt_enable | |
| 693 | return interrupt_enable | |
| 675 | 694 | } |
| 676 | 695 | |
| 677 | 696 | |
| r5666 | r5667 | |
| 681 | 700 | ***************************************************************************/ |
| 682 | 701 | |
| 683 | 702 | /*------------------------------------------------- |
| 684 | irqn_line_set - set the given IRQ line to the | |
| 685 | specified state on the active CPU | |
| 686 | -------------------------------------------------*/ | |
| 687 | ||
| 688 | INLINE void irqn_line_set(const device_config *device, int line, int state) | |
| 689 | { | |
| 690 | if (interrupt_enable[cpu_get_index(device)]) | |
| 691 | cpu_set_input_line(device, line, state); | |
| 692 | } | |
| 693 | ||
| 694 | ||
| 695 | /*------------------------------------------------- | |
| 696 | 703 | NMI callbacks |
| 697 | 704 | -------------------------------------------------*/ |
| 698 | 705 | |
| 699 | INTERRUPT_GEN( nmi_line_pulse ) { irqn_line_set(device, INPUT_LINE_NMI, PULSE_LINE); } | |
| 700 | INTERRUPT_GEN( nmi_line_assert ) { irqn_line_set(device, INPUT_LINE_NMI, ASSERT_LINE); } | |
| 706 | INTERRUPT_GEN( nmi_line_pulse ) { if (interrupt_enabled(device)) cpu_set_input_line(device, INPUT_LINE_NMI, PULSE_LINE); } | |
| 707 | INTERRUPT_GEN( nmi_line_assert ) { if (interrupt_enabled(device)) cpu_set_input_line(device, INPUT_LINE_NMI, ASSERT_LINE); } | |
| 701 | 708 | |
| 702 | 709 | |
| 703 | 710 | /*------------------------------------------------- |
| 704 | 711 | IRQn callbacks |
| 705 | 712 | -------------------------------------------------*/ |
| 706 | 713 | |
| 707 | INTERRUPT_GEN( irq0_line_hold ) { irqn_line_set(device, 0, HOLD_LINE); } | |
| 708 | INTERRUPT_GEN( irq0_line_pulse ) { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 0); } | |
| 709 | INTERRUPT_GEN( irq0_line_assert ) { irqn_line_set(device, 0, ASSERT_LINE); } | |
| 714 | INTERRUPT_GEN( irq0_line_hold ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 0, HOLD_LINE); } | |
| 715 | INTERRUPT_GEN( irq0_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 0); } | |
| 716 | INTERRUPT_GEN( irq0_line_assert ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 0, ASSERT_LINE); } | |
| 710 | 717 | |
| 711 | INTERRUPT_GEN( irq1_line_hold ) { irqn_line_set(device, 1, HOLD_LINE); } | |
| 712 | INTERRUPT_GEN( irq1_line_pulse ) { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 1); } | |
| 713 | INTERRUPT_GEN( irq1_line_assert ) { irqn_line_set(device, 1, ASSERT_LINE); } | |
| 718 | INTERRUPT_GEN( irq1_line_hold ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 1, HOLD_LINE); } | |
| 719 | INTERRUPT_GEN( irq1_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 1); } | |
| 720 | INTERRUPT_GEN( irq1_line_assert ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 1, ASSERT_LINE); } | |
| 714 | 721 | |
| 715 | INTERRUPT_GEN( irq2_line_hold ) { irqn_line_set(device, 2, HOLD_LINE); } | |
| 716 | INTERRUPT_GEN( irq2_line_pulse ) { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 2); } | |
| 717 | INTERRUPT_GEN( irq2_line_assert ) { irqn_line_set(device, 2, ASSERT_LINE); } | |
| 722 | INTERRUPT_GEN( irq2_line_hold ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 2, HOLD_LINE); } | |
| 723 | INTERRUPT_GEN( irq2_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 2); } | |
| 724 | INTERRUPT_GEN( irq2_line_assert ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 2, ASSERT_LINE); } | |
| 718 | 725 | |
| 719 | INTERRUPT_GEN( irq3_line_hold ) { irqn_line_set(device, 3, HOLD_LINE); } | |
| 720 | INTERRUPT_GEN( irq3_line_pulse ) { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 3); } | |
| 721 | INTERRUPT_GEN( irq3_line_assert ) { irqn_line_set(device, 3, ASSERT_LINE); } | |
| 726 | INTERRUPT_GEN( irq3_line_hold ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 3, HOLD_LINE); } | |
| 727 | INTERRUPT_GEN( irq3_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 3); } | |
| 728 | INTERRUPT_GEN( irq3_line_assert ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 3, ASSERT_LINE); } | |
| 722 | 729 | |
| 723 | INTERRUPT_GEN( irq4_line_hold ) { irqn_line_set(device, 4, HOLD_LINE); } | |
| 724 | INTERRUPT_GEN( irq4_line_pulse ) { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 4); } | |
| 725 | INTERRUPT_GEN( irq4_line_assert ) { irqn_line_set(device, 4, ASSERT_LINE); } | |
| 730 | INTERRUPT_GEN( irq4_line_hold ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 4, HOLD_LINE); } | |
| 731 | INTERRUPT_GEN( irq4_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 4); } | |
| 732 | INTERRUPT_GEN( irq4_line_assert ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 4, ASSERT_LINE); } | |
| 726 | 733 | |
| 727 | INTERRUPT_GEN( irq5_line_hold ) { irqn_line_set(device, 5, HOLD_LINE); } | |
| 728 | INTERRUPT_GEN( irq5_line_pulse ) { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 5); } | |
| 729 | INTERRUPT_GEN( irq5_line_assert ) { irqn_line_set(device, 5, ASSERT_LINE); } | |
| 734 | INTERRUPT_GEN( irq5_line_hold ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 5, HOLD_LINE); } | |
| 735 | INTERRUPT_GEN( irq5_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 5); } | |
| 736 | INTERRUPT_GEN( irq5_line_assert ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 5, ASSERT_LINE); } | |
| 730 | 737 | |
| 731 | INTERRUPT_GEN( irq6_line_hold ) { irqn_line_set(device, 6, HOLD_LINE); } | |
| 732 | INTERRUPT_GEN( irq6_line_pulse ) { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 6); } | |
| 733 | INTERRUPT_GEN( irq6_line_assert ) { irqn_line_set(device, 6, ASSERT_LINE); } | |
| 738 | INTERRUPT_GEN( irq6_line_hold ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 6, HOLD_LINE); } | |
| 739 | INTERRUPT_GEN( irq6_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 6); } | |
| 740 | INTERRUPT_GEN( irq6_line_assert ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 6, ASSERT_LINE); } | |
| 734 | 741 | |
| 735 | INTERRUPT_GEN( irq7_line_hold ) { irqn_line_set(device, 7, HOLD_LINE); } | |
| 736 | INTERRUPT_GEN( irq7_line_pulse ) { if (interrupt_enable[cpu_get_index(device)]) generic_pulse_irq_line(device, 7); } | |
| 737 | INTERRUPT_GEN( irq7_line_assert ) { irqn_line_set(device, 7, ASSERT_LINE); } | |
| 742 | INTERRUPT_GEN( irq7_line_hold ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 7, HOLD_LINE); } | |
| 743 | INTERRUPT_GEN( irq7_line_pulse ) { if (interrupt_enabled(device)) generic_pulse_irq_line(device, 7); } | |
| 744 | INTERRUPT_GEN( irq7_line_assert ) { if (interrupt_enabled(device)) cpu_set_input_line(device, 7, ASSERT_LINE); } | |
| 738 | 745 | |
| 739 | 746 | |
| 740 | 747 | |
| r5666 | r5667 | |
| 747 | 754 | -------------------------------------------------*/ |
| 748 | 755 | |
| 749 | 756 | WRITE8_HANDLER( watchdog_reset_w ) { watchdog_reset(space->machine); } |
| 750 | READ8_HANDLER( watchdog_reset_r ) { watchdog_reset(space->machine); return | |
| 757 | READ8_HANDLER( watchdog_reset_r ) { watchdog_reset(space->machine); return space->unmap; } | |
| 751 | 758 | |
| 752 | 759 | |
| 753 | 760 | /*------------------------------------------------- |
| r5666 | r5667 | |
| 755 | 762 | -------------------------------------------------*/ |
| 756 | 763 | |
| 757 | 764 | WRITE16_HANDLER( watchdog_reset16_w ) { watchdog_reset(space->machine); } |
| 758 | READ16_HANDLER( watchdog_reset16_r ) { watchdog_reset(space->machine); return | |
| 765 | READ16_HANDLER( watchdog_reset16_r ) { watchdog_reset(space->machine); return space->unmap; } | |
| 759 | 766 | |
| 760 | 767 | |
| 761 | 768 | /*------------------------------------------------- |
| r5666 | r5667 | |
| 763 | 770 | -------------------------------------------------*/ |
| 764 | 771 | |
| 765 | 772 | WRITE32_HANDLER( watchdog_reset32_w ) { watchdog_reset(space->machine); } |
| 766 | READ32_HANDLER( watchdog_reset32_r ) { watchdog_reset(space->machine); return | |
| 773 | READ32_HANDLER( watchdog_reset32_r ) { watchdog_reset(space->machine); return space->unmap; } | |
| 767 | 774 | |
| 768 | 775 | |
| 769 | 776 |
| r5666 | r5667 | |
|---|---|---|
| 47 | 47 | tmp68301_irq_vector[level] = IVNR & 0x00e0; |
| 48 | 48 | tmp68301_irq_vector[level] += 4+i; |
| 49 | 49 | |
| 50 | cpu_set_input_line(machine->cpu | |
| 50 | cpu_set_input_line(machine->firstcpu | |
| 51 | 51 | } |
| 52 | 52 | |
| 53 | 53 | if (TCR & 0x0080) // N/1 |
| r5666 | r5667 | |
| 90 | 90 | { |
| 91 | 91 | int scale = (TCR & 0x3c00)>>10; // P4..1 |
| 92 | 92 | if (scale > 8) scale = 8; |
| 93 | duration = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(machine->cpu | |
| 93 | duration = attotime_mul(ATTOTIME_IN_HZ(cpu_get_clock(machine->firstcpu | |
| 94 | 94 | } |
| 95 | 95 | break; |
| 96 | 96 | } |
| r5666 | r5667 | |
| 115 | 115 | for (i = 0; i < 3; i++) |
| 116 | 116 | tmp68301_IE[i] = 0; |
| 117 | 117 | |
| 118 | cpu_set_irq_callback(machine->cpu | |
| 118 | cpu_set_irq_callback(machine->firstcpu | |
| 119 | 119 | } |
| 120 | 120 | |
| 121 | 121 | /* Update the IRQ state based on all possible causes */ |
| r5666 | r5667 | |
| 145 | 145 | |
| 146 | 146 | tmp68301_IE[i] = 0; // Interrupts are edge triggerred |
| 147 | 147 | |
| 148 | cpu_set_input_line(machine->cpu | |
| 148 | cpu_set_input_line(machine->firstcpu | |
| 149 | 149 | } |
| 150 | 150 | } |
| 151 | 151 | } |
| r5666 | r5667 | |
|---|---|---|
| 584 | 584 | * the bits low set in the command byte. The only pulse that has |
| 585 | 585 | * an effect currently is bit 0, which pulses the CPU's reset line |
| 586 | 586 | */ |
| 587 | cpu_set_input_line(space->machine->cpu | |
| 587 | cpu_set_input_line(space->machine->firstcpu | |
| 588 | 588 | at_8042_set_outport(space->machine, kbdc8042.outport | 0x02, 0); |
| 589 | 589 | break; |
| 590 | 590 | } |
| r5666 | r5667 | |
|---|---|---|
| 84 | 84 | if (latch8->has_read) |
| 85 | 85 | { |
| 86 | 86 | /* temporary hack until all relevant systems are devices */ |
| 87 | const address_space *space = cpu_get_address_space(device->machine->cpu | |
| 87 | const address_space *space = cpu_get_address_space(device->machine->firstcpu | |
| 88 | 88 | int i; |
| 89 | 89 | for (i=0; i<8; i++) |
| 90 | 90 | { |
| r5666 | r5667 | |
|---|---|---|
| 71 | 71 | |
| 72 | 72 | /* maxima */ |
| 73 | 73 | #define MAX_GFX_ELEMENTS 32 |
| 74 | #define MAX_MEMORY_REGIONS 32 | |
| 75 | 74 | |
| 76 | 75 | |
| 77 | 76 | /* MESS vs. MAME abstractions */ |
| r5666 | r5667 | |
| 152 | 151 | const input_port_config *portconfig; /* points to a list of input port configurations */ |
| 153 | 152 | |
| 154 | 153 | /* CPU information */ |
| 155 | const device_config * cpu | |
| 154 | const device_config * firstcpu | |
| 156 | 155 | |
| 157 | 156 | /* game-related information */ |
| 158 | 157 | const game_driver * gamedrv; /* points to the definition of the game machine */ |
| r5666 | r5667 | |
| 167 | 166 | const pen_t * pens; /* remapped palette pen numbers */ |
| 168 | 167 | struct _colortable_t * colortable; /* global colortable for remapping */ |
| 169 | 168 | pen_t * shadow_table; /* table for looking up a shadowed pen */ |
| 170 | bitmap_t *priority_bitmap; | |
| 169 | bitmap_t * priority_bitmap; | |
| 171 | 170 | |
| 172 | 171 | /* audio-related information */ |
| 173 | 172 | int sample_rate; /* the digital audio sample rate */ |
| r5666 | r5667 | |
| 270 | 269 | /* handle update tasks for a frame boundary */ |
| 271 | 270 | void mame_frame_update(running_machine *machine); |
| 272 | 271 | |
| 272 | /* return true if the given machine is valid */ | |
| 273 | int mame_is_valid_machine(running_machine *machine); | |
| 273 | 274 | |
| 274 | 275 | |
| 276 | ||
| 275 | 277 | /* ----- global system states ----- */ |
| 276 | 278 | |
| 277 | 279 | /* schedule an exit */ |
| r5666 | r5667 | |
|---|---|---|
| 422 | 422 | |
| 423 | 423 | /* if we have an executing CPU, output data */ |
| 424 | 424 | if (executingcpu != NULL) |
| 425 | sprintf(global->statebuf, "'%s' (%08X)", executingcpu->tag, cpu_get_pc(executingcpu)); | |
| 425 | { | |
| 426 | const address_space *space = cpu_get_address_space(executingcpu, ADDRESS_SPACE_PROGRAM); | |
| 427 | sprintf(global->statebuf, "'%s' (%s)", executingcpu->tag, core_i64_hex_format(cpu_get_pc(executingcpu), space->logaddrchars)); | |
| 428 | } | |
| 426 | 429 | else |
| 427 | 430 | strcpy(global->statebuf, "(no context)"); |
| 428 | 431 | |
| r5666 | r5667 | |
| 460 | 463 | header = cpu_get_class_header(device); |
| 461 | 464 | classdata = get_class_data(device); |
| 462 | 465 | |
| 463 | /* add ourself to the global array */ | |
| 464 | if (index < ARRAY_LENGTH(device->machine->cpu)) | |
| 465 | device->machine->cpu[index] = device; | |
| 466 | ||
| 467 | 466 | /* build the header */ |
| 468 | 467 | header->debug = NULL; |
| 469 | 468 | header->set_info = (cpu_set_info_func)device_get_info_fct(device, CPUINFO_FCT_SET_INFO); |
| r5666 | r5667 | |
| 1113 | 1112 | const device_config *cpu; |
| 1114 | 1113 | |
| 1115 | 1114 | /* look for suspended CPUs waiting for this trigger and unsuspend them */ |
| 1116 | for (cpu = machine->cpu | |
| 1115 | for (cpu = machine->firstcpu | |
| 1117 | 1116 | { |
| 1118 | 1117 | cpu_class_data *classdata = get_class_data(cpu); |
| 1119 | 1118 | |
| r5666 | r5667 | |
| 1306 | 1305 | |
| 1307 | 1306 | static void compute_perfect_interleave(running_machine *machine) |
| 1308 | 1307 | { |
| 1309 | if (machine->cpu[0] != NULL) | |
| 1308 | const device_config *firstcpu = machine->firstcpu; | |
| 1309 | if (firstcpu != NULL) | |
| 1310 | 1310 | { |
| 1311 | attoseconds_t smallest = get_minimum_quantum( | |
| 1311 | attoseconds_t smallest = get_minimum_quantum(f | |
| 1312 | 1312 | attoseconds_t perfect = ATTOSECONDS_PER_SECOND - 1; |
| 1313 | 1313 | const device_config *cpu; |
| 1314 | 1314 | |
| 1315 | 1315 | /* start with a huge time factor and find the 2nd smallest cycle time */ |
| 1316 | for (cpu = | |
| 1316 | for (cpu = | |
| 1317 | 1317 | { |
| 1318 | 1318 | attoseconds_t curquantum = get_minimum_quantum(cpu); |
| 1319 | 1319 | |
| r5666 | r5667 | |
| 1348 | 1348 | const device_config *cpu; |
| 1349 | 1349 | |
| 1350 | 1350 | /* find any CPUs that have this screen as their VBLANK interrupt source */ |
| 1351 | for (cpu = device->machine->cpu | |
| 1351 | for (cpu = device->machine->firstcpu | |
| 1352 | 1352 | { |
| 1353 | 1353 | const cpu_config *config = (const cpu_config *)cpu->inline_config; |
| 1354 | 1354 | cpu_class_data *classdata = get_class_data(cpu); |
| r5666 | r5667 | |
| 1616 | 1616 | *tailptr = NULL; |
| 1617 | 1617 | |
| 1618 | 1618 | /* first iterate over non-suspended CPUs */ |
| 1619 | for (curcpu = machine->cpu | |
| 1619 | for (curcpu = machine->firstcpu | |
| 1620 | 1620 | { |
| 1621 | 1621 | cpu_class_data *classdata = get_class_data(curcpu); |
| 1622 | 1622 | if (classdata->suspend == 0) |
| r5666 | r5667 | |
| 1628 | 1628 | } |
| 1629 | 1629 | |
| 1630 | 1630 | /* then add the suspended CPUs */ |
| 1631 | for (curcpu = machine->cpu | |
| 1631 | for (curcpu = machine->firstcpu | |
| 1632 | 1632 | { |
| 1633 | 1633 | cpu_class_data *classdata = get_class_data(curcpu); |
| 1634 | 1634 | if (classdata->suspend != 0) |
| r5666 | r5667 | |
|---|---|---|
| 217 | 217 | } |
| 218 | 218 | |
| 219 | 219 | |
| 220 | void register_for_save_states(tms5110_state *tms) | |
| 220 | static void register_for_save_states(tms5110_state *tms) | |
| 221 | 221 | { |
| 222 | 222 | state_save_register_device_item_array(tms->device, 0, tms->fifo); |
| 223 | 223 | state_save_register_device_item(tms->device, 0, tms->fifo_head); |
| r5666 | r5667 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | struct dso_wavelog_context |
| 27 | 27 | { |
| 28 | wav_file *wav | |
| 28 | wav_file *wav | |
| 29 | 29 | char name[32]; |
| 30 | 30 | }; |
| 31 | 31 | |
| r5666 | r5667 | |
| 125 | 125 | log_num = node_module_index(node); |
| 126 | 126 | context->sample_num = 0; |
| 127 | 127 | |
| 128 | sprintf(context->name, "discrete%s_%d.csv", node->info->device->tag, log_num); | |
| 128 | sprintf(context->name, "discrete_%s_%d.csv", node->info->device->tag, log_num); | |
| 129 | 129 | context->csv_file = fopen(context->name, "w"); |
| 130 | 130 | /* Output some header info */ |
| 131 | 131 | fprintf(context->csv_file, "\"MAME Discrete System Node Log\"\n"); |
| r5666 | r5667 | |
| 169 | 169 | int log_num; |
| 170 | 170 | |
| 171 | 171 | log_num = node_module_index(node); |
| 172 | sprintf(context->name, "discrete%s_%d.wav", node->info->device->tag, log_num); | |
| 173 | context->wav_file = wav_open(context->name, node->info->sample_rate, node->active_inputs/2); | |
| 172 | sprintf(context->name, "discrete_%s_%d.wav", node->info->device->tag, log_num); | |
| 173 | context->wavfile = wav_open(context->name, node->info->sample_rate, node->active_inputs/2); | |
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | static DISCRETE_STOP( dso_wavelog ) |
| r5666 | r5667 | |
| 178 | 178 | struct dso_wavelog_context *context = (struct dso_wavelog_context *) node->context; |
| 179 | 179 | |
| 180 | 180 | /* close any wave files */ |
| 181 | if (context->wav_file) | |
| 182 | wav_close(context->wav_file); | |
| 181 | if (context->wavfile) | |
| 182 | wav_close(context->wavfile); | |
| 183 | 183 | } |
| 184 | 184 | |
| 185 | 185 | static DISCRETE_STEP( dso_wavelog ) |
| r5666 | r5667 | |
| 196 | 196 | if (node->active_inputs == 2) |
| 197 | 197 | { |
| 198 | 198 | /* DISCRETE_WAVELOG1 */ |
| 199 | wav_add_data_16(context->wav | |
| 199 | wav_add_data_16(context->wav | |
| 200 | 200 | } |
| 201 | 201 | else |
| 202 | 202 | { |
| r5666 | r5667 | |
| 205 | 205 | val = (val < -32768) ? -32768 : (val > 32767) ? 32767 : val; |
| 206 | 206 | wave_data_r = (INT16)val; |
| 207 | 207 | |
| 208 | wav_add_data_16lr(context->wav | |
| 208 | wav_add_data_16lr(context->wav | |
| 209 | 209 | } |
| 210 | 210 | } |
| r5666 | r5667 | |
|---|---|---|
| 716 | 716 | for (entry = info->input_list; entry != NULL; entry = entry->next) |
| 717 | 717 | { |
| 718 | 718 | struct dss_input_context *context = (struct dss_input_context *) ((node_description *) entry->ptr)->context; |
| 719 | context->ptr = ( | |
| 719 | context->ptr = (stream_sample_t *) inputs[context->stream_in_number]; | |
| 720 | 720 | } |
| 721 | 721 | |
| 722 | 722 | /* Queue tasks */ |
| 723 | 723 | for (entry = info->task_list; entry != 0; entry = entry->next) |
| 724 | 724 | { |
| 725 | task_info *ti = malloc(sizeof(task_info)); | |
| 725 | task_info *ti = (task_info *)malloc(sizeof(task_info)); | |
| 726 | 726 | discrete_task_context *task = (discrete_task_context *) entry->ptr; |
| 727 | 727 | |
| 728 | 728 | /* Fire task */ |
| r5666 | r5667 | |
|---|---|---|
| 1284 | 1284 | * |
| 1285 | 1285 | * EXAMPLES: galaxian, dkong, mario |
| 1286 | 1286 | * |
| 1287 | ||
| 1287 | ||
| 1288 | 1288 | * |
| 1289 | 1289 | * DISCRETE_LOGIC_INVERT - Logic invertor |
| 1290 | 1290 | * DISCRETE_LOGIC_AND - Logic AND gate (3 & 4 input also available) |
| r5666 | r5667 | |
| 3154 | 3154 | * | | |
| 3155 | 3155 | * v_neg v_neg |
| 3156 | 3156 | * |
| 3157 | * Note: There is usually a 0.001uF cap between pins 5 & 6. | |
| 3158 | * This is for circuit stability and can be ignored for simulation purposes. | |
| 3159 | * | |
| 3157 | 3160 | * Declaration syntax |
| 3158 | 3161 | * |
| 3159 | 3162 | * DISCRETE_566(name of node, |
| r5666 | r5667 | |
|---|---|---|
| 705 | 705 | static void SCSP_UpdateReg(struct _SCSP *SCSP, int reg) |
| 706 | 706 | { |
| 707 | 707 | /* temporary hack until this is converted to a device */ |
| 708 | const address_space *space = memory_find_address_space(SCSP->device->machine->cpu | |
| 708 | const address_space *space = memory_find_address_space(SCSP->device->machine->firstcpu | |
| 709 | 709 | switch(reg&0x3f) |
| 710 | 710 | { |
| 711 | 711 | case 0x2: |
| r5666 | r5667 | |
| 1208 | 1208 | |
| 1209 | 1209 | /*Job done,request a dma end irq*/ |
| 1210 | 1210 | if(scsp_regs[0x1e/2] & 0x10) |
| 1211 | cpu_set_input_line(space->machine->c | |
| 1211 | cpu_set_input_line(device_list_find_by_index(space->machine->config->devicelist, CPU, 2),dma_transfer_end,HOLD_LINE); | |
| 1212 | 1212 | } |
| 1213 | 1213 | |
| 1214 | 1214 | #ifdef UNUSED_FUNCTION |
| r5666 | r5667 | |
| 1312 | 1312 | SCSP->scsp_dtlg = scsp_regs[0x416/2] & 0x0ffe; |
| 1313 | 1313 | if(scsp_dexe) |
| 1314 | 1314 | { |
| 1315 | dma_scsp(cpu_get_address_space(device->machine->cpu | |
| 1315 | dma_scsp(cpu_get_address_space(device->machine->firstcpu | |
| 1316 | 1316 | scsp_regs[0x416/2]^=0x1000;//disable starting bit |
| 1317 | 1317 | } |
| 1318 | 1318 | break; |
| r5666 | r5667 | |
| 1320 | 1320 | case 0x42a: |
| 1321 | 1321 | if(stv_scu && !(stv_scu[40] & 0x40) /*&& scsp_regs[0x42c/2] & 0x20*/)/*Main CPU allow sound irq*/ |
| 1322 | 1322 | { |
| 1323 | cpu_set_input_line_and_vector(device->machine->cpu | |
| 1323 | cpu_set_input_line_and_vector(device->machine->firstcpu | |
| 1324 | 1324 | logerror("SCSP: Main CPU interrupt\n"); |
| 1325 | 1325 | } |
| 1326 | 1326 | break; |
| r5666 | r5667 | |
|---|---|---|
| 985 | 985 | astring_printf(string, "%s\n%s %s\n\nCPU:\n", machine->gamedrv->description, machine->gamedrv->year, machine->gamedrv->manufacturer); |
| 986 | 986 | |
| 987 | 987 | /* loop over all CPUs */ |
| 988 | for (device = machine->cpu | |
| 988 | for (device = machine->firstcpu | |
| 989 | 989 | { |
| 990 | 990 | /* count how many identical CPUs we have */ |
| 991 | 991 | count = 1; |
| r5666 | r5667 | |
| 1243 | 1243 | mame_pause(machine, !mame_is_paused(machine)); |
| 1244 | 1244 | } |
| 1245 | 1245 | |
| 1246 | /* handle a toggle cheats request */ | |
| 1247 | if (ui_input_pressed(machine, IPT_UI_TOGGLE_CHEAT)) | |
| 1248 | cheat_set_global_enable(machine, !cheat_get_global_enable(machine)); | |
| 1249 | ||
| 1246 | 1250 | /* toggle movie recording */ |
| 1247 | 1251 | if (ui_input_pressed(machine, IPT_UI_RECORD_MOVIE)) |
| 1248 | 1252 | { |
| r5666 | r5667 | |
| 1461 | 1465 | /* add CPU overclocking (cheat only) */ |
| 1462 | 1466 | if (options_get_bool(mame_options(), OPTION_CHEAT)) |
| 1463 | 1467 | { |
| 1464 | for (item = 0; item < ARRAY_LENGTH(machine->cpu); item++) | |
| 1465 | if (machine->cpu[item] != NULL) | |
| 1466 | { | |
| 1467 | astring_printf(string, "Overclock CPU %s", machine->cpu[item]->tag); | |
| 1468 | *tailptr = slider_alloc(machine, astring_c(string), 10, 1000, 2000, 1, slider_overclock, (void *)(FPTR)item); | |
| 1469 | tailptr = &(*tailptr)->next; | |
| 1470 | } | |
| 1468 | for (device = machine->firstcpu; device != NULL; device = cpu_next(device)) | |
| 1469 | { | |
| 1470 | void *param = (void *)device; | |
| 1471 | astring_printf(string, "Overclock CPU %s", device->tag); | |
| 1472 | *tailptr = slider_alloc(machine, astring_c(string), 10, 1000, 2000, 1, slider_overclock, param); | |
| 1473 | tailptr = &(*tailptr)->next; | |
| 1474 | } | |
| 1471 | 1475 | } |
| 1472 | 1476 | |
| 1473 | 1477 | /* add screen parameters */ |
| r5666 | r5667 | |
| 1635 | 1639 | |
| 1636 | 1640 | static INT32 slider_overclock(running_machine *machine, void *arg, astring *string, INT32 newval) |
| 1637 | 1641 | { |
| 1638 | | |
| 1642 | const device_config *cpu = (const device_config *)arg; | |
| 1639 | 1643 | if (newval != SLIDER_NOCHANGE) |
| 1640 | cpu_set_clockscale( | |
| 1644 | cpu_set_clockscale( | |
| 1641 | 1645 | if (string != NULL) |
| 1642 | astring_printf(string, "%3.0f%%", floor(cpu_get_clockscale(machine->cpu[which]) * 100.0f + 0.5f)); | |
| 1643 | return floor(cpu_get_clockscale(machine->cpu[which]) * 1000.0f + 0.5f); | |
| 1646 | astring_printf(string, "%3.0f%%", floor(cpu_get_clockscale(cpu) * 100.0f + 0.5f)); | |
| 1647 | return floor(cpu_get_clockscale(cpu) * 1000.0f + 0.5f); | |
| 1644 | 1648 | } |
| 1645 | 1649 | |
| 1646 | 1650 |
| r5666 | r5667 | |
|---|---|---|
| 130 | 130 | }; |
| 131 | 131 | |
| 132 | 132 | |
| 133 | ||
| 133 | 134 | /*************************************************************************** |
| 134 | 135 | TOKEN/STRING TABLES |
| 135 | 136 | ***************************************************************************/ |
| r5666 | r5667 | |
| 406 | 407 | GLOBAL VARIABLES |
| 407 | 408 | ***************************************************************************/ |
| 408 | 409 | |
| 410 | /* stashed copy of the most recently initialized machine for the debugging hack */ | |
| 411 | static running_machine *stashed_machine; | |
| 412 | ||
| 409 | 413 | /* standard joystick mappings */ |
| 410 | 414 | const char joystick_map_8way[] = "7778...4445"; |
| 411 | 415 | const char joystick_map_4way_sticky[] = "s8.4s8.44s8.4445"; |
| r5666 | r5667 | |
| 573 | 577 | input_private *state; |
| 574 | 578 | input_device_list *device_list; |
| 575 | 579 | |
| 580 | /* remember this machine */ | |
| 581 | stashed_machine = machine; | |
| 582 | ||
| 576 | 583 | /* allocate private memory */ |
| 577 | 584 | machine->input_data = state = auto_alloc_clear(machine, input_private); |
| 578 | 585 | device_list = state->device_list; |
| 579 | 586 | |
| 580 | /* reset the device lists */ | |
| 581 | memset(device_list, 0, sizeof(device_list)); | |
| 582 | ||
| 583 | 587 | /* reset code memory */ |
| 584 | 588 | code_pressed_memory_reset(machine); |
| 585 | 589 | |
| r5666 | r5667 | |
| 940 | 944 | if (code_pressed_memory[memnum] == code) |
| 941 | 945 | { |
| 942 | 946 | /* if no longer pressed, clear entry */ |
| 943 | if ( | |
| 947 | if ( | |
| 944 | 948 | code_pressed_memory[memnum] = INPUT_CODE_INVALID; |
| 945 | 949 | |
| 946 | 950 | /* always return 0 */ |
| r5666 | r5667 | |
| 953 | 957 | } |
| 954 | 958 | |
| 955 | 959 | /* if we get here, we were not previously pressed; if still not pressed, return 0 */ |
| 956 | if ( | |
| 960 | if ( | |
| 957 | 961 | return 0; |
| 958 | 962 | |
| 959 | 963 | /* otherwise, add ourself to the memory and return 1 */ |
| r5666 | r5667 | |
| 1432 | 1436 | /* otherwise, keep parsing */ |
| 1433 | 1437 | else |
| 1434 | 1438 | { |
| 1439 | input_device_list *device_list = (machine != NULL) ? machine->input_data->device_list : NULL; | |
| 1435 | 1440 | input_device *device; |
| 1436 | input_device_list *device_list = machine->input_data->device_list; | |
| 1437 | 1441 | |
| 1438 | 1442 | /* if this is an invalid device, we have nothing to look up */ |
| 1439 | if (devindex >= device_list[devclass].count) | |
| 1443 | if (device_list == NULL || devindex >= device_list[devclass].count) | |
| 1440 | 1444 | goto exit; |
| 1441 | 1445 | device = &device_list[devclass].list[devindex]; |
| 1442 | 1446 | |
| r5666 | r5667 | |
| 1497 | 1501 | |
| 1498 | 1502 | |
| 1499 | 1503 | /*************************************************************************** |
| 1504 | DEBUGGIN UTILITIES | |
| 1505 | ***************************************************************************/ | |
| 1506 | ||
| 1507 | /*------------------------------------------------- | |
| 1508 | debug_global_input_code_pressed - return TRUE | |
| 1509 | if the given input code has been pressed | |
| 1510 | -------------------------------------------------*/ | |
| 1511 | ||
| 1512 | INT32 debug_global_input_code_pressed(input_code code) | |
| 1513 | { | |
| 1514 | if (!mame_is_valid_machine(stashed_machine)) | |
| 1515 | return 0; | |
| 1516 | return input_code_pressed(stashed_machine, code); | |
| 1517 | } | |
| 1518 | ||
| 1519 | ||
| 1520 | ||
| 1521 | /*************************************************************************** | |
| 1500 | 1522 | INTERNAL FUNCTIONS |
| 1501 | 1523 | ***************************************************************************/ |
| 1502 | 1524 |
| r5666 | r5667 | |
|---|---|---|
| 640 | 640 | input_code input_code_from_token(running_machine *machine, const char *_token); |
| 641 | 641 | |
| 642 | 642 | |
| 643 | ||
| 644 | /* ----- debugging utilities ----- */ | |
| 645 | ||
| 646 | /* return TRUE if the given input code has been pressed */ | |
| 647 | INT32 debug_global_input_code_pressed(input_code code); | |
| 648 | ||
| 649 | ||
| 643 | 650 | #endif /* __INPUT_H__ */ |
| r5666 | r5667 | |
|---|---|---|
| 203 | 203 | UINT64 framecount; /* frame count */ |
| 204 | 204 | astring * output[UI_TARGET_FONT_ROWS*2]; /* array of output strings */ |
| 205 | 205 | UINT8 justify[UI_TARGET_FONT_ROWS*2]; /* justification for each string */ |
| 206 | UINT8 numlines; /* n | |
| 206 | UINT8 numlines; /* n | |
| 207 | 207 | INT8 lastline; /* last line used for output */ |
| 208 | UINT8 disabled; /* true if the cheat engine is disabled */ | |
| 208 | 209 | }; |
| 209 | 210 | |
| 210 | 211 | |
| r5666 | r5667 | |
| 446 | 447 | } |
| 447 | 448 | |
| 448 | 449 | |
| 450 | /*------------------------------------------------- | |
| 451 | cheat_get_global_enable - return the global | |
| 452 | enabled state of the cheat engine | |
| 453 | -------------------------------------------------*/ | |
| 449 | 454 | |
| 455 | int cheat_get_global_enable(running_machine *machine) | |
| 456 | { | |
| 457 | cheat_private *cheatinfo = machine->cheat_data; | |
| 458 | return !cheatinfo->disabled; | |
| 459 | } | |
| 460 | ||
| 461 | ||
| 462 | /*------------------------------------------------- | |
| 463 | cheat_set_global_enable - globally enable or | |
| 464 | disable the cheat engine | |
| 465 | -------------------------------------------------*/ | |
| 466 | ||
| 467 | void cheat_set_global_enable(running_machine *machine, int enable) | |
| 468 | { | |
| 469 | cheat_private *cheatinfo = machine->cheat_data; | |
| 470 | cheat_entry *cheat; | |
| 471 | ||
| 472 | /* if we're enabled currently and we don't want to be, turn things off */ | |
| 473 | if (!cheatinfo->disabled && !enable) | |
| 474 | { | |
| 475 | /* iterate over running cheats and execute any OFF Scripts */ | |
| 476 | for (cheat = cheatinfo->cheatlist; cheat != NULL; cheat = cheat->next) | |
| 477 | if (cheat->state == SCRIPT_STATE_RUN) | |
| 478 | cheat_execute_script(cheatinfo, cheat, SCRIPT_STATE_OFF); | |
| 479 | popmessage("Cheats Disabled"); | |
| 480 | cheatinfo->disabled = TRUE; | |
| 481 | } | |
| 482 | ||
| 483 | /* if we're disabled currently and we want to be enabled, turn things on */ | |
| 484 | else if (cheatinfo->disabled && enable) | |
| 485 | { | |
| 486 | /* iterate over running cheats and execute any ON Scripts */ | |
| 487 | cheatinfo->disabled = FALSE; | |
| 488 | for (cheat = cheatinfo->cheatlist; cheat != NULL; cheat = cheat->next) | |
| 489 | if (cheat->state == SCRIPT_STATE_RUN) | |
| 490 | cheat_execute_script(cheatinfo, cheat, SCRIPT_STATE_ON); | |
| 491 | popmessage("Cheats Enabled"); | |
| 492 | } | |
| 493 | } | |
| 494 | ||
| 495 | ||
| 496 | ||
| 450 | 497 | /*************************************************************************** |
| 451 | 498 | CHEAT UI |
| 452 | 499 | ***************************************************************************/ |
| r5666 | r5667 | |
| 602 | 649 | cheat_entry *cheat = (cheat_entry *)entry; |
| 603 | 650 | int changed = FALSE; |
| 604 | 651 | |
| 652 | /* if cheats have been toggled off no point in even trying to do anything */ | |
| 653 | if (cheatinfo->disabled) | |
| 654 | return changed; | |
| 655 | ||
| 605 | 656 | /* if we have no parameter and no run or off script, but we do have an on script, it's a oneshot cheat */ |
| 606 | 657 | if (is_oneshot_cheat(cheat)) |
| 607 | 658 | { |
| r5666 | r5667 | |
| 872 | 923 | { |
| 873 | 924 | script_entry *entry; |
| 874 | 925 | |
| 875 | /* if no script, bail */ | |
| 876 | if (cheat->script[state] == NULL) | |
| 926 | /* if cheat engine has been temporarily disabled or no script, bail */ | |
| 927 | if (cheatinfo->disabled || cheat->script[state] == NULL) | |
| 877 | 928 | return; |
| 878 | 929 | |
| 879 | 930 | /* iterate over entries */ |
| r5666 | r5667 | |
|---|---|---|
| 31 | 31 | /* re-initialize the cheat system, reloading any cheat files */ |
| 32 | 32 | void cheat_reload(running_machine *machine); |
| 33 | 33 | |
| 34 | /* return the global enabled state of the cheat engine */ | |
| 35 | int cheat_get_global_enable(running_machine *machine); | |
| 34 | 36 | |
| 37 | /* globally enable or disable the cheat engine */ | |
| 38 | void cheat_set_global_enable(running_machine *machine, int enable); | |
| 35 | 39 | |
| 40 | ||
| 41 | ||
| 36 | 42 | /* ----- cheat UI helpers ----- */ |
| 37 | 43 | |
| 38 | 44 | /* render any text overlays */ |
| r5666 | r5667 | |
|---|---|---|
| 119 | 119 | } |
| 120 | 120 | return cpy; |
| 121 | 121 | } |
| 122 | ||
| 123 | ||
| 124 | /*------------------------------------------------- | |
| 125 | core_i64_format - i64 format printf helper | |
| 126 | -------------------------------------------------*/ | |
| 127 | ||
| 128 | char *core_i64_hex_format(UINT64 value, UINT8 mindigits) | |
| 129 | { | |
| 130 | static char buffer[16][64]; | |
| 131 | static int index; | |
| 132 | char *bufbase = &buffer[index++ % 16][0]; | |
| 133 | char *bufptr = bufbase; | |
| 134 | INT8 curdigit; | |
| 135 | ||
| 136 | for (curdigit = 15; curdigit >= 0; curdigit--) | |
| 137 | { | |
| 138 | int nibble = (value >> (curdigit * 4)) & 0xf; | |
| 139 | if (nibble != 0 || curdigit < mindigits) | |
| 140 | { | |
| 141 | mindigits = curdigit; | |
| 142 | *bufptr++ = "0123456789ABCDEF"[nibble]; | |
| 143 | } | |
| 144 | } | |
| 145 | if (bufptr == bufbase) | |
| 146 | *bufptr++ = '0'; | |
| 147 | *bufptr = 0; | |
| 148 | ||
| 149 | return bufbase; | |
| 150 | } |
| r5666 | r5667 | |
|---|---|---|
| 14 | 14 | #ifndef __CORESTR_H__ |
| 15 | 15 | #define __CORESTR_H__ |
| 16 | 16 | |
| 17 | #include "osdcore.h" | |
| 17 | 18 | #include <string.h> |
| 18 | 19 | |
| 19 | 20 | |
| r5666 | r5667 | |
| 57 | 58 | int core_strwildcmp(const char *sp1, const char *sp2); |
| 58 | 59 | |
| 59 | 60 | |
| 61 | /* I64 printf helper */ | |
| 62 | char *core_i64_hex_format(UINT64 value, UINT8 mindigits); | |
| 63 | ||
| 64 | ||
| 60 | 65 | #endif /* __CORESTR_H__ */ |
| r5666 | r5667 | |
|---|---|---|
| 954 | 954 | |
| 955 | 955 | static void command_trace(running_machine *machine) |
| 956 | 956 | { |
| 957 | int cpunum; | |
| 957 | const device_config *cpu; | |
| 958 | int cpunum = 0; | |
| 958 | 959 | FILE *file; |
| 959 | 960 | char filename[256]; |
| 960 | 961 | |
| 961 | for (cpu | |
| 962 | for (cpu | |
| 962 | 963 | { |
| 963 | if (machine->c | |
| 964 | if (cpu_next(cpu_first(machine->config)) == NULL) | |
| 964 | 965 | snprintf(filename, sizeof(filename) / sizeof(filename[0]), "_%s.tr", current_testcase.name); |
| 965 | 966 | else |
| 966 | 967 | snprintf(filename, sizeof(filename) / sizeof(filename[0]), "_%s.%d.tr", current_testcase.name, cpunum); |
| r5666 | r5667 | |
| 969 | 970 | if (file) |
| 970 | 971 | { |
| 971 | 972 | report_message(MSG_INFO, "Tracing CPU #%d: %s", cpunum, filename); |
| 972 | debug_cpu_trace( | |
| 973 | debug_cpu_trace( | |
| 973 | 974 | fclose(file); |
| 974 | 975 | } |
| 976 | ||
| 977 | cpunum++; | |
| 975 | 978 | } |
| 976 | 979 | } |
| 977 | 980 | |
| r5666 | r5667 | |
| 1033 | 1036 | int i; |
| 1034 | 1037 | attotime time_limit; |
| 1035 | 1038 | attotime current_time; |
| 1036 | int cpunum; | |
| 1037 | 1039 | |
| 1038 | 1040 | render_target_get_primitives(target); |
| 1039 | 1041 | |
| r5666 | r5667 | |
| 1064 | 1066 | return; |
| 1065 | 1067 | } |
| 1066 | 1068 | |
| 1067 | /* update the runtime hash */ | |
| 1068 | if (0) | |
| 1069 | { | |
| 1070 | for (cpunum = 0; (cpunum < ARRAY_LENGTH(machine->cpu)) && (machine->cpu[cpunum] != NULL); cpunum++) | |
| 1071 | { | |
| 1072 | runtime_hash *= 57; | |
| 1073 | runtime_hash ^= cpu_get_reg(machine->cpu[cpunum], REG_GENPC); /* TODO - Add more registers? */ | |
| 1074 | } | |
| 1075 | } | |
| 1076 | ||
| 1077 | 1069 | for (i = 0; i < sizeof(commands) / sizeof(commands[i]); i++) |
| 1078 | 1070 | { |
| 1079 | 1071 | if (current_command->command_type == commands[i].command_type) |
| r5666 | r5667 | |
|---|---|---|
| 556 | 556 | case 1: |
| 557 | 557 | /* ready to accept next frame */ |
| 558 | 558 | #if 0 |
| 559 | LOG(( "$%04x %f: mea8000_r ready=%i\n", cpu_get_previouspc( device->machine->cpu | |
| 559 | LOG(( "$%04x %f: mea8000_r ready=%i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 560 | 560 | #endif |
| 561 | 561 | return mea8000_accept_byte(mea8000) << 7; |
| 562 | 562 | |
| 563 | 563 | default: |
| 564 | logerror( "$%04x mea8000_r invalid read offset %i\n", cpu_get_previouspc( device->machine->cpu | |
| 564 | logerror( "$%04x mea8000_r invalid read offset %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 565 | 565 | } |
| 566 | 566 | return 0; |
| 567 | 567 | } |
| r5666 | r5667 | |
| 577 | 577 | { |
| 578 | 578 | /* got pitch byte before first frame */ |
| 579 | 579 | mea8000->pitch = 2 * data; |
| 580 | LOG(( "$%04x %f: mea8000_w pitch %i\n", cpu_get_previouspc( device->machine->cpu | |
| 580 | LOG(( "$%04x %f: mea8000_w pitch %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 581 | 581 | mea8000->state = MEA8000_WAIT_FIRST; |
| 582 | 582 | mea8000->bufpos = 0; |
| 583 | 583 | } |
| 584 | 584 | else if (mea8000->bufpos == 4) |
| 585 | 585 | { |
| 586 | 586 | /* overflow */ |
| 587 | LOG(( "$%04x %f: mea8000_w data overflow %02X\n", cpu_get_previouspc( device->machine->cpu | |
| 587 | LOG(( "$%04x %f: mea8000_w data overflow %02X\n", cpu_get_previouspc( device->machine->firstcpu | |
| 588 | 588 | } |
| 589 | 589 | else |
| 590 | 590 | { |
| 591 | 591 | /* enqueue frame byte */ |
| 592 | LOG(( "$%04x %f: mea8000_w data %02X in frame pos %i\n", cpu_get_previouspc( device->machine->cpu | |
| 592 | LOG(( "$%04x %f: mea8000_w data %02X in frame pos %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 593 | 593 | data, mea8000->bufpos )); |
| 594 | 594 | mea8000->buf[mea8000->bufpos] = data; |
| 595 | 595 | mea8000->bufpos++; |
| r5666 | r5667 | |
| 623 | 623 | mea8000_stop_frame(device->machine, mea8000); |
| 624 | 624 | |
| 625 | 625 | LOG(( "$%04x %f: mea8000_w command %02X stop=%i cont=%i roe=%i\n", |
| 626 | cpu_get_previouspc(device->machine->cpu | |
| 626 | cpu_get_previouspc(device->machine->firstcpu | |
| 627 | 627 | stop, mea8000->cont, mea8000->roe )); |
| 628 | 628 | |
| 629 | 629 | mea8000_update_req(device); |
| r5666 | r5667 | |
| 631 | 631 | } |
| 632 | 632 | |
| 633 | 633 | default: |
| 634 | logerror( "$%04x mea8000_w invalid write offset %i\n", cpu_get_previouspc( device->machine->cpu | |
| 634 | logerror( "$%04x mea8000_w invalid write offset %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 635 | 635 | } |
| 636 | 636 | } |
| 637 | 637 |
| r5666 | r5667 | |
|---|---|---|
| 528 | 528 | |
| 529 | 529 | static void vga_cpu_interface(running_machine *machine) |
| 530 | 530 | { |
| 531 | const address_space *space = cpu_get_address_space(machine->cpu | |
| 531 | const address_space *space = cpu_get_address_space(machine->firstcpu | |
| 532 | 532 | static int sequencer, gc; |
| 533 | 533 | read8_space_func read_handler; |
| 534 | 534 | write8_space_func write_handler; |
| r5666 | r5667 | |
| 600 | 600 | } |
| 601 | 601 | else |
| 602 | 602 | { |
| 603 | buswidth = cpu_get_databus_width(machine->cpu | |
| 603 | buswidth = cpu_get_databus_width(machine->firstcpu | |
| 604 | 604 | switch(buswidth) |
| 605 | 605 | { |
| 606 | 606 | case 8: |
| r5666 | r5667 | |
| 1137 | 1137 | memset(vga.crtc.data, '\0', vga.svga_intf.crtc_regcount); |
| 1138 | 1138 | memset(vga.gc.data, '\0', vga.svga_intf.gc_regcount); |
| 1139 | 1139 | |
| 1140 | buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM); | |
| 1141 | spacevga =cpu_get_address_space(machine->cpu[0],vga.vga_intf.port_addressspace); | |
| 1140 | buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM); | |
| 1141 | spacevga =cpu_get_address_space(machine->firstcpu,vga.vga_intf.port_addressspace); | |
| 1142 | 1142 | switch(buswidth) |
| 1143 | 1143 | { |
| 1144 | 1144 | case 8: |
| r5666 | r5667 | |
|---|---|---|
| 1887 | 1887 | if (cfg->cpu0_timing_factor > 0) |
| 1888 | 1888 | { |
| 1889 | 1889 | cpu0_clock_period = period * cfg->cpu0_timing_factor * GROSS_FACTOR; |
| 1890 | cpu_set_clock(machine->cpu | |
| 1890 | cpu_set_clock(machine->firstcpu | |
| 1891 | 1891 | } |
| 1892 | 1892 | |
| 1893 | 1893 | /* calculate timing */ |
| r5666 | r5667 | |
|---|---|---|
| 81 | 81 | pItem = EventList_GetFirstItem(); |
| 82 | 82 | set_last_border_color ( pItem[NumItems-1].Event_Data ); |
| 83 | 83 | EventList_Reset(); |
| 84 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu | |
| 84 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu | |
| 85 | 85 | logerror ("Event log reset in callback fn.\n"); |
| 86 | 86 | } |
| 87 | 87 | } |
| r5666 | r5667 | |
|---|---|---|
| 161 | 161 | { |
| 162 | 162 | crtc_ega_t *crtc_ega = get_safe_token(device); |
| 163 | 163 | |
| 164 | if (LOG) logerror("CRTC_EGA PC %04x: reg 0x%02x = 0x%02x\n", cpu_get_pc(device->machine->cpu | |
| 164 | if (LOG) logerror("CRTC_EGA PC %04x: reg 0x%02x = 0x%02x\n", cpu_get_pc(device->machine->firstcpu | |
| 165 | 165 | |
| 166 | 166 | switch (crtc_ega->register_address_latch) |
| 167 | 167 | { |
| r5666 | r5667 | |
|---|---|---|
| 341 | 341 | |
| 342 | 342 | /* Assume all other routines have processed their data from the list */ |
| 343 | 343 | EventList_Reset(); |
| 344 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu | |
| 344 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu | |
| 345 | 345 | } |
| r5666 | r5667 | |
|---|---|---|
| 44 | 44 | pItem = EventList_GetFirstItem(); |
| 45 | 45 | set_last_border_color ( pItem[NumItems-1].Event_Data ); |
| 46 | 46 | EventList_Reset(); |
| 47 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu | |
| 47 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu | |
| 48 | 48 | logerror ("Event log reset in callback fn.\n"); |
| 49 | 49 | } |
| 50 | 50 | } |
| r5666 | r5667 | |
|---|---|---|
| 101 | 101 | VIDEO_START( pc_mda ) |
| 102 | 102 | { |
| 103 | 103 | int buswidth; |
| 104 | const address_space *space = cpu_get_address_space(machine->cpu | |
| 104 | const address_space *space = cpu_get_address_space(machine->firstcpu | |
| 105 | 105 | |
| 106 | buswidth = cpu_get_databus_width(machine->cpu | |
| 106 | buswidth = cpu_get_databus_width(machine->firstcpu | |
| 107 | 107 | switch(buswidth) |
| 108 | 108 | { |
| 109 | 109 | case 8: |
| 110 | 110 | memory_install_read8_handler(space, 0xb0000, 0xb0fff, 0, 0x07000, SMH_BANK(11) ); |
| 111 | 111 | memory_install_write8_handler(space, 0xb0000, 0xb0fff, 0, 0x07000, pc_video_videoram_w ); |
| 112 | memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_MDA_r ); | |
| 113 | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_MDA_w ); | |
| 112 | memory_install_read8_handler(cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_MDA_r ); | |
| 113 | memory_install_write8_handler(cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_MDA_w ); | |
| 114 | 114 | break; |
| 115 | 115 | |
| 116 | 116 | default: |
| r5666 | r5667 | |
| 453 | 453 | static VIDEO_START( pc_hercules ) |
| 454 | 454 | { |
| 455 | 455 | int buswidth; |
| 456 | const address_space *space = cpu_get_address_space(machine->cpu | |
| 456 | const address_space *space = cpu_get_address_space(machine->firstcpu | |
| 457 | 457 | |
| 458 | buswidth = cpu_get_databus_width(machine->cpu | |
| 458 | buswidth = cpu_get_databus_width(machine->firstcpu | |
| 459 | 459 | switch(buswidth) |
| 460 | 460 | { |
| 461 | 461 | case 8: |
| 462 | 462 | memory_install_read8_handler(space, 0xb0000, 0xbffff, 0, 0, SMH_BANK(11) ); |
| 463 | 463 | memory_install_write8_handler(space, 0xb0000, 0xbffff, 0, 0, pc_video_videoram_w ); |
| 464 | memory_install_read8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_hercules_r ); | |
| 465 | memory_install_write8_handler(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_hercules_w ); | |
| 464 | memory_install_read8_handler(cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_hercules_r ); | |
| 465 | memory_install_write8_handler(cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO), 0x3b0, 0x3bf, 0, 0, pc_hercules_w ); | |
| 466 | 466 | break; |
| 467 | 467 | |
| 468 | 468 | default: |
| r5666 | r5667 | |
|---|---|---|
| 680 | 680 | |
| 681 | 681 | VIDEO_START( pc_aga ) |
| 682 | 682 | { |
| 683 | const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_IO ); | |
| 684 | int buswidth = cpu_get_databus_width(machine->cpu[0], ADDRESS_SPACE_PROGRAM); | |
| 683 | const address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_IO ); | |
| 684 | int buswidth = cpu_get_databus_width(machine->firstcpu, ADDRESS_SPACE_PROGRAM); | |
| 685 | 685 | |
| 686 | 686 | switch(buswidth) |
| 687 | 687 | { |
| r5666 | r5667 | |
| 714 | 714 | |
| 715 | 715 | VIDEO_START( pc200 ) |
| 716 | 716 | { |
| 717 | const address_space *space = cpu_get_address_space( machine->cpu | |
| 717 | const address_space *space = cpu_get_address_space( machine->firstcpu | |
| 718 | 718 | int buswidth; |
| 719 | 719 | |
| 720 | 720 | VIDEO_START_CALL(pc_aga); |
| 721 | 721 | |
| 722 | buswidth = cpu_get_databus_width(machine->cpu | |
| 722 | buswidth = cpu_get_databus_width(machine->firstcpu | |
| 723 | 723 | switch(buswidth) |
| 724 | 724 | { |
| 725 | 725 | case 8: |
| r5666 | r5667 | |
|---|---|---|
| 467 | 467 | static VIDEO_START( pc_cga ) |
| 468 | 468 | { |
| 469 | 469 | int buswidth; |
| 470 | const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); | |
| 471 | const address_space *spaceio = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO); | |
| 470 | const address_space *space = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_PROGRAM); | |
| 471 | const address_space *spaceio = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO); | |
| 472 | 472 | |
| 473 | 473 | /* Changed video RAM size to full 32k, for cards which support the |
| 474 | 474 | * Plantronics chipset. |
| 475 | 475 | * TODO: Cards which don't support Plantronics should repeat at |
| 476 | 476 | * BC000h */ |
| 477 | buswidth = cpu_get_databus_width(machine->cpu | |
| 477 | buswidth = cpu_get_databus_width(machine->firstcpu | |
| 478 | 478 | switch(buswidth) |
| 479 | 479 | { |
| 480 | 480 | case 8: |
| r5666 | r5667 | |
|---|---|---|
| 609 | 609 | static VIDEO_START( pc_ega ) |
| 610 | 610 | { |
| 611 | 611 | int buswidth; |
| 612 | const address_space *space = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM); | |
| 613 | const address_space *spaceio = cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_IO); | |
| 612 | const address_space *space = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_PROGRAM); | |
| 613 | const address_space *spaceio = cpu_get_address_space(machine->firstcpu, ADDRESS_SPACE_IO); | |
| 614 | 614 | |
| 615 | buswidth = cpu_get_databus_width(machine->cpu | |
| 615 | buswidth = cpu_get_databus_width(machine->firstcpu | |
| 616 | 616 | switch(buswidth) |
| 617 | 617 | { |
| 618 | 618 | case 8: |
| r5666 | r5667 | |
|---|---|---|
| 177 | 177 | } |
| 178 | 178 | } |
| 179 | 179 | |
| 180 | timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(machine->cpu | |
| 180 | timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(machine->firstcpu | |
| 181 | 181 | |
| 182 | 182 | cdp1864->dmaout = 0; |
| 183 | 183 | } |
| r5666 | r5667 | |
| 191 | 191 | } |
| 192 | 192 | } |
| 193 | 193 | |
| 194 | timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(machine->cpu | |
| 194 | timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(machine->firstcpu | |
| 195 | 195 | |
| 196 | 196 | cdp1864->dmaout = 1; |
| 197 | 197 | } |
| r5666 | r5667 | |
| 464 | 464 | |
| 465 | 465 | timer_adjust_oneshot(cdp1864->int_timer, video_screen_get_time_until_pos(cdp1864->screen, CDP1864_SCANLINE_INT_START, 0), 0); |
| 466 | 466 | timer_adjust_oneshot(cdp1864->efx_timer, video_screen_get_time_until_pos(cdp1864->screen, CDP1864_SCANLINE_EFX_TOP_START, 0), 0); |
| 467 | timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(device->machine->cpu | |
| 467 | timer_adjust_oneshot(cdp1864->dma_timer, cpu_clocks_to_attotime(device->machine->firstcpu | |
| 468 | 468 | |
| 469 | 469 | cdp1864->disp = 0; |
| 470 | 470 | cdp1864->dmaout = 0; |
| r5666 | r5667 | |
|---|---|---|
| 1593 | 1593 | if (cpu_suspended == 0) \ |
| 1594 | 1594 | { \ |
| 1595 | 1595 | first_ba_cycle = vic2.cycles_counter; \ |
| 1596 | if (1==0) cpu_suspend(machine->cpu | |
| 1596 | if (1==0) cpu_suspend(machine->firstcpu | |
| 1597 | 1597 | cpu_suspended = 1; \ |
| 1598 | 1598 | } \ |
| 1599 | 1599 | } |
| r5666 | r5667 | |
| 1603 | 1603 | { \ |
| 1604 | 1604 | if (cpu_suspended == 1) \ |
| 1605 | 1605 | { \ |
| 1606 | if (1==0) cpu_resume(machine->cpu | |
| 1606 | if (1==0) cpu_resume(machine->firstcpu | |
| 1607 | 1607 | cpu_suspended = 0; \ |
| 1608 | 1608 | } \ |
| 1609 | 1609 | } |
| r5666 | r5667 | |
|---|---|---|
| 162 | 162 | |
| 163 | 163 | /* line interrupt? */ |
| 164 | 164 | if (asic->line_int == scanline) |
| 165 | samcoupe_irq(screen->machine->cpu | |
| 165 | samcoupe_irq(screen->machine->firstcpu | |
| 166 | 166 | |
| 167 | 167 | /* display disabled? (only in mode 3 or 4) */ |
| 168 | 168 | if ((asic->vmpr & 0x40) && (asic->border & 0x80)) |
| r5666 | r5667 | |
|---|---|---|
| 26 | 26 | va_start( v, s_fmt ); |
| 27 | 27 | vsprintf( buf, s_fmt, v ); |
| 28 | 28 | va_end( v ); |
| 29 | logerror( "%08x: %s", cpu_get_pc(machine->cpu | |
| 29 | logerror( "%08x: %s", cpu_get_pc(machine->firstcpu | |
| 30 | 30 | } |
| 31 | 31 | } |
| 32 | 32 |
| r5666 | r5667 | |
|---|---|---|
| 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 | EventList_AddItemOffset(machine, KC85_VIDEO_EVENT_SET_BLINK_STATE, ((data & 0x01)<<7), cpu_attotime_to_clocks(machine->cpu | |
| 114 | EventList_AddItemOffset(machine, KC85_VIDEO_EVENT_SET_BLINK_STATE, ((data & 0x01)<<7), cpu_attotime_to_clocks(machine->firstcpu | |
| 115 | 115 | } |
| 116 | 116 | |
| 117 | 117 | |
| r5666 | r5667 | |
| 548 | 548 | /* process remainder */ |
| 549 | 549 | kc85_common_vh_process_lines(&video_update, cycles_remaining_in_frame); |
| 550 | 550 | EventList_Reset(); |
| 551 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu | |
| 551 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu | |
| 552 | 552 | } |
| 553 | 553 | |
| 554 | 554 | |
| r5666 | r5667 | |
| 571 | 571 | { |
| 572 | 572 | pItem = EventList_GetFirstItem(); |
| 573 | 573 | EventList_Reset(); |
| 574 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->cpu | |
| 574 | EventList_SetOffsetStartTime ( cpu_attotime_to_clocks(machine->firstcpu | |
| 575 | 575 | logerror ("Event log reset in callback fn.\n"); |
| 576 | 576 | } |
| 577 | 577 | } |
| r5666 | r5667 | |
|---|---|---|
| 962 | 962 | DRIVER( mekd2 ) /* 1977 Motorola Evaluation Kit */ |
| 963 | 963 | |
| 964 | 964 | /* DEC */ |
| 965 | DRIVER( pdp1 ) /* 1961 DEC PDP1 */ | |
| 965 | //0134 DRIVER( pdp1 ) /* 1961 DEC PDP1 */ | |
| 966 | 966 | DRIVER(vt100) /* 1978 Digital Equipment Corporation */ |
| 967 | 967 | //DRIVER(vt100wp) /* 1978 Digital Equipment Corporation */ |
| 968 | 968 | //DRIVER(vt100stp) /* 1978 Digital Equipment Corporation */ |
| r5666 | r5667 | |
|---|---|---|
| 94 | 94 | int reg = offset & 7; |
| 95 | 95 | |
| 96 | 96 | if (VERBOSE) |
| 97 | logerror("NCR5380: %02x to %s (reg %d) [PC=%x]\n", data, wnames[reg], reg, cpu_get_pc(space->machine->cpu | |
| 97 | logerror("NCR5380: %02x to %s (reg %d) [PC=%x]\n", data, wnames[reg], reg, cpu_get_pc(space->machine->firstcpu | |
| 98 | 98 | |
| 99 | 99 | switch( reg ) |
| 100 | 100 | { |
| r5666 | r5667 | |
| 354 | 354 | } |
| 355 | 355 | |
| 356 | 356 | if (VERBOSE) |
| 357 | logerror("NCR5380: read %s (reg %d) = %02x [PC=%x]\n", rnames[reg], reg, rv, cpu_get_pc(space->machine->cpu | |
| 357 | logerror("NCR5380: read %s (reg %d) = %02x [PC=%x]\n", rnames[reg], reg, rv, cpu_get_pc(space->machine->firstcpu | |
| 358 | 358 | |
| 359 | 359 | return rv; |
| 360 | 360 | } |
| r5666 | r5667 | |
|---|---|---|
| 802 | 802 | case 0: /* status register 1 */ |
| 803 | 803 | mc6854_update_sr1( mc6854 ); |
| 804 | 804 | LOG(( "%f $%04x mc6854_r: get SR1=$%02X (rda=%i,s2rq=%i,fd=%i,cts=%i,tu=%i,tdra=%i,irq=%i)\n", |
| 805 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 805 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 806 | 806 | ( mc6854->sr1 & RDA) ? 1 : 0, ( mc6854->sr1 & S2RQ) ? 1 : 0, |
| 807 | 807 | ( mc6854->sr1 & FD ) ? 1 : 0, ( mc6854->sr1 & CTS ) ? 1 : 0, |
| 808 | 808 | ( mc6854->sr1 & TU ) ? 1 : 0, ( mc6854->sr1 & TDRA) ? 1 : 0, |
| r5666 | r5667 | |
| 812 | 812 | case 1: /* status register 2 */ |
| 813 | 813 | mc6854_update_sr2( mc6854 ); |
| 814 | 814 | LOG(( "%f $%04x mc6854_r: get SR2=$%02X (ap=%i,fv=%i,ridle=%i,rabt=%i,err=%i,dcd=%i,ovrn=%i,rda2=%i)\n", |
| 815 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 815 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 816 | 816 | ( mc6854->sr2 & AP ) ? 1 : 0, ( mc6854->sr2 & FV ) ? 1 : 0, |
| 817 | 817 | ( mc6854->sr2 & RIDLE) ? 1 : 0, ( mc6854->sr2 & RABT) ? 1 : 0, |
| 818 | 818 | ( mc6854->sr2 & ERR ) ? 1 : 0, ( mc6854->sr2 & DCD ) ? 1 : 0, |
| r5666 | r5667 | |
| 824 | 824 | { |
| 825 | 825 | UINT8 data = mc6854_rfifo_pop( device ); |
| 826 | 826 | LOG(( "%f $%04x mc6854_r: get data $%02X\n", |
| 827 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 827 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 828 | 828 | return data; |
| 829 | 829 | } |
| 830 | 830 | |
| 831 | 831 | default: |
| 832 | logerror( "$%04x mc6854 invalid read offset %i\n", cpu_get_previouspc( device->machine->cpu | |
| 832 | logerror( "$%04x mc6854 invalid read offset %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 833 | 833 | } |
| 834 | 834 | return 0; |
| 835 | 835 | } |
| r5666 | r5667 | |
| 845 | 845 | case 0: /* control register 1 */ |
| 846 | 846 | mc6854->cr1 = data; |
| 847 | 847 | LOG(( "%f $%04x mc6854_w: set CR1=$%02X (ac=%i,irq=%c%c,%sreset=%c%c)\n", |
| 848 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 848 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 849 | 849 | AC ? 1 : 0, |
| 850 | 850 | RIE ? 'r' : '-', TIE ? 't' : '-', |
| 851 | 851 | DISCONTINUE ? "discontinue," : "", |
| r5666 | r5667 | |
| 853 | 853 | )); |
| 854 | 854 | if ( mc6854->cr1 & 0xc ) |
| 855 | 855 | logerror( "$%04x mc6854 DMA not handled (CR1=$%02X)\n", |
| 856 | cpu_get_previouspc( device->machine->cpu | |
| 856 | cpu_get_previouspc( device->machine->firstcpu | |
| 857 | 857 | if ( DISCONTINUE ) |
| 858 | 858 | { |
| 859 | 859 | /* abort receive FIFO but keeps shift register & synchro */ |
| r5666 | r5667 | |
| 882 | 882 | /* control register 3 */ |
| 883 | 883 | mc6854->cr3 = data; |
| 884 | 884 | LOG(( "%f $%04x mc6854_w: set CR3=$%02X (lcf=%i,aex=%i,idl=%i,fdse=%i,loop=%i,tst=%i,dtr=%i)\n", |
| 885 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 885 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 886 | 886 | LCF ? (CEX ? 16 : 8) : 0, AEX ? 1 : 0, |
| 887 | 887 | IDL0 ? 0 : 1, FDSE ? 1 : 0, LOOP ? 1 : 0, |
| 888 | 888 | TST ? 1 : 0, DTR ? 1 : 0 |
| 889 | 889 | )); |
| 890 | 890 | if ( LOOP ) |
| 891 | logerror( "$%04x mc6854 loop mode not handled (CR3=$%02X)\n", cpu_get_previouspc( device->machine->cpu | |
| 891 | logerror( "$%04x mc6854 loop mode not handled (CR3=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu | |
| 892 | 892 | if ( TST ) |
| 893 | logerror( "$%04x mc6854 test mode not handled (CR3=$%02X)\n", cpu_get_previouspc( device->machine->cpu | |
| 893 | logerror( "$%04x mc6854 test mode not handled (CR3=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu | |
| 894 | 894 | |
| 895 | 895 | if ( mc6854->iface->out_dtr ) |
| 896 | 896 | mc6854->iface->out_dtr( device, DTR ? 1 : 0 ); |
| r5666 | r5667 | |
| 901 | 901 | /* control register 2 */ |
| 902 | 902 | mc6854->cr2 = data; |
| 903 | 903 | LOG(( "%f $%04x mc6854_w: set CR2=$%02X (pse=%i,bytes=%i,fmidle=%i,%s,tlast=%i,clr=%c%c,rts=%i)\n", |
| 904 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 904 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 905 | 905 | PSE ? 1 : 0, TWOBYTES ? 2 : 1, FMIDLE ? 1 : 0, |
| 906 | 906 | FCTDRA ? "fc" : "tdra", TLAST ? 1 : 0, |
| 907 | 907 | data & 0x20 ? 'r' : '-', data & 0x40 ? 't' : '-', |
| 908 | 908 | RTS ? 1 : 0 )); |
| 909 | 909 | if ( PSE ) |
| 910 | logerror( "$%04x mc6854 status prioritization not handled (CR2=$%02X)\n", cpu_get_previouspc( device->machine->cpu | |
| 910 | logerror( "$%04x mc6854 status prioritization not handled (CR2=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu | |
| 911 | 911 | if ( TLAST ) |
| 912 | 912 | mc6854_tfifo_terminate( device ); |
| 913 | 913 | if ( data & 0x20 ) |
| r5666 | r5667 | |
| 932 | 932 | break; |
| 933 | 933 | |
| 934 | 934 | case 2: /* transmitter data: continue data */ |
| 935 | LOG(( "%f $%04xmc6854_w: push data=$%02X\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 935 | LOG(( "%f $%04xmc6854_w: push data=$%02X\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 936 | 936 | mc6854_tfifo_push( device, data ); |
| 937 | 937 | break; |
| 938 | 938 | |
| r5666 | r5667 | |
| 941 | 941 | { |
| 942 | 942 | /* control register 4 */ |
| 943 | 943 | mc6854->cr4 = data; |
| 944 | LOG(( "%f $%04x mc6854_w: set CR4=$%02X (interframe=%i,tlen=%i,rlen=%i,%s%s)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 944 | LOG(( "%f $%04x mc6854_w: set CR4=$%02X (interframe=%i,tlen=%i,rlen=%i,%s%s)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 945 | 945 | TWOINTER ? 2 : 1, |
| 946 | 946 | TWL, RWL, |
| 947 | 947 | ABT ? ( ABTEX ? "abort-ext," : "abort,") : "", |
| r5666 | r5667 | |
| 956 | 956 | else |
| 957 | 957 | { |
| 958 | 958 | /* transmitter data: last data */ |
| 959 | LOG(( "%f $%04x mc6854_w: push last-data=$%02X\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 959 | LOG(( "%f $%04x mc6854_w: push last-data=$%02X\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 960 | 960 | mc6854_tfifo_push( device, data ); |
| 961 | 961 | mc6854_tfifo_terminate( device ); |
| 962 | 962 | } |
| 963 | 963 | break; |
| 964 | 964 | |
| 965 | 965 | default: |
| 966 | logerror( "$%04x mc6854 invalid write offset %i (data=$%02X)\n", cpu_get_previouspc( device->machine->cpu | |
| 966 | logerror( "$%04x mc6854 invalid write offset %i (data=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu | |
| 967 | 967 | } |
| 968 | 968 | } |
| 969 | 969 |
| r5666 | r5667 | |
|---|---|---|
| 85 | 85 | if (offset > 0x24) |
| 86 | 86 | { |
| 87 | 87 | logerror("INS8154 (%08x): Read from unknown offset %02x!\n", |
| 88 | cpu_get_pc( device->machine->cpu | |
| 88 | cpu_get_pc( device->machine->firstcpu | |
| 89 | 89 | return 0xff; |
| 90 | 90 | } |
| 91 | 91 | |
| r5666 | r5667 | |
| 135 | 135 | i->intf->out_a_func(device, 0, (data & i->odra) | (i->odra ^ 0xff)); |
| 136 | 136 | else |
| 137 | 137 | logerror("INS8154 (%08x): Write to port A but no write handler defined!\n", |
| 138 | cpu_get_pc( device->machine->cpu | |
| 138 | cpu_get_pc( device->machine->firstcpu | |
| 139 | 139 | } |
| 140 | 140 | } |
| 141 | 141 | |
| r5666 | r5667 | |
| 153 | 153 | i->intf->out_b_func(device, 0, (data & i->odrb) | (i->odrb ^ 0xff)); |
| 154 | 154 | else |
| 155 | 155 | logerror("INS8154 (%08x): Write to port B but no write handler defined!\n", |
| 156 | cpu_get_pc( device->machine->cpu | |
| 156 | cpu_get_pc( device->machine->firstcpu | |
| 157 | 157 | } |
| 158 | 158 | } |
| 159 | 159 | |
| r5666 | r5667 | |
| 165 | 165 | if (offset > 0x24) |
| 166 | 166 | { |
| 167 | 167 | logerror("INS8154 (%04x): Write %02x to invalid offset %02x!\n", |
| 168 | cpu_get_pc( device->machine->cpu | |
| 168 | cpu_get_pc( device->machine->firstcpu | |
| 169 | 169 | return; |
| 170 | 170 | } |
| 171 | 171 | |
| r5666 | r5667 | |
| 181 | 181 | |
| 182 | 182 | case 0x22: |
| 183 | 183 | LOG(("INS8154 (%04x): ODR for port A set to %02x\n", |
| 184 | cpu_get_pc( device->machine->cpu | |
| 184 | cpu_get_pc( device->machine->firstcpu | |
| 185 | 185 | i->odra = data; |
| 186 | 186 | break; |
| 187 | 187 | |
| 188 | 188 | case 0x23: |
| 189 | 189 | LOG(("INS8154 (%04x): ODR for port B set to %02x\n", |
| 190 | cpu_get_pc( device->machine->cpu | |
| 190 | cpu_get_pc( device->machine->firstcpu | |
| 191 | 191 | i->odrb = data; |
| 192 | 192 | break; |
| 193 | 193 | |
| 194 | 194 | case 0x24: |
| 195 | 195 | LOG(("INS8154 (%04x): MDR set to %02x\n", |
| 196 | cpu_get_pc( device->machine->cpu | |
| 196 | cpu_get_pc( device->machine->firstcpu | |
| 197 | 197 | i->mdr = data; |
| 198 | 198 | break; |
| 199 | 199 |
| r5666 | r5667 | |
|---|---|---|
| 268 | 268 | case 0: |
| 269 | 269 | case 4: |
| 270 | 270 | LOG (( "$%04x %f: mc6846 CSR read $%02X intr=%i (timer=%i, cp1=%i, cp2=%i)\n", |
| 271 | cpu_get_previouspc( device->machine->cpu | |
| 271 | cpu_get_previouspc( device->machine->firstcpu | |
| 272 | 272 | mc6846->csr, (mc6846->csr >> 7) & 1, |
| 273 | 273 | mc6846->csr & 1, (mc6846->csr >> 1) & 1, (mc6846->csr >> 2) & 1 )); |
| 274 | 274 | mc6846->csr0_to_be_cleared = mc6846->csr & 1; |
| r5666 | r5667 | |
| 277 | 277 | return mc6846->csr; |
| 278 | 278 | |
| 279 | 279 | case 1: |
| 280 | LOG (( "$%04x %f: mc6846 PCR read $%02X\n", cpu_get_previouspc( device->machine->cpu | |
| 280 | LOG (( "$%04x %f: mc6846 PCR read $%02X\n", cpu_get_previouspc( device->machine->firstcpu | |
| 281 | 281 | return mc6846->pcr; |
| 282 | 282 | |
| 283 | 283 | case 2: |
| 284 | LOG (( "$%04x %f: mc6846 DDR read $%02X\n", cpu_get_previouspc( device->machine->cpu | |
| 284 | LOG (( "$%04x %f: mc6846 DDR read $%02X\n", cpu_get_previouspc( device->machine->firstcpu | |
| 285 | 285 | return mc6846->ddr; |
| 286 | 286 | |
| 287 | 287 | case 3: |
| 288 | LOG (( "$%04x %f: mc6846 PORT read $%02X\n", cpu_get_previouspc( device->machine->cpu | |
| 288 | LOG (( "$%04x %f: mc6846 PORT read $%02X\n", cpu_get_previouspc( device->machine->firstcpu | |
| 289 | 289 | if ( ! (mc6846->pcr & 0x80) ) |
| 290 | 290 | { |
| 291 | 291 | if ( mc6846->csr1_to_be_cleared ) |
| r5666 | r5667 | |
| 299 | 299 | return PORT; |
| 300 | 300 | |
| 301 | 301 | case 5: |
| 302 | LOG (( "$%04x %f: mc6846 TCR read $%02X\n",cpu_get_previouspc( device->machine->cpu | |
| 302 | LOG (( "$%04x %f: mc6846 TCR read $%02X\n",cpu_get_previouspc( device->machine->firstcpu | |
| 303 | 303 | return mc6846->tcr; |
| 304 | 304 | |
| 305 | 305 | case 6: |
| 306 | LOG (( "$%04x %f: mc6846 COUNTER hi read $%02X\n", cpu_get_previouspc( device->machine->cpu | |
| 306 | LOG (( "$%04x %f: mc6846 COUNTER hi read $%02X\n", cpu_get_previouspc( device->machine->firstcpu | |
| 307 | 307 | if ( mc6846->csr0_to_be_cleared ) |
| 308 | 308 | { |
| 309 | 309 | mc6846->csr &= ~1; |
| r5666 | r5667 | |
| 313 | 313 | return mc6846_counter( device ) >> 8; |
| 314 | 314 | |
| 315 | 315 | case 7: |
| 316 | LOG (( "$%04x %f: mc6846 COUNTER low read $%02X\n", cpu_get_previouspc( device->machine->cpu | |
| 316 | LOG (( "$%04x %f: mc6846 COUNTER low read $%02X\n", cpu_get_previouspc( device->machine->firstcpu | |
| 317 | 317 | if ( mc6846->csr0_to_be_cleared ) |
| 318 | 318 | { |
| 319 | 319 | mc6846->csr &= ~1; |
| r5666 | r5667 | |
| 323 | 323 | return mc6846_counter( device ) & 0xff; |
| 324 | 324 | |
| 325 | 325 | default: |
| 326 | logerror( "$%04x mc6846 invalid read offset %i\n", cpu_get_previouspc( device->machine->cpu | |
| 326 | logerror( "$%04x mc6846 invalid read offset %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 327 | 327 | } |
| 328 | 328 | return 0; |
| 329 | 329 | } |
| r5666 | r5667 | |
| 353 | 353 | "latcged,pos-edge", "latcged,pos-edge,intr" |
| 354 | 354 | }; |
| 355 | 355 | LOG (( "$%04x %f: mc6846 PCR write $%02X reset=%i cp2=%s cp1=%s\n", |
| 356 | cpu_get_previouspc( device->machine->cpu | |
| 356 | cpu_get_previouspc( device->machine->firstcpu | |
| 357 | 357 | (data >> 7) & 1, cp2[ (data >> 3) & 7 ], cp1[ data & 7 ] )); |
| 358 | 358 | |
| 359 | 359 | } |
| r5666 | r5667 | |
| 366 | 366 | mc6846_update_irq( device ); |
| 367 | 367 | } |
| 368 | 368 | if ( data & 4 ) |
| 369 | logerror( "$%04x mc6846 CP1 latching not implemented\n", cpu_get_previouspc( device->machine->cpu | |
| 369 | logerror( "$%04x mc6846 CP1 latching not implemented\n", cpu_get_previouspc( device->machine->firstcpu | |
| 370 | 370 | if (data & 0x20) |
| 371 | 371 | { |
| 372 | 372 | if (data & 0x10) |
| r5666 | r5667 | |
| 376 | 376 | mc6846->iface->out_cp2_func( device, 0, mc6846->cp2_cpu ); |
| 377 | 377 | } |
| 378 | 378 | else |
| 379 | logerror( "$%04x mc6846 acknowledge not implemented\n", cpu_get_previouspc( device->machine->cpu | |
| 379 | logerror( "$%04x mc6846 acknowledge not implemented\n", cpu_get_previouspc( device->machine->firstcpu | |
| 380 | 380 | } |
| 381 | 381 | break; |
| 382 | 382 | |
| 383 | 383 | case 2: |
| 384 | LOG (( "$%04x %f: mc6846 DDR write $%02X\n", cpu_get_previouspc( device->machine->cpu | |
| 384 | LOG (( "$%04x %f: mc6846 DDR write $%02X\n", cpu_get_previouspc( device->machine->firstcpu | |
| 385 | 385 | if ( ! (mc6846->pcr & 0x80) ) |
| 386 | 386 | { |
| 387 | 387 | mc6846->ddr = data; |
| r5666 | r5667 | |
| 391 | 391 | break; |
| 392 | 392 | |
| 393 | 393 | case 3: |
| 394 | LOG (( "$%04x %f: mc6846 PORT write $%02X (mask=$%02X)\n", cpu_get_previouspc( device->machine->cpu | |
| 394 | LOG (( "$%04x %f: mc6846 PORT write $%02X (mask=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu | |
| 395 | 395 | if ( ! (mc6846->pcr & 0x80) ) |
| 396 | 396 | { |
| 397 | 397 | mc6846->pdr = data; |
| r5666 | r5667 | |
| 400 | 400 | if ( mc6846->csr1_to_be_cleared && (mc6846->csr & 2) ) |
| 401 | 401 | { |
| 402 | 402 | mc6846->csr &= ~2; |
| 403 | LOG (( "$%04x %f: mc6846 CP1 intr reset\n", cpu_get_previouspc( device->machine->cpu | |
| 403 | LOG (( "$%04x %f: mc6846 CP1 intr reset\n", cpu_get_previouspc( device->machine->firstcpu | |
| 404 | 404 | } |
| 405 | 405 | if ( mc6846->csr2_to_be_cleared && (mc6846->csr & 4) ) |
| 406 | 406 | { |
| 407 | 407 | mc6846->csr &= ~4; |
| 408 | LOG (( "$%04x %f: mc6846 CP2 intr reset\n", cpu_get_previouspc( device->machine->cpu | |
| 408 | LOG (( "$%04x %f: mc6846 CP2 intr reset\n", cpu_get_previouspc( device->machine->firstcpu | |
| 409 | 409 | } |
| 410 | 410 | mc6846->csr1_to_be_cleared = 0; |
| 411 | 411 | mc6846->csr2_to_be_cleared = 0; |
| r5666 | r5667 | |
| 421 | 421 | "freq-cmp", "freq-cmp", "pulse-cmp", "pulse-cmp" |
| 422 | 422 | }; |
| 423 | 423 | LOG (( "$%04x %f: mc6846 TCR write $%02X reset=%i clock=%s scale=%i mode=%s out=%s\n", |
| 424 | cpu_get_previouspc( device->machine->cpu | |
| 424 | cpu_get_previouspc( device->machine->firstcpu | |
| 425 | 425 | (data >> 7) & 1, (data & 0x40) ? "extern" : "sys", |
| 426 | 426 | (data & 0x40) ? 1 : 8, mode[ (data >> 1) & 7 ], |
| 427 | 427 | (data & 1) ? "enabled" : "0" )); |
| r5666 | r5667 | |
| 455 | 455 | |
| 456 | 456 | case 7: |
| 457 | 457 | mc6846->latch = ( ((UINT16) mc6846->time_MSB) << 8 ) + data; |
| 458 | LOG (( "$%04x %f: mc6846 COUNT write %i\n", cpu_get_previouspc( device->machine->cpu | |
| 458 | LOG (( "$%04x %f: mc6846 COUNT write %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 459 | 459 | if (!(mc6846->tcr & 0x38)) |
| 460 | 460 | { |
| 461 | 461 | /* timer initialization */ |
| r5666 | r5667 | |
| 471 | 471 | break; |
| 472 | 472 | |
| 473 | 473 | default: |
| 474 | logerror( "$%04x mc6846 invalid write offset %i\n", cpu_get_previouspc( device->machine->cpu | |
| 474 | logerror( "$%04x mc6846 invalid write offset %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 475 | 475 | } |
| 476 | 476 | } |
| 477 | 477 |
| r5666 | r5667 | |
|---|---|---|
| 227 | 227 | if (port->out_func != NULL) |
| 228 | 228 | (*port->out_func)(device, data, olddata); |
| 229 | 229 | else |
| 230 | logerror("6530MIOT chip %s: Port %c is being written to but has no handler. PC: %08X - %02X\n", device->tag, 'A' + (offset & 1), cpu_get_pc(device->machine->cpu | |
| 230 | logerror("6530MIOT chip %s: Port %c is being written to but has no handler. PC: %08X - %02X\n", device->tag, 'A' + (offset & 1), cpu_get_pc(device->machine->firstcpu | |
| 231 | 231 | } |
| 232 | 232 | } |
| 233 | 233 | } |
| r5666 | r5667 | |
| 289 | 289 | port->in = (*port->in_func)(device, port->in); |
| 290 | 290 | } |
| 291 | 291 | else |
| 292 | logerror("6530MIOT chip %s: Port %c is being read but has no handler. PC: %08X\n", device->tag, 'A' + (offset & 1), cpu_get_pc(device->machine->cpu | |
| 292 | logerror("6530MIOT chip %s: Port %c is being read but has no handler. PC: %08X\n", device->tag, 'A' + (offset & 1), cpu_get_pc(device->machine->firstcpu | |
| 293 | 293 | |
| 294 | 294 | /* apply the DDR to the result */ |
| 295 | 295 | val = (out & port->ddr) | (port->in & ~port->ddr); |
| r5666 | r5667 | |
|---|---|---|
| 511 | 511 | { |
| 512 | 512 | command_name = hdc_command_names[cmd] ? hdc_command_names[cmd] : "Unknown"; |
| 513 | 513 | logerror("pc_hdc_command(): Executing command; pc=0x%08x cmd=0x%02x (%s) drv=%d\n", |
| 514 | (unsigned) cpu_get_reg(machine->cpu | |
| 514 | (unsigned) cpu_get_reg(machine->firstcpu | |
| 515 | 515 | } |
| 516 | 516 | |
| 517 | 517 | switch (cmd) |
| r5666 | r5667 | |
| 549 | 549 | if (LOG_HDC_STATUS) |
| 550 | 550 | { |
| 551 | 551 | logerror("hdc read pc=0x%08x INDEX #%d D:%d C:%d H:%d S:%d N:%d CTL:$%02x\n", |
| 552 | (unsigned) cpu_get_reg(machine->cpu | |
| 552 | (unsigned) cpu_get_reg(machine->firstcpu | |
| 553 | 553 | } |
| 554 | 554 | |
| 555 | 555 | if (test_ready(machine, n)) |
| r5666 | r5667 | |
| 564 | 564 | if (LOG_HDC_STATUS) |
| 565 | 565 | { |
| 566 | 566 | logerror("hdc write pc=0x%08x INDEX #%d D:%d C:%d H:%d S:%d N:%d CTL:$%02x\n", |
| 567 | (unsigned) cpu_get_reg(machine->cpu | |
| 567 | (unsigned) cpu_get_reg(machine->firstcpu | |
| 568 | 568 | } |
| 569 | 569 | |
| 570 | 570 | if (test_ready(machine, n)) |
| r5666 | r5667 | |
| 673 | 673 | if (--data_cnt == 0) |
| 674 | 674 | { |
| 675 | 675 | if (LOG_HDC_STATUS) |
| 676 | logerror("pc_hdc_data_w(): Launching command; pc=0x%08x\n", (unsigned) cpu_get_reg(machine->cpu | |
| 676 | logerror("pc_hdc_data_w(): Launching command; pc=0x%08x\n", (unsigned) cpu_get_reg(machine->firstcpu | |
| 677 | 677 | |
| 678 | 678 | status[n] &= ~STA_COMMAND; |
| 679 | 679 | status[n] &= ~STA_REQUEST; |
| r5666 | r5667 | |
| 715 | 715 | int irq = irq = (dip[n] & 0x40) ? 5 : 2; |
| 716 | 716 | |
| 717 | 717 | if (LOG_HDC_STATUS) |
| 718 | logerror("pc_hdc_control_w(): Control write pc=0x%08x data=%d\n", (unsigned) cpu_get_reg(machine->cpu | |
| 718 | logerror("pc_hdc_control_w(): Control write pc=0x%08x data=%d\n", (unsigned) cpu_get_reg(machine->firstcpu | |
| 719 | 719 | |
| 720 | 720 | hdc_control = data; |
| 721 | 721 | |
| r5666 | r5667 | |
| 797 | 797 | } |
| 798 | 798 | |
| 799 | 799 | if (LOG_HDC_CALL) |
| 800 | logerror("pc_HDC_r(): pc=%06X chip=%d offs=%d result=0x%02x\n", cpu_get_pc(machine->cpu | |
| 800 | logerror("pc_HDC_r(): pc=%06X chip=%d offs=%d result=0x%02x\n", cpu_get_pc(machine->firstcpu | |
| 801 | 801 | |
| 802 | 802 | return data; |
| 803 | 803 | } |
| r5666 | r5667 | |
| 807 | 807 | static void pc_HDC_w(running_machine *machine, int chip, offs_t offs, UINT8 data) |
| 808 | 808 | { |
| 809 | 809 | if (LOG_HDC_CALL) |
| 810 | logerror("pc_HDC_w(): pc=%06X chip=%d offs=%d data=0x%02x\n", cpu_get_pc(machine->cpu | |
| 810 | logerror("pc_HDC_w(): pc=%06X chip=%d offs=%d data=0x%02x\n", cpu_get_pc(machine->firstcpu | |
| 811 | 811 | |
| 812 | 812 | switch( offs ) |
| 813 | 813 | { |
| r5666 | r5667 | |
|---|---|---|
| 57 | 57 | device_reset(daisy->device); |
| 58 | 58 | |
| 59 | 59 | /* uninstall I/O handlers */ |
| 60 | memory_install_readwrite8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_INP, ABCBUS_OUT, 0x18, 0, SMH_NOP, SMH_NOP); | |
| 61 | memory_install_read8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_STAT, ABCBUS_STAT, 0x18, 0, SMH_NOP); | |
| 62 | memory_install_write8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_C1, ABCBUS_C1, 0x18, 0, SMH_NOP); | |
| 63 | memory_install_write8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_C2, ABCBUS_C2, 0x18, 0, SMH_NOP); | |
| 64 | memory_install_write8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_C3, ABCBUS_C3, 0x18, 0, SMH_NOP); | |
| 65 | memory_install_write8_handler(cpu_get_address_space(space->machine->cpu[0], ADDRESS_SPACE_IO), ABCBUS_C4, ABCBUS_C4, 0x18, 0, SMH_NOP); | |
| 60 | memory_install_readwrite8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_INP, ABCBUS_OUT, 0x18, 0, SMH_NOP, SMH_NOP); | |
| 61 | memory_install_read8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_STAT, ABCBUS_STAT, 0x18, 0, SMH_NOP); | |
| 62 | memory_install_write8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_C1, ABCBUS_C1, 0x18, 0, SMH_NOP); | |
| 63 | memory_install_write8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_C2, ABCBUS_C2, 0x18, 0, SMH_NOP); | |
| 64 | memory_install_write8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_C3, ABCBUS_C3, 0x18, 0, SMH_NOP); | |
| 65 | memory_install_write8_handler(cpu_get_address_space(space->machine->firstcpu, ADDRESS_SPACE_IO), ABCBUS_C4, ABCBUS_C4, 0x18, 0, SMH_NOP); | |
| 66 | 66 | |
| 67 | 67 | return 0xff; |
| 68 | 68 | } |
| r5666 | r5667 | |
|---|---|---|
| 379 | 379 | int reply = 0; |
| 380 | 380 | read8_space_func handler; |
| 381 | 381 | |
| 382 | cpu_adjust_icount(space->machine->cpu | |
| 382 | cpu_adjust_icount(space->machine->firstcpu | |
| 383 | 383 | |
| 384 | 384 | if (active_card != -1) |
| 385 | 385 | { |
| r5666 | r5667 | |
| 401 | 401 | { |
| 402 | 402 | write8_space_func handler; |
| 403 | 403 | |
| 404 | cpu_adjust_icount(space->machine->cpu | |
| 404 | cpu_adjust_icount(space->machine->firstcpu | |
| 405 | 405 | |
| 406 | 406 | /* simulate byte write */ |
| 407 | 407 | data = (tmp_buffer & ~mem_mask) | (data & mem_mask); |
| r5666 | r5667 | |
| 475 | 475 | int reply = 0; |
| 476 | 476 | read8_space_func handler; |
| 477 | 477 | |
| 478 | cpu_adjust_icount(space->machine->cpu | |
| 478 | cpu_adjust_icount(space->machine->firstcpu | |
| 479 | 479 | |
| 480 | 480 | if (active_card != -1) |
| 481 | 481 | { |
| r5666 | r5667 | |
| 494 | 494 | { |
| 495 | 495 | write8_space_func handler; |
| 496 | 496 | |
| 497 | cpu_adjust_icount(space->machine->cpu | |
| 497 | cpu_adjust_icount(space->machine->firstcpu | |
| 498 | 498 | |
| 499 | 499 | if (active_card != -1) |
| 500 | 500 | { |
| r5666 | r5667 | |
| 561 | 561 | int reply = 0; |
| 562 | 562 | read8_space_func handler; |
| 563 | 563 | |
| 564 | cpu_adjust_icount(space->machine->cpu | |
| 564 | cpu_adjust_icount(space->machine->firstcpu | |
| 565 | 565 | |
| 566 | 566 | if (active_card != -1) |
| 567 | 567 | { |
| r5666 | r5667 | |
| 580 | 580 | { |
| 581 | 581 | write8_space_func handler; |
| 582 | 582 | |
| 583 | cpu_adjust_icount(space->machine->cpu | |
| 583 | cpu_adjust_icount(space->machine->firstcpu | |
| 584 | 584 | |
| 585 | 585 | if (active_card != -1) |
| 586 | 586 | { |
| r5666 | r5667 | |
| 668 | 668 | |
| 669 | 669 | |
| 670 | 670 | if (active_card == -1) |
| 671 | cpu_adjust_icount(space->machine->cpu | |
| 671 | cpu_adjust_icount(space->machine->firstcpu | |
| 672 | 672 | else |
| 673 | 673 | { |
| 674 | 674 | |
| 675 | 675 | if (ti99_4p_expansion_ports[active_card].width == width_8bit) |
| 676 | 676 | { |
| 677 | cpu_adjust_icount(space->machine->cpu | |
| 677 | cpu_adjust_icount(space->machine->firstcpu | |
| 678 | 678 | |
| 679 | 679 | handler = ti99_4p_expansion_ports[active_card].w.width_8bit.mem_read; |
| 680 | 680 | if (handler) |
| r5666 | r5667 | |
| 685 | 685 | } |
| 686 | 686 | else |
| 687 | 687 | { |
| 688 | cpu_adjust_icount(space->machine->cpu | |
| 688 | cpu_adjust_icount(space->machine->firstcpu | |
| 689 | 689 | |
| 690 | 690 | handler16 = ti99_4p_expansion_ports[active_card].w.width_16bit.mem_read; |
| 691 | 691 | if (handler16) |
| r5666 | r5667 | |
| 717 | 717 | write16_space_func handler16; |
| 718 | 718 | |
| 719 | 719 | if (active_card == -1) |
| 720 | cpu_adjust_icount(space->machine->cpu | |
| 720 | cpu_adjust_icount(space->machine->firstcpu | |
| 721 | 721 | else |
| 722 | 722 | { |
| 723 | 723 | /* simulate byte write */ |
| r5666 | r5667 | |
| 725 | 725 | |
| 726 | 726 | if (ti99_4p_expansion_ports[active_card].width == width_8bit) |
| 727 | 727 | { |
| 728 | cpu_adjust_icount(space->machine->cpu | |
| 728 | cpu_adjust_icount(space->machine->firstcpu | |
| 729 | 729 | |
| 730 | 730 | handler = ti99_4p_expansion_ports[active_card].w.width_8bit.mem_write; |
| 731 | 731 | if (handler) |
| r5666 | r5667 | |
| 736 | 736 | } |
| 737 | 737 | else |
| 738 | 738 | { |
| 739 | cpu_adjust_icount(space->machine->cpu | |
| 739 | cpu_adjust_icount(space->machine->firstcpu | |
| 740 | 740 | |
| 741 | 741 | handler16 = ti99_4p_expansion_ports[active_card].w.width_16bit.mem_write; |
| 742 | 742 | if (handler16) |
| r5666 | r5667 | |
|---|---|---|
| 1667 | 1667 | fdc->FDC_main |= 0x10; /* set BUSY */ |
| 1668 | 1668 | |
| 1669 | 1669 | if (LOG_VERBOSE) |
| 1670 | logerror("nec765(): pc=0x%08x command=0x%02x\n", cpu_get_pc(device->machine->cpu | |
| 1670 | logerror("nec765(): pc=0x%08x command=0x%02x\n", cpu_get_pc(device->machine->firstcpu | |
| 1671 | 1671 | |
| 1672 | 1672 | /* seek in progress? */ |
| 1673 | 1673 | if (fdc->nec765_flags & NEC765_SEEK_ACTIVE) |
| r5666 | r5667 | |
| 1698 | 1698 | |
| 1699 | 1699 | case NEC765_COMMAND_PHASE_BYTES: |
| 1700 | 1700 | if (LOG_VERBOSE) |
| 1701 | logerror("nec765(): pc=0x%08x command=0x%02x\n", cpu_get_pc(device->machine->cpu | |
| 1701 | logerror("nec765(): pc=0x%08x command=0x%02x\n", cpu_get_pc(device->machine->firstcpu | |
| 1702 | 1702 | |
| 1703 | 1703 | fdc->nec765_command_bytes[fdc->nec765_transfer_bytes_count] = fdc->nec765_data_reg; |
| 1704 | 1704 | fdc->nec765_transfer_bytes_count++; |
| r5666 | r5667 | |
|---|---|---|
| 25 | 25 | |
| 26 | 26 | static void mpc105_update_memory(running_machine *machine) |
| 27 | 27 | { |
| 28 | int cpunum, bank; | |
| 28 | const device_config *cpu; | |
| 29 | int bank; | |
| 29 | 30 | offs_t begin, end; |
| 30 | 31 | |
| 31 | 32 | if (LOG_MPC105) |
| r5666 | r5667 | |
| 34 | 35 | if (mpc105->bank_base > 0) |
| 35 | 36 | { |
| 36 | 37 | /* TODO: Fix me properly! changing all cpus???? */ |
| 37 | for (cpu | |
| 38 | for (cpu = cpu_first(machine->config); cpu != NULL; cpu | |
| 38 | 39 | { |
| 39 | const address_space *space = cpu_get_address_space( | |
| 40 | const address_space *space = cpu_get_address_space( | |
| 40 | 41 | |
| 41 | 42 | /* first clear everything out */ |
| 42 | 43 | memory_install_read64_handler(space, 0x00000000, 0x3FFFFFFF, 0, 0, SMH_NOP); |
| r5666 | r5667 | |
| 65 | 66 | if (mpc105->bank_base > 0) |
| 66 | 67 | { |
| 67 | 68 | /* TODO: Fix me properly! changing all cpus??? */ |
| 68 | for (cpu | |
| 69 | for (cpu = cpu_first(machine->config); cpu != NULL; cpu | |
| 69 | 70 | { |
| 70 | const address_space *space = cpu_get_address_space( | |
| 71 | const address_space *space = cpu_get_address_space( | |
| 71 | 72 | |
| 72 | 73 | memory_install_read64_handler(space, begin, end, |
| 73 | 74 | 0, 0, (read64_space_func) (FPTR)(bank + mpc105->bank_base)); |
| r5666 | r5667 | |
|---|---|---|
| 7 | 7 | **********************************************************************/ |
| 8 | 8 | |
| 9 | 9 | #include "driver.h" |
| 10 | #include "mslegacy.h" | |
| 10 | 11 | #include "pc_turbo.h" |
| 11 | 12 | |
| 12 | 13 | |
| r5666 | r5667 | |
| 32 | 33 | if (val != ti->cur_val) |
| 33 | 34 | { |
| 34 | 35 | ti->cur_val = val; |
| 35 | cpu_set_clockscale(machine | |
| 36 | cpu_set_clockscale(cpu_get_by_index(machine, | |
| 36 | 37 | } |
| 37 | 38 | } |
| 38 | 39 |
| r5666 | r5667 | |
|---|---|---|
| 103 | 103 | |
| 104 | 104 | static void intel82439tx_configure_memory(running_machine *machine, UINT8 val, offs_t begin, offs_t end, int read_bank, write32_space_func wh) |
| 105 | 105 | { |
| 106 | const address_space* space = cpu_get_address_space(machine->cpu | |
| 106 | const address_space* space = cpu_get_address_space(machine->firstcpu | |
| 107 | 107 | memory_install_read_handler(space, begin, end, 0, 0, read_bank); |
| 108 | 108 | if (val & 0x01) |
| 109 | 109 | memory_set_bankptr(machine, read_bank, i82439tx->bios_ram + (begin - 0xC0000) / 4); |
| r5666 | r5667 | |
| 199 | 199 | } |
| 200 | 200 | |
| 201 | 201 | /* hack to compensate for weird issue (maybe the Pentium core needs to support caching? */ |
| 202 | if ((cpu_get_reg(machine->cpu | |
| 202 | if ((cpu_get_reg(machine->firstcpu | |
| 203 | 203 | { |
| 204 | 204 | memory_region(machine, "user1")[0x3CB01] = 0xF3; |
| 205 | 205 | memory_region(machine, "user1")[0x3CB02] = 0xA4; |
| r5666 | r5667 | |
|---|---|---|
| 142 | 142 | { |
| 143 | 143 | UINT8 reply; |
| 144 | 144 | |
| 145 | cpu_adjust_icount(space->machine->cpu | |
| 145 | cpu_adjust_icount(space->machine->firstcpu | |
| 146 | 146 | |
| 147 | 147 | if (offset & 2) |
| 148 | 148 | { |
| r5666 | r5667 | |
| 171 | 171 | */ |
| 172 | 172 | static WRITE8_HANDLER ( ti99_pcode_grom_w ) |
| 173 | 173 | { |
| 174 | cpu_adjust_icount(space->machine->cpu | |
| 174 | cpu_adjust_icount(space->machine->firstcpu | |
| 175 | 175 | |
| 176 | 176 | if (offset & 2) |
| 177 | 177 | { |
| r5666 | r5667 | |
|---|---|---|
| 8 | 8 | **********************************************************************/ |
| 9 | 9 | |
| 10 | 10 | #include "driver.h" |
| 11 | #include "mslegacy.h" | |
| 11 | 12 | #include "cpu/m68000/m68000.h" |
| 12 | 13 | #include "includes/mc68328.h" |
| 13 | 14 | #include "mc68328.h" |
| r5666 | r5667 | |
| 30 | 31 | static void mc68328_set_interrupt_line(const device_config *device, UINT32 line, UINT32 active) |
| 31 | 32 | { |
| 32 | 33 | mc68328_t* mc68328 = mc68328_get_safe_token( device ); |
| 34 | const device_config *cpu = cpu_get_by_index(device->machine, mc68328->iface->parent_m68k_cpu_index); | |
| 33 | 35 | |
| 34 | 36 | if(active) |
| 35 | 37 | { |
| r5666 | r5667 | |
| 41 | 43 | |
| 42 | 44 | if(mc68328->regs.isr & INT_M68K_LINE7) |
| 43 | 45 | { |
| 44 | cpu_set_input_line_and_vector( | |
| 46 | cpu_set_input_line_and_vector( | |
| 45 | 47 | } |
| 46 | 48 | else if(mc68328->regs.isr & INT_M68K_LINE6) |
| 47 | 49 | { |
| 48 | cpu_set_input_line_and_vector( | |
| 50 | cpu_set_input_line_and_vector( | |
| 49 | 51 | } |
| 50 | 52 | else if(mc68328->regs.isr & INT_M68K_LINE5) |
| 51 | 53 | { |
| 52 | cpu_set_input_line_and_vector( | |
| 54 | cpu_set_input_line_and_vector( | |
| 53 | 55 | } |
| 54 | 56 | else if(mc68328->regs.isr & INT_M68K_LINE4) |
| 55 | 57 | { |
| 56 | cpu_set_input_line_and_vector( | |
| 58 | cpu_set_input_line_and_vector( | |
| 57 | 59 | } |
| 58 | 60 | else if(mc68328->regs.isr & INT_M68K_LINE3) |
| 59 | 61 | { |
| 60 | cpu_set_input_line_and_vector( | |
| 62 | cpu_set_input_line_and_vector( | |
| 61 | 63 | } |
| 62 | 64 | else if(mc68328->regs.isr & INT_M68K_LINE2) |
| 63 | 65 | { |
| 64 | cpu_set_input_line_and_vector( | |
| 66 | cpu_set_input_line_and_vector( | |
| 65 | 67 | } |
| 66 | 68 | else if(mc68328->regs.isr & INT_M68K_LINE1) |
| 67 | 69 | { |
| 68 | cpu_set_input_line_and_vector( | |
| 70 | cpu_set_input_line_and_vector( | |
| 69 | 71 | } |
| 70 | 72 | } |
| 71 | 73 | } |
| r5666 | r5667 | |
| 75 | 77 | |
| 76 | 78 | if((line & INT_M68K_LINE7) && !(mc68328->regs.isr & INT_M68K_LINE7)) |
| 77 | 79 | { |
| 78 | cpu_set_input_line( | |
| 80 | cpu_set_input_line( | |
| 79 | 81 | } |
| 80 | 82 | if((line & INT_M68K_LINE6) && !(mc68328->regs.isr & INT_M68K_LINE6)) |
| 81 | 83 | { |
| 82 | cpu_set_input_line( | |
| 84 | cpu_set_input_line( | |
| 83 | 85 | } |
| 84 | 86 | if((line & INT_M68K_LINE5) && !(mc68328->regs.isr & INT_M68K_LINE5)) |
| 85 | 87 | { |
| 86 | cpu_set_input_line( | |
| 88 | cpu_set_input_line( | |
| 87 | 89 | } |
| 88 | 90 | if((line & INT_M68K_LINE4) && !(mc68328->regs.isr & INT_M68K_LINE4)) |
| 89 | 91 | { |
| 90 | cpu_set_input_line( | |
| 92 | cpu_set_input_line( | |
| 91 | 93 | } |
| 92 | 94 | if((line & INT_M68K_LINE3) && !(mc68328->regs.isr & INT_M68K_LINE3)) |
| 93 | 95 | { |
| 94 | cpu_set_input_line( | |
| 96 | cpu_set_input_line( | |
| 95 | 97 | } |
| 96 | 98 | if((line & INT_M68K_LINE2) && !(mc68328->regs.isr & INT_M68K_LINE2)) |
| 97 | 99 | { |
| 98 | cpu_set_input_line( | |
| 100 | cpu_set_input_line( | |
| 99 | 101 | } |
| 100 | 102 | if((line & INT_M68K_LINE1) && !(mc68328->regs.isr & INT_M68K_LINE1)) |
| 101 | 103 | { |
| 102 | cpu_set_input_line( | |
| 104 | cpu_set_input_line( | |
| 103 | 105 | } |
| 104 | 106 | } |
| 105 | 107 | } |
| r5666 | r5667 | |
|---|---|---|
| 459 | 459 | } |
| 460 | 460 | |
| 461 | 461 | if (LOG_FDC) |
| 462 | logerror("pc_fdc_r(): pc=0x%08x offset=%d result=0x%02X\n", (unsigned) cpu_get_reg(space->machine->cpu | |
| 462 | logerror("pc_fdc_r(): pc=0x%08x offset=%d result=0x%02X\n", (unsigned) cpu_get_reg(space->machine->firstcpu | |
| 463 | 463 | return data; |
| 464 | 464 | } |
| 465 | 465 | |
| r5666 | r5667 | |
| 468 | 468 | WRITE8_HANDLER ( pc_fdc_w ) |
| 469 | 469 | { |
| 470 | 470 | if (LOG_FDC) |
| 471 | logerror("pc_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(space->machine->cpu | |
| 471 | logerror("pc_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(space->machine->firstcpu | |
| 472 | 472 | |
| 473 | 473 | switch(offset) |
| 474 | 474 | { |
| r5666 | r5667 | |
| 507 | 507 | WRITE8_HANDLER ( pcjr_fdc_w ) |
| 508 | 508 | { |
| 509 | 509 | if (LOG_FDC) |
| 510 | logerror("pcjr_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(space->machine->cpu | |
| 510 | logerror("pcjr_fdc_w(): pc=0x%08x offset=%d data=0x%02X\n", (unsigned) cpu_get_reg(space->machine->firstcpu | |
| 511 | 511 | |
| 512 | 512 | switch(offset) |
| 513 | 513 | { |
| r5666 | r5667 | |
|---|---|---|
| 430 | 430 | int cmd = mc6843->CMR & 0x0f; |
| 431 | 431 | |
| 432 | 432 | LOG(( "%f $%04x mc6843_r: data input cmd=%s(%i), pos=%i/%i, GCR=%i, ", |
| 433 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 433 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 434 | 434 | mc6843_cmd[cmd], cmd, mc6843->data_idx, |
| 435 | 435 | mc6843->data_size, mc6843->GCR )); |
| 436 | 436 | |
| r5666 | r5667 | |
| 483 | 483 | { |
| 484 | 484 | /* XXX TODO: other read modes */ |
| 485 | 485 | data = mc6843->data[0]; |
| 486 | logerror( "$%04x mc6843 read in unsupported command mode %i\n", cpu_get_previouspc( device->machine->cpu | |
| 486 | logerror( "$%04x mc6843 read in unsupported command mode %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 487 | 487 | } |
| 488 | 488 | |
| 489 | 489 | LOG(( "data=%02X\n", data )); |
| r5666 | r5667 | |
| 494 | 494 | case 1: /* Current-Track Address Register (CTAR) */ |
| 495 | 495 | data = mc6843->CTAR; |
| 496 | 496 | LOG(( "%f $%04x mc6843_r: read CTAR %i (actual=%i)\n", |
| 497 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 497 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 498 | 498 | floppy_drive_get_current_track( mc6843_floppy_image( device ) ) )); |
| 499 | 499 | break; |
| 500 | 500 | |
| 501 | 501 | case 2: /* Interrupt Status Register (ISR) */ |
| 502 | 502 | data = mc6843->ISR; |
| 503 | 503 | LOG(( "%f $%04x mc6843_r: read ISR %02X: cmd=%scomplete settle=%scomplete sense-rq=%i STRB=%i\n", |
| 504 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 504 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 505 | 505 | (data & 1) ? "" : "not-" , (data & 2) ? "" : "not-", |
| 506 | 506 | (data >> 2) & 1, (data >> 3) & 1 )); |
| 507 | 507 | |
| r5666 | r5667 | |
| 527 | 527 | |
| 528 | 528 | data = mc6843->STRA; |
| 529 | 529 | LOG(( "%f $%04x mc6843_r: read STRA %02X: data-rq=%i del-dta=%i ready=%i t0=%i wp=%i trk-dif=%i idx=%i busy=%i\n", |
| 530 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 530 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 531 | 531 | data & 1, (data >> 1) & 1, (data >> 2) & 1, (data >> 3) & 1, |
| 532 | 532 | (data >> 4) & 1, (data >> 5) & 1, (data >> 6) & 1, (data >> 7) & 1 )); |
| 533 | 533 | break; |
| r5666 | r5667 | |
| 536 | 536 | case 4: /* Status Register B (STRB) */ |
| 537 | 537 | data = mc6843->STRB; |
| 538 | 538 | LOG(( "%f $%04x mc6843_r: read STRB %02X: data-err=%i CRC-err=%i dta--mrk-err=%i sect-mrk-err=%i seek-err=%i fi=%i wr-err=%i hard-err=%i\n", |
| 539 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 539 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 540 | 540 | data & 1, (data >> 1) & 1, (data >> 2) & 1, (data >> 3) & 1, |
| 541 | 541 | (data >> 4) & 1, (data >> 5) & 1, (data >> 6) & 1, (data >> 7) & 1 )); |
| 542 | 542 | |
| r5666 | r5667 | |
| 548 | 548 | case 7: /* Logical-Track Address Register (LTAR) */ |
| 549 | 549 | data = mc6843->LTAR; |
| 550 | 550 | LOG(( "%f $%04x mc6843_r: read LTAR %i (actual=%i)\n", |
| 551 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 551 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 552 | 552 | floppy_drive_get_current_track( mc6843_floppy_image( device ) ) )); |
| 553 | 553 | break; |
| 554 | 554 | |
| 555 | 555 | default: |
| 556 | logerror( "$%04x mc6843 invalid read offset %i\n", cpu_get_previouspc( device->machine->cpu | |
| 556 | logerror( "$%04x mc6843 invalid read offset %i\n", cpu_get_previouspc( device->machine->firstcpu | |
| 557 | 557 | } |
| 558 | 558 | |
| 559 | 559 | return data; |
| r5666 | r5667 | |
| 570 | 570 | int FWF = (mc6843->CMR >> 4) & 1; |
| 571 | 571 | |
| 572 | 572 | LOG(( "%f $%04x mc6843_w: data output cmd=%s(%i), pos=%i/%i, GCR=%i, data=%02X\n", |
| 573 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 573 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 574 | 574 | mc6843_cmd[cmd], cmd, mc6843->data_idx, |
| 575 | 575 | mc6843->data_size, mc6843->GCR, data )); |
| 576 | 576 | |
| r5666 | r5667 | |
| 587 | 587 | /* end of sector write */ |
| 588 | 588 | const device_config* img = mc6843_floppy_image( device ); |
| 589 | 589 | |
| 590 | LOG(( "%f $%04x mc6843_w: write sector %i\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 590 | LOG(( "%f $%04x mc6843_w: write sector %i\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 591 | 591 | |
| 592 | 592 | floppy_drive_write_sector_data( |
| 593 | 593 | img, mc6843->side, mc6843->data_id, |
| r5666 | r5667 | |
| 651 | 651 | UINT8 track = mc6843->data[1]; |
| 652 | 652 | UINT8 sector = mc6843->data[3]; |
| 653 | 653 | UINT8 filler = 0xe5; /* standard Thomson filler */ |
| 654 | LOG(( "%f $%04x mc6843_w: address id detected track=%i sector=%i\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 654 | LOG(( "%f $%04x mc6843_w: address id detected track=%i sector=%i\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 655 | 655 | floppy_drive_format_sector( img, mc6843->side, sector, track, 0, sector, 0, filler ); |
| 656 | 656 | } |
| 657 | 657 | else |
| r5666 | r5667 | |
| 673 | 673 | else |
| 674 | 674 | { |
| 675 | 675 | /* XXX TODO: other write modes */ |
| 676 | logerror( "$%04x mc6843 write %02X in unsupported command mode %i (FWF=%i)\n", cpu_get_previouspc( device->machine->cpu | |
| 676 | logerror( "$%04x mc6843 write %02X in unsupported command mode %i (FWF=%i)\n", cpu_get_previouspc( device->machine->firstcpu | |
| 677 | 677 | } |
| 678 | 678 | break; |
| 679 | 679 | } |
| r5666 | r5667 | |
| 681 | 681 | case 1: /* Current-Track Address Register (CTAR) */ |
| 682 | 682 | mc6843->CTAR = data & 0x7f; |
| 683 | 683 | LOG(( "%f $%04x mc6843_w: set CTAR to %i %02X (actual=%i) \n", |
| 684 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 684 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 685 | 685 | floppy_drive_get_current_track( mc6843_floppy_image( device ) ) )); |
| 686 | 686 | break; |
| 687 | 687 | |
| r5666 | r5667 | |
| 690 | 690 | int cmd = data & 15; |
| 691 | 691 | |
| 692 | 692 | LOG(( "%f $%04x mc6843_w: set CMR to $%02X: cmd=%s(%i) FWF=%i DMA=%i ISR3-intr=%i fun-intr=%i\n", |
| 693 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 693 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 694 | 694 | data, mc6843_cmd[cmd], cmd, (data >> 4) & 1, (data >> 5) & 1, |
| 695 | 695 | (data >> 6) & 1, (data >> 7) & 1 )); |
| 696 | 696 | |
| r5666 | r5667 | |
| 737 | 737 | |
| 738 | 738 | /* assume CLK freq = 1MHz (IBM 3740 compatibility) */ |
| 739 | 739 | LOG(( "%f $%04x mc6843_w: set SUR to $%02X: head settling time=%fms, track-to-track seek time=%f\n", |
| 740 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 740 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 741 | 741 | data, 4.096 * (data & 15), 1.024 * ((data >> 4) & 15) )); |
| 742 | 742 | break; |
| 743 | 743 | |
| 744 | 744 | case 4: /* Sector Address Register (SAR) */ |
| 745 | 745 | mc6843->SAR = data & 0x1f; |
| 746 | LOG(( "%f $%04x mc6843_w: set SAR to %i (%02X)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 746 | LOG(( "%f $%04x mc6843_w: set SAR to %i (%02X)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 747 | 747 | break; |
| 748 | 748 | |
| 749 | 749 | case 5: /* General Count Register (GCR) */ |
| 750 | 750 | mc6843->GCR = data & 0x7f; |
| 751 | LOG(( "%f $%04x mc6843_w: set GCR to %i (%02X)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 751 | LOG(( "%f $%04x mc6843_w: set GCR to %i (%02X)\n", attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 752 | 752 | break; |
| 753 | 753 | |
| 754 | 754 | case 6: /* CRC Control Register (CCR) */ |
| 755 | 755 | mc6843->CCR = data & 3; |
| 756 | 756 | LOG(( "%f $%04x mc6843_w: set CCR to %02X: CRC=%s shift=%i\n", |
| 757 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 757 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 758 | 758 | (data & 1) ? "enabled" : "disabled", (data >> 1) & 1 )); |
| 759 | 759 | break; |
| 760 | 760 | |
| 761 | 761 | case 7: /* Logical-Track Address Register (LTAR) */ |
| 762 | 762 | mc6843->LTAR = data & 0x7f; |
| 763 | 763 | LOG(( "%f $%04x mc6843_w: set LTAR to %i %02X (actual=%i)\n", |
| 764 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->cpu | |
| 764 | attotime_to_double(timer_get_time(device->machine)), cpu_get_previouspc( device->machine->firstcpu | |
| 765 | 765 | floppy_drive_get_current_track( mc6843_floppy_image( device ) ) )); |
| 766 | 766 | break; |
| 767 | 767 | |
| 768 | 768 | default: |
| 769 | logerror( "$%04x mc6843 invalid write offset %i (data=$%02X)\n", cpu_get_previouspc( device->machine->cpu | |
| 769 | logerror( "$%04x mc6843 invalid write offset %i (data=$%02X)\n", cpu_get_previouspc( device->machine->firstcpu | |
| 770 | 770 | } |
| 771 | 771 | } |
| 772 | 772 |
| r5666 | r5667 | |
|---|---|---|
| 5 | 5 | */ |
| 6 | 6 | |
| 7 | 7 | #include "machine/hd63450.h" |
| 8 | #include "mslegacy.h" | |
| 8 | 9 | |
| 9 | 10 | typedef struct _hd63450_regs hd63450_regs; |
| 10 | 11 | struct _hd63450_regs |
| r5666 | r5667 | |
| 231 | 232 | |
| 232 | 233 | static void dma_transfer_start(const device_config* device, int channel, int dir) |
| 233 | 234 | { |
| 234 | const address_space *space = cpu_get_address_space(device->machine->cpu | |
| 235 | const address_space *space = cpu_get_address_space(device->machine->firstcpu | |
| 235 | 236 | hd63450_t* dmac = device->token; |
| 236 | 237 | dmac->in_progress[channel] = 1; |
| 237 | 238 | dmac->reg[channel].csr &= ~0xe0; |
| r5666 | r5667 | |
| 249 | 250 | // Burst transfers will halt the CPU until the transfer is complete |
| 250 | 251 | if((dmac->reg[channel].dcr & 0xc0) == 0x00) // Burst transfer |
| 251 | 252 | { |
| 252 | cpu_set_input_line(device->machine | |
| 253 | cpu_set_input_line(cpu_get_by_index(device->machine, | |
| 253 | 254 | timer_adjust_periodic(dmac->timer[channel], attotime_zero, channel, dmac->burst_clock[channel]); |
| 254 | 255 | } |
| 255 | 256 | else |
| r5666 | r5667 | |
| 307 | 308 | |
| 308 | 309 | void hd63450_single_transfer(const device_config* device, int x) |
| 309 | 310 | { |
| 310 | const address_space *space = cpu_get_address_space(device->machine->cpu | |
| 311 | const address_space *space = cpu_get_address_space(device->machine->firstcpu | |
| 311 | 312 | int data; |
| 312 | 313 | int datasize = 1; |
| 313 | 314 | hd63450_t* dmac = device->token; |
| r5666 | r5667 | |
| 427 | 428 | dmac->reg[x].csr |= 0xe0; // channel operation complete, block transfer complete |
| 428 | 429 | dmac->reg[x].csr &= ~0x08; // channel no longer active |
| 429 | 430 | if((dmac->reg[x].dcr & 0xc0) == 0x00) // Burst transfer |
| 430 | cpu_set_input_line(device->machine | |
| 431 | cpu_set_input_line(cpu_get_by_index(device->machine, | |
| 431 | 432 | |
| 432 | 433 | if(dmac->intf->dma_end) |
| 433 | 434 | dmac->intf->dma_end(device->machine,x,dmac->reg[x].ccr & 0x08); |
| r5666 | r5667 | |
|---|---|---|
| 116 | 116 | offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16) |
| 117 | 117 | & 0x0F0000; |
| 118 | 118 | |
| 119 | result = memory_read_byte( cpu_get_address_space( device->machine->cpu | |
| 119 | result = memory_read_byte( cpu_get_address_space( device->machine->firstcpu | |
| 120 | 120 | return result; |
| 121 | 121 | } |
| 122 | 122 | |
| r5666 | r5667 | |
| 126 | 126 | offs_t page_offset = (((offs_t) dma_offset[0][channel]) << 16) |
| 127 | 127 | & 0x0F0000; |
| 128 | 128 | |
| 129 | memory_write_byte( cpu_get_address_space( device->machine->cpu | |
| 129 | memory_write_byte( cpu_get_address_space( device->machine->firstcpu | |
| 130 | 130 | } |
| 131 | 131 | |
| 132 | 132 | |
| r5666 | r5667 | |
| 189 | 189 | |
| 190 | 190 | static PIC8259_SET_INT_LINE( pc_pic8259_set_int_line ) |
| 191 | 191 | { |
| 192 | cpu_set_input_line(device->machine->cpu | |
| 192 | cpu_set_input_line(device->machine->firstcpu | |
| 193 | 193 | } |
| 194 | 194 | |
| 195 | 195 | |
| r5666 | r5667 | |
| 219 | 219 | |
| 220 | 220 | static TIMER_CALLBACK( pcjr_delayed_pic8259_irq ) |
| 221 | 221 | { |
| 222 | cpu_set_input_line(machine->cpu | |
| 222 | cpu_set_input_line(machine->firstcpu | |
| 223 | 223 | } |
| 224 | 224 | |
| 225 | 225 | |
| 226 | 226 | static PIC8259_SET_INT_LINE( pcjr_pic8259_set_int_line ) |
| 227 | 227 | { |
| 228 | if ( cpu_get_reg( device->machine->cpu | |
| 228 | if ( cpu_get_reg( device->machine->firstcpu | |
| 229 | 229 | { |
| 230 | timer_adjust_oneshot( pc_int_delay_timer, cpu_clocks_to_attotime(device->machine->cpu | |
| 230 | timer_adjust_oneshot( pc_int_delay_timer, cpu_clocks_to_attotime(device->machine->firstcpu | |
| 231 | 231 | } |
| 232 | 232 | else |
| 233 | 233 | { |
| 234 | cpu_set_input_line(device->machine->cpu | |
| 234 | cpu_set_input_line(device->machine->firstcpu | |
| 235 | 235 | } |
| 236 | 236 | } |
| 237 | 237 | |
| r5666 | r5667 | |
| 530 | 530 | pcjr_keyb.latch = 1; |
| 531 | 531 | if ( nmi_enabled & 0x80 ) |
| 532 | 532 | { |
| 533 | cpu_set_input_line( pc_devices.pit8253->machine->cpu | |
| 533 | cpu_set_input_line( pc_devices.pit8253->machine->firstcpu | |
| 534 | 534 | } |
| 535 | 535 | } |
| 536 | 536 | } |
| r5666 | r5667 | |
| 767 | 767 | |
| 768 | 768 | pc_ppi.clock_signal = ( pc_ppi.keyb_clock ) ? 1 : 0; |
| 769 | 769 | |
| 770 | pc_ppi.clock_callback( cpu_get_address_space( device->machine->cpu | |
| 770 | pc_ppi.clock_callback( cpu_get_address_space( device->machine->firstcpu | |
| 771 | 771 | |
| 772 | 772 | /* If PB7 is set clear the shift register and reset the IRQ line */ |
| 773 | 773 | if ( pc_ppi.keyboard_clear ) |
| r5666 | r5667 | |
| 919 | 919 | pc_speaker_set_spkrdata( device->machine, data & 0x02 ); |
| 920 | 920 | |
| 921 | 921 | pc_ppi.clock_signal = ( pc_ppi.keyb_clock ) ? 1 : 0; |
| 922 | pc_ppi.clock_callback( cpu_get_address_space( device->machine->cpu | |
| 922 | pc_ppi.clock_callback( cpu_get_address_space( device->machine->firstcpu | |
| 923 | 923 | |
| 924 | 924 | /* If PB7 is set clear the shift register and reset the IRQ line */ |
| 925 | 925 | if ( pc_ppi.keyboard_clear ) |
| r5666 | r5667 | |
| 1230 | 1230 | |
| 1231 | 1231 | DRIVER_INIT( pc200 ) |
| 1232 | 1232 | { |
| 1233 | const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM ); | |
| 1234 | const address_space *io_space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_IO ); | |
| 1233 | const address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_PROGRAM ); | |
| 1234 | const address_space *io_space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_IO ); | |
| 1235 | 1235 | UINT8 *gfx = &memory_region(machine, "gfx1")[0x8000]; |
| 1236 | 1236 | int i; |
| 1237 | 1237 | |
| r5666 | r5667 | |
| 1250 | 1250 | |
| 1251 | 1251 | DRIVER_INIT( pc1512 ) |
| 1252 | 1252 | { |
| 1253 | const address_space *space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_PROGRAM ); | |
| 1254 | const address_space *io_space = cpu_get_address_space( machine->cpu[0], ADDRESS_SPACE_IO ); | |
| 1253 | const address_space *space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_PROGRAM ); | |
| 1254 | const address_space *io_space = cpu_get_address_space( machine->firstcpu, ADDRESS_SPACE_IO ); | |
| 1255 | 1255 | UINT8 *gfx = &memory_region(machine, "gfx1")[0x8000]; |
| 1256 | 1256 | int i; |
| 1257 | 1257 | |
| r5666 | r5667 | |
| 1279 | 1279 | |
| 1280 | 1280 | static void pc_map_vga_memory(running_machine *machine, offs_t begin, offs_t end, read8_space_func rh, write8_space_func wh) |
| 1281 | 1281 | { |
| 1282 | const address_space *space = cpu_get_address_space( machine->cpu | |
| 1282 | const address_space *space = cpu_get_address_space( machine->firstcpu | |
| 1283 | 1283 | int buswidth; |
| 1284 | buswidth = cpu_get_databus_width(machine->cpu | |
| 1284 | buswidth = cpu_get_databus_width(machine->firstcpu | |
| 1285 | 1285 | switch(buswidth) |
| 1286 | 1286 | { |
| 1287 | 1287 | case 8: |
| r5666 | r5667 | |
| 1316 | 1316 | |
| 1317 | 1317 | DRIVER_INIT( pc1640 ) |
| 1318 | 1318 | { |
| 1319 | const address_space *io_space = cpu_get_address_space( machine->cpu | |
| 1319 | const address_space *io_space = cpu_get_address_space( machine->firstcpu | |
| 1320 | 1320 | |
| 1321 | 1321 | memory_install_read16_handler(io_space, 0x278, 0x27b, 0, 0, pc1640_16le_port278_r ); |
| 1322 | 1322 | memory_install_read16_handler(io_space, 0x4278, 0x427b, 0, 0, pc1640_16le_port4278_r ); |
| r5666 | r5667 | |
|---|---|---|
| 702 | 702 | READ16_HANDLER ( ti99_nop_8_r ) |
| 703 | 703 | { |
| 704 | 704 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 705 | // cpu_spinuntil_time(space->machine->cpu | |
| 705 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 706 | 706 | |
| 707 | 707 | return (0); |
| 708 | 708 | } |
| r5666 | r5667 | |
| 710 | 710 | WRITE16_HANDLER ( ti99_nop_8_w ) |
| 711 | 711 | { |
| 712 | 712 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 713 | // cpu_spinuntil_time(space->machine->cpu | |
| 713 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 714 | 714 | } |
| 715 | 715 | |
| 716 | 716 | /* |
| r5666 | r5667 | |
| 722 | 722 | return ti99_4p_internal_ROM6[offset]; |
| 723 | 723 | |
| 724 | 724 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 725 | // cpu_spinuntil_time(space->machine->cpu | |
| 725 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 726 | 726 | |
| 727 | 727 | if (hsgpl_crdena) |
| 728 | 728 | /* hsgpl is enabled */ |
| r5666 | r5667 | |
| 740 | 740 | } |
| 741 | 741 | |
| 742 | 742 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 743 | // cpu_spinuntil_time(space->machine->cpu | |
| 743 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 744 | 744 | |
| 745 | 745 | if (hsgpl_crdena) |
| 746 | 746 | /* hsgpl is enabled */ |
| r5666 | r5667 | |
| 783 | 783 | WRITE16_HANDLER ( ti99_wsnd_w ) |
| 784 | 784 | { |
| 785 | 785 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 786 | // cpu_spinuntil_time(space->machine->cpu | |
| 786 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 787 | 787 | |
| 788 | 788 | sn76496_w(devtag_get_device(space->machine, "sn76496"), offset, (data >> 8) & 0xff); |
| 789 | 789 | } |
| r5666 | r5667 | |
| 794 | 794 | READ16_HANDLER ( ti99_rvdp_r ) |
| 795 | 795 | { |
| 796 | 796 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 797 | // cpu_spinuntil_time(space->machine->cpu | |
| 797 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 798 | 798 | |
| 799 | 799 | if (offset & 1) |
| 800 | 800 | { /* read VDP status */ |
| r5666 | r5667 | |
| 812 | 812 | WRITE16_HANDLER ( ti99_wvdp_w ) |
| 813 | 813 | { |
| 814 | 814 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 815 | // cpu_spinuntil_time(space->machine->cpu | |
| 815 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 816 | 816 | |
| 817 | 817 | if (offset & 1) |
| 818 | 818 | { /* write VDP address */ |
| r5666 | r5667 | |
| 830 | 830 | READ16_HANDLER ( ti99_rv38_r ) |
| 831 | 831 | { |
| 832 | 832 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 833 | // cpu_spinuntil_time(space->machine->cpu | |
| 833 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 834 | 834 | |
| 835 | 835 | if (offset & 1) |
| 836 | 836 | { /* read VDP status */ |
| r5666 | r5667 | |
| 848 | 848 | WRITE16_HANDLER ( ti99_wv38_w ) |
| 849 | 849 | { |
| 850 | 850 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 851 | // cpu_spinuntil_time(space->machine->cpu | |
| 851 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 852 | 852 | |
| 853 | 853 | switch (offset & 3) |
| 854 | 854 | { |
| r5666 | r5667 | |
| 964 | 964 | UINT16 reply; |
| 965 | 965 | |
| 966 | 966 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4 /*20+3*/); /* from 4 to 23? */ |
| 967 | // cpu_spinuntil_time(space->machine->cpu | |
| 967 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 968 | 968 | |
| 969 | 969 | /* This implementation features a multislot cartridge system which |
| 970 | 970 | is based on multiple GROM base addresses. The standard base |
| r5666 | r5667 | |
| 1035 | 1035 | WRITE16_HANDLER ( ti99_grom_w ) |
| 1036 | 1036 | { |
| 1037 | 1037 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4/*20+3*/); /* from 4 to 23? */ |
| 1038 | // cpu_spinuntil_time(space->machine->cpu | |
| 1038 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 1039 | 1039 | |
| 1040 | 1040 | /* Activates a slot in the multi-cartridge extender. */ |
| 1041 | 1041 | cartridge_slot_set(cartslots, (offset & 0x01fe)/2); |
| r5666 | r5667 | |
| 1095 | 1095 | { |
| 1096 | 1096 | UINT8 reply; |
| 1097 | 1097 | |
| 1098 | cpu_adjust_icount(space->machine->cpu | |
| 1098 | cpu_adjust_icount(space->machine->firstcpu | |
| 1099 | 1099 | |
| 1100 | 1100 | /* Activates a slot in the multi-cartridge extender. */ |
| 1101 | 1101 | // 1001 1wbb bbbb bbr0 |
| r5666 | r5667 | |
| 1128 | 1128 | */ |
| 1129 | 1129 | static WRITE8_HANDLER ( ti99_grom_w8 ) |
| 1130 | 1130 | { |
| 1131 | cpu_adjust_icount(space->machine->cpu | |
| 1131 | cpu_adjust_icount(space->machine->firstcpu | |
| 1132 | 1132 | |
| 1133 | 1133 | /* Activates a slot in the multi-cartridge extender. */ |
| 1134 | 1134 | cartridge_slot_set(cartslots, (offset & 0x03fc)/4); |
| r5666 | r5667 | |
| 1164 | 1164 | READ16_HANDLER ( ti99_4p_grom_r ) |
| 1165 | 1165 | { |
| 1166 | 1166 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); /* HSGPL is located on 8-bit bus? */ |
| 1167 | // cpu_spinuntil_time(space->machine->cpu | |
| 1167 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 1168 | 1168 | |
| 1169 | 1169 | return /*hsgpl_crdena ?*/ ti99_hsgpl_gpl_r(space, offset, mem_mask) /*: 0*/; |
| 1170 | 1170 | } |
| r5666 | r5667 | |
| 1175 | 1175 | WRITE16_HANDLER ( ti99_4p_grom_w ) |
| 1176 | 1176 | { |
| 1177 | 1177 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); /* HSGPL is located on 8-bit bus? */ |
| 1178 | // cpu_spinuntil_time(space->machine->cpu | |
| 1178 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 1179 | 1179 | |
| 1180 | 1180 | /*if (hsgpl_crdena)*/ |
| 1181 | 1181 | ti99_hsgpl_gpl_w(space, offset, data, mem_mask); |
| r5666 | r5667 | |
| 2453 | 2453 | static READ16_HANDLER ( ti99_TIxramlow_r ) |
| 2454 | 2454 | { |
| 2455 | 2455 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 2456 | // cpu_spinuntil_time(space->machine->cpu | |
| 2456 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 2457 | 2457 | |
| 2458 | 2458 | return xRAM_ptr[offset]; |
| 2459 | 2459 | } |
| r5666 | r5667 | |
| 2461 | 2461 | static WRITE16_HANDLER ( ti99_TIxramlow_w ) |
| 2462 | 2462 | { |
| 2463 | 2463 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 2464 | // cpu_spinuntil_time(space->machine->cpu | |
| 2464 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 2465 | 2465 | |
| 2466 | 2466 | COMBINE_DATA(xRAM_ptr + offset); |
| 2467 | 2467 | } |
| r5666 | r5667 | |
| 2470 | 2470 | static READ16_HANDLER ( ti99_TIxramhigh_r ) |
| 2471 | 2471 | { |
| 2472 | 2472 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 2473 | // cpu_spinuntil_time(space->machine->cpu | |
| 2473 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 2474 | 2474 | |
| 2475 | 2475 | return xRAM_ptr[offset+0x1000]; |
| 2476 | 2476 | } |
| r5666 | r5667 | |
| 2478 | 2478 | static WRITE16_HANDLER ( ti99_TIxramhigh_w ) |
| 2479 | 2479 | { |
| 2480 | 2480 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 2481 | // cpu_spinuntil_time(space->machine->cpu | |
| 2481 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 2482 | 2482 | |
| 2483 | 2483 | COMBINE_DATA(xRAM_ptr + offset+0x1000); |
| 2484 | 2484 | } |
| r5666 | r5667 | |
| 2561 | 2561 | static READ16_HANDLER ( ti99_sAMSxramlow_r ) |
| 2562 | 2562 | { |
| 2563 | 2563 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 2564 | // cpu_spinuntil_time(space->machine->cpu | |
| 2564 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 2565 | 2565 | |
| 2566 | 2566 | if (sAMS_mapper_on) |
| 2567 | 2567 | return xRAM_ptr[(offset&0x7ff)+sAMSlookup[(0x1000+offset)>>11]]; |
| r5666 | r5667 | |
| 2572 | 2572 | static WRITE16_HANDLER ( ti99_sAMSxramlow_w ) |
| 2573 | 2573 | { |
| 2574 | 2574 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 2575 | // cpu_spinuntil_time(space->machine->cpu | |
| 2575 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 2576 | 2576 | |
| 2577 | 2577 | if (sAMS_mapper_on) |
| 2578 | 2578 | COMBINE_DATA(xRAM_ptr + (offset&0x7ff)+sAMSlookup[(0x1000+offset)>>11]); |
| r5666 | r5667 | |
| 2584 | 2584 | static READ16_HANDLER ( ti99_sAMSxramhigh_r ) |
| 2585 | 2585 | { |
| 2586 | 2586 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 2587 | // cpu_spinuntil_time(space->machine->cpu | |
| 2587 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 2588 | 2588 | |
| 2589 | 2589 | if (sAMS_mapper_on) |
| 2590 | 2590 | return xRAM_ptr[(offset&0x7ff)+sAMSlookup[(0x5000+offset)>>11]]; |
| r5666 | r5667 | |
| 2595 | 2595 | static WRITE16_HANDLER ( ti99_sAMSxramhigh_w ) |
| 2596 | 2596 | { |
| 2597 | 2597 | cpu_adjust_icount(cputag_get_cpu(space->machine, "maincpu"),-4); |
| 2598 | // cpu_spinuntil_time(space->machine->cpu | |
| 2598 | // cpu_spinuntil_time(space->machine->firstcpu | |
| 2599 | 2599 | |
| 2600 | 2600 | if (sAMS_mapper_on) |
| 2601 | 2601 | COMBINE_DATA(xRAM_ptr + (offset&0x7ff)+sAMSlookup[(0x5000+offset)>>11]); |
| r5666 | r5667 | |
|---|---|---|
| 42 | 42 | # specify available CPU cores |
| 43 | 43 | #------------------------------------------------- |
| 44 | 44 | |
| 45 | CPUS += ADSP21062 | |
| 45 | CPUS += Z80 | |
| 46 | CPUS += Z180 | |
| 47 | CPUS += I8085 | |
| 48 | CPUS += M6502 | |
| 49 | CPUS += H6280 | |
| 50 | CPUS += I86 | |
| 51 | CPUS += I386 | |
| 52 | CPUS += NEC | |
| 53 | CPUS += V30MZ | |
| 54 | CPUS += V60 | |
| 55 | CPUS += MCS48 | |
| 56 | CPUS += MCS51 | |
| 57 | CPUS += M6800 | |
| 58 | CPUS += M6805 | |
| 59 | CPUS += HD6309 | |
| 60 | CPUS += M6809 | |
| 61 | CPUS += KONAMI | |
| 62 | CPUS += M680X0 | |
| 63 | CPUS += T11 | |
| 64 | CPUS += S2650 | |
| 65 | CPUS += TMS340X0 | |
| 66 | CPUS += TMS9900 | |
| 67 | CPUS += Z8000 | |
| 68 | CPUS += TMS32010 | |
| 69 | CPUS += TMS32025 | |
| 70 | CPUS += TMS32031 | |
| 71 | CPUS += TMS32051 | |
| 72 | CPUS += TMS57002 | |
| 73 | CPUS += CCPU | |
| 46 | 74 | CPUS += ADSP21XX |
| 47 | CPUS += ALPHA8201 | |
| 48 | CPUS += APEXC | |
| 75 | CPUS += ASAP | |
| 76 | CPUS += UPD7810 | |
| 49 | 77 | CPUS += ARM |
| 50 | 78 | CPUS += ARM7 |
| 51 | CPUS += ASAP | |
| 52 | CPUS += AVR8 | |
| 53 | CPUS += CCPU | |
| 54 | CPUS += CDP1802 | |
| 55 | CPUS += COP400 | |
| 56 | CPUS += CP1610 | |
| 79 | CPUS += JAGUAR | |
| 57 | 80 | CPUS += CUBEQCPU |
| 81 | CPUS += ESRIP | |
| 82 | CPUS += MIPS | |
| 83 | CPUS += SH2 | |
| 84 | CPUS += SH4 | |
| 58 | 85 | CPUS += DSP32C |
| 59 | CPUS += DSP56156 | |
| 86 | CPUS += PIC16C5X | |
| 87 | CPUS += G65816 | |
| 88 | CPUS += SPC700 | |
| 60 | 89 | CPUS += E1 |
| 61 | CPUS += ESRIP | |
| 62 | CPUS += F8 | |
| 63 | CPUS += G65816 | |
| 64 | CPUS += H6280 | |
| 90 | CPUS += I860 | |
| 91 | CPUS += I960 | |
| 65 | 92 | CPUS += H83002 |
| 66 | 93 | CPUS += H83334 |
| 67 | CPUS += HD6309 | |
| 68 | CPUS += I386 | |
| 69 | CPUS += I4004 | |
| 70 | CPUS += I8085 | |
| 71 | CPUS += I86 | |
| 72 | CPUS += I860 | |
| 73 | CPUS += I960 | |
| 74 | CPUS += JAGUAR | |
| 75 | CPUS += KONAMI | |
| 76 | CPUS += LH5801 | |
| 77 | CPUS += LR35902 | |
| 94 | CPUS += V810 | |
| 78 | 95 | CPUS += M37710 |
| 79 | CPUS += M6502 | |
| 80 | CPUS += M6800 | |
| 81 | CPUS += M6805 | |
| 82 | CPUS += M6809 | |
| 83 | CPUS += M680X0 | |
| 96 | CPUS += POWERPC | |
| 97 | CPUS += SE3208 | |
| 98 | CPUS += MC68HC11 | |
| 99 | CPUS += ADSP21062 | |
| 100 | CPUS += DSP56156 | |
| 101 | CPUS += RSP | |
| 102 | CPUS += ALPHA8201 | |
| 103 | CPUS += CDP1802 | |
| 104 | CPUS += COP400 | |
| 105 | CPUS += TLCS90 | |
| 106 | CPUS += TLCS900 | |
| 107 | CPUS += MB88XX | |
| 84 | 108 | CPUS += MB86233 |
| 85 | CPUS += MB88XX | |
| 86 | CPUS += MC68HC11 | |
| 87 | CPUS += MCS48 | |
| 88 | CPUS += MCS51 | |
| 89 | CPUS += MINX | |
| 90 | CPUS += MIPS | |
| 91 | CPUS += NEC | |
| 109 | CPUS += SSP1601 | |
| 110 | CPUS += APEXC | |
| 111 | CPUS += CP1610 | |
| 112 | CPUS += F8 | |
| 113 | CPUS += LH5801 | |
| 92 | 114 | CPUS += PDP1 |
| 93 | CPUS += PIC16C5X | |
| 94 | CPUS += POWERPC | |
| 95 | CPUS += RSP | |
| 96 | CPUS += S2650 | |
| 97 | 115 | CPUS += SATURN |
| 98 | 116 | CPUS += SC61860 |
| 99 | CPUS += SE3208 | |
| 100 | CPUS += SH2 | |
| 101 | CPUS += SH4 | |
| 117 | CPUS += LR35902 | |
| 118 | CPUS += TMS7000 | |
| 102 | 119 | CPUS += SM8500 |
| 103 | CPUS += | |
| 120 | CPUS += MINX | |
| 104 | 121 | CPUS += SSEM |
| 105 | CPUS += SSP1601 | |
| 122 | CPUS += AVR8 | |
| 123 | CPUS += TMS0980 | |
| 124 | CPUS += I4004 | |
| 106 | 125 | CPUS += SUPERFX |
| 107 | CPUS += T11 | |
| 108 | CPUS += TLCS90 | |
| 109 | CPUS += TLCS900 | |
| 110 | CPUS += TMS0980 | |
| 111 | CPUS += TMS32010 | |
| 112 | CPUS += TMS32025 | |
| 113 | CPUS += TMS32031 | |
| 114 | CPUS += TMS32051 | |
| 115 | CPUS += TMS340X0 | |
| 116 | CPUS += TMS57002 | |
| 117 | CPUS += TMS7000 | |
| 118 | CPUS += TMS9900 | |
| 119 | CPUS += UPD7810 | |
| 120 | CPUS += V30MZ | |
| 121 | CPUS += V60 | |
| 122 | CPUS += V810 | |
| 123 | CPUS += Z180 | |
| 124 | 126 | CPUS += Z8 |
| 125 | CPUS += Z80 | |
| 126 | CPUS += Z8000 | |
| 127 | 127 | |
| 128 | 128 | |
| 129 | 129 | #------------------------------------------------- |
| r5666 | r5667 | |
| 131 | 131 | # only for MAME and so aren't included |
| 132 | 132 | #------------------------------------------------- |
| 133 | 133 | |
| 134 | SOUNDS += AICA | |
| 135 | SOUNDS += ASTROCADE | |
| 136 | SOUNDS += AY8910 | |
| 137 | SOUNDS += BEEP | |
| 138 | SOUNDS += C6280 | |
| 139 | SOUNDS += CDDA | |
| 140 | SOUNDS += CDP1869 | |
| 134 | #SOUNDS += CUSTOM | |
| 135 | #SOUNDS += SAMPLES | |
| 141 | 136 | SOUNDS += DAC |
| 142 | SOUNDS += DISCRETE | |
| 143 | 137 | SOUNDS += DMADAC |
| 144 | SOUNDS += ES5503 | |
| 145 | SOUNDS += K051649 | |
| 146 | SOUNDS += MSM5205 | |
| 147 | SOUNDS += NES | |
| 148 | SOUNDS += OKIM6258 | |
| 149 | SOUNDS += OKIM6295 | |
| 150 | SOUNDS += POKEY | |
| 151 | SOUNDS += PSXSPU | |
| 152 | SOUNDS += QSOUND | |
| 153 | SOUNDS += RF5C68 | |
| 154 | SOUNDS += SAA1099 | |
| 155 | SOUNDS += SCSP | |
| 156 | SOUNDS += SID6581 | |
| 157 | SOUNDS += SID8580 | |
| 158 | SOUNDS += SN76477 | |
| 159 | SOUNDS += SN76496 | |
| 160 | SOUNDS += SOCRATES | |
| 161 | SOUNDS += SP0256 | |
| 162 | 138 | SOUNDS += SPEAKER |
| 163 | SOUNDS += T6W28 | |
| 164 | SOUNDS += TIA | |
| 165 | SOUNDS += TMC0285 | |
| 166 | SOUNDS += TMS5200 | |
| 167 | SOUNDS += TMS5220 | |
| 168 | SOUNDS += WAVE | |
| 139 | SOUNDS += BEEP | |
| 140 | SOUNDS += DISCRETE | |
| 141 | SOUNDS += AY8910 | |
| 169 | 142 | SOUNDS += YM2151 |
| 170 | 143 | SOUNDS += YM2203 |
| 171 | 144 | SOUNDS += YM2413 |
| 145 | #SOUNDS += YM2608 | |
| 172 | 146 | SOUNDS += YM2610 |
| 173 | 147 | SOUNDS += YM2610B |
| 174 | 148 | SOUNDS += YM2612 |
| 149 | #SOUNDS += YM3438 | |
| 175 | 150 | SOUNDS += YM3812 |
| 176 | #SOUNDS += ADPCM | |
| 177 | #SOUNDS += BSMT2000 | |
| 151 | #SOUNDS += YM3526 | |
| 152 | #SOUNDS += Y8950 | |
| 153 | #SOUNDS += YMF262 | |
| 154 | #SOUNDS += YMF271 | |
| 155 | #SOUNDS += YMF278B | |
| 156 | #SOUNDS += YMZ280B | |
| 157 | SOUNDS += SN76477 | |
| 158 | SOUNDS += SN76496 | |
| 159 | SOUNDS += POKEY | |
| 160 | SOUNDS += TIA | |
| 161 | SOUNDS += NES | |
| 162 | SOUNDS += ASTROCADE | |
| 163 | #SOUNDS += NAMCO | |
| 164 | #SOUNDS += NAMCO_15XX | |
| 165 | #SOUNDS += NAMCO_CUS30 | |
| 166 | #SOUNDS += NAMCO_52XX | |
| 167 | #SOUNDS += NAMCO_63701X | |
| 168 | SOUNDS += T6W28 | |
| 169 | #SOUNDS += SNKWAVE | |
| 178 | 170 | #SOUNDS += C140 |
| 179 | 171 | #SOUNDS += C352 |
| 180 | #SOUNDS += CD2801 | |
| 181 | #SOUNDS += CD2802 | |
| 182 | #SOUNDS += CEM3394 | |
| 183 | #SOUNDS += CUSTOM | |
| 184 | #SOUNDS += DIGITALKER | |
| 185 | #SOUNDS += ES5505 | |
| 186 | #SOUNDS += ES5506 | |
| 187 | #SOUNDS += ES8712 | |
| 188 | #SOUNDS += GAELCO_CG1V | |
| 189 | #SOUNDS += GAELCO_GAE1 | |
| 172 | #SOUNDS += TMS36XX | |
| 173 | #SOUNDS += TMS3615 | |
| 174 | #SOUNDS += TMS5110 | |
| 175 | SOUNDS += TMS5220 | |
| 176 | #SOUNDS += VLM5030 | |
| 177 | #SOUNDS += ADPCM | |
| 178 | SOUNDS += MSM5205 | |
| 179 | #SOUNDS += MSM5232 | |
| 180 | SOUNDS += OKIM6258 | |
| 181 | SOUNDS += OKIM6295 | |
| 182 | #SOUNDS += OKIM6376 | |
| 183 | #SOUNDS += UPD7759 | |
| 190 | 184 | #SOUNDS += HC55516 |
| 191 | #SOUNDS += ICS2115 | |
| 192 | #SOUNDS += IREMGA20 | |
| 193 | 185 | #SOUNDS += K005289 |
| 194 | 186 | #SOUNDS += K007232 |
| 187 | SOUNDS += K051649 | |
| 195 | 188 | #SOUNDS += K053260 |
| 196 | 189 | #SOUNDS += K054539 |
| 197 | #SOUNDS += M58817 | |
| 198 | #SOUNDS += MSM5232 | |
| 190 | #SOUNDS += SEGAPCM | |
| 199 | 191 | #SOUNDS += MULTIPCM |
| 200 | #SOUNDS += NAMCO | |
| 201 | #SOUNDS += NAMCO_15XX | |
| 202 | #SOUNDS += NAMCO_52XX | |
| 203 | #SOUNDS += NAMCO_63701X | |
| 204 | #SOUNDS += NAMCO_CUS30 | |
| 205 | #SOUNDS += NILE | |
| 206 | #SOUNDS += OKIM6376 | |
| 192 | SOUNDS += SCSP | |
| 193 | SOUNDS += AICA | |
| 194 | SOUNDS += RF5C68 | |
| 207 | 195 | #SOUNDS += RF5C400 |
| 208 | #SOUNDS += S14001A | |
| 209 | #SOUNDS += SAMPLES | |
| 210 | #SOUNDS += SEGAPCM | |
| 211 | #SOUNDS += SNKWAVE | |
| 196 | #SOUNDS += CEM3394 | |
| 197 | SOUNDS += QSOUND | |
| 198 | SOUNDS += SAA1099 | |
| 199 | #SOUNDS += IREMGA20 | |
| 200 | SOUNDS += ES5503 | |
| 201 | #SOUNDS += ES5505 | |
| 202 | #SOUNDS += ES5506 | |
| 203 | #SOUNDS += BSMT2000 | |
| 204 | #SOUNDS += GAELCO_CG1V | |
| 205 | #SOUNDS += GAELCO_GAE1 | |
| 206 | SOUNDS += C6280 | |
| 212 | 207 | #SOUNDS += SP0250 |
| 208 | SOUNDS += PSXSPU | |
| 209 | SOUNDS += CDDA | |
| 210 | #SOUNDS += ICS2115 | |
| 213 | 211 | #SOUNDS += ST0016 |
| 212 | #SOUNDS += NILE | |
| 213 | #SOUNDS += X1_010 | |
| 214 | #SOUNDS += VRENDER0 | |
| 215 | #SOUNDS += VOTRAX | |
| 216 | #SOUNDS += ES8712 | |
| 217 | SOUNDS += CDP1869 | |
| 218 | #SOUNDS += S14001A | |
| 219 | SOUNDS += WAVE | |
| 220 | SOUNDS += SID6581 | |
| 221 | SOUNDS += SID8580 | |
| 222 | SOUNDS += SP0256 | |
| 223 | #SOUNDS += DIGITALKER | |
| 224 | SOUNDS += SOCRATES | |
| 225 | SOUNDS += TMC0285 | |
| 226 | SOUNDS += TMS5200 | |
| 227 | #SOUNDS += CD2801 | |
| 228 | #SOUNDS += CD2802 | |
| 229 | #SOUNDS += M58817 | |
| 214 | 230 | #SOUNDS += TMC0281 |
| 215 | #SOUNDS += TMS3615 | |
| 216 | #SOUNDS += TMS36XX | |
| 217 | 231 | #SOUNDS += TMS5100 |
| 218 | #SOUNDS += TMS5110 | |
| 219 | 232 | #SOUNDS += TMS5110A |
| 220 | #SOUNDS += UPD7759 | |
| 221 | #SOUNDS += VLM5030 | |
| 222 | #SOUNDS += VOTRAX | |
| 223 | #SOUNDS += VRENDER0 | |
| 224 | #SOUNDS += X1_010 | |
| 225 | #SOUNDS += Y8950 | |
| 226 | #SOUNDS += YM2608 | |
| 227 | #SOUNDS += YM3438 | |
| 228 | #SOUNDS += YM3526 | |
| 229 | #SOUNDS += YMF262 | |
| 230 | #SOUNDS += YMF271 | |
| 231 | #SOUNDS += YMF278B | |
| 232 | #SOUNDS += YMZ280B | |
| 233 | 233 | |
| 234 | 234 | |
| 235 | 235 | #------------------------------------------------- |
| r5666 | r5667 | |
| 332 | 332 | $(MESSOBJ)/pc.a \ |
| 333 | 333 | $(MESSOBJ)/pcm.a \ |
| 334 | 334 | $(MESSOBJ)/pcshare.a \ |
| 335 | $(MESSOBJ)/pdp1.a \ | |
| 336 | 335 | $(MESSOBJ)/pel.a \ |
| 337 | 336 | $(MESSOBJ)/philips.a \ |
| 338 | 337 | $(MESSOBJ)/poly88.a \ |
| r5666 | r5667 | |
| 376 | 375 | $(MESSOBJ)/zvt.a \ |
| 377 | 376 | $(MESSOBJ)/shared.a \ |
| 378 | 377 | |
| 378 | # $(MESSOBJ)/pdp1.a \ | |
| 379 | 379 | |
| 380 | 380 | |
| 381 | ||
| 381 | 382 | #------------------------------------------------- |
| 382 | 383 | # the following files are general components and |
| 383 | 384 | # shared across a number of drivers |
| r5666 | r5667 | |
|---|---|---|
| 1819 | 1819 | /* There is a circuitry in TI99/4(a) that resets the console when a |
| 1820 | 1820 | cartridge is inserted or removed. We emulate this instead of resetting the |
| 1821 | 1821 | emulator (which is the default in MESS). */ |
| 1822 | /*cpu_set_input_line(machine->cpu | |
| 1822 | /*cpu_set_input_line(machine->firstcpu | |
| 1823 | 1823 | tms9901_reset(0); |
| 1824 | 1824 | if (! has_evpc) |
| 1825 | 1825 | TMS9928A_reset(); |
| r5666 | r5667 | |
| 2171 | 2171 | cpu_adjust_icount(cputag_get_cpu(device->machine, "maincpu"),-4); |
| 2172 | 2172 | |
| 2173 | 2173 | // Alternatively: |
| 2174 | // cpu_spinuntil_time(device->machine->cpu | |
| 2174 | // cpu_spinuntil_time(device->machine->firstcpu | |
| 2175 | 2175 | |
| 2176 | 2176 | // printf("rpk = %d, bin = %d\n", cartslots->multi_slots,cartslots->legacy_slots); |
| 2177 | 2177 | |
| r5666 | r5667 | |
| 2223 | 2223 | |
| 2224 | 2224 | /* Idle the CPU */ |
| 2225 | 2225 | cpu_adjust_icount(cputag_get_cpu(device->machine, "maincpu"),-4); |
| 2226 | // cpu_spinuntil_time(device->machine->cpu | |
| 2226 | // cpu_spinuntil_time(device->machine->firstcpu | |
| 2227 | 2227 | |
| 2228 | 2228 | /* Handle legacy mode. */ |
| 2229 | 2229 | if (in_legacy_mode(device)) |
| r5666 | r5667 | |
|---|---|---|
| 264 | 264 | if (LOG_SONY_EXTRA) |
| 265 | 265 | { |
| 266 | 266 | logerror("sony_status(): action=%d pc=0x%08x%s\n", |
| 267 | action, (int) cpu_get_pc(device->machine->cpu | |
| 267 | action, (int) cpu_get_pc(device->machine->firstcpu | |
| 268 | 268 | } |
| 269 | 269 | |
| 270 | 270 | if ((! sony_enable2()) && sony_floppy_enable) |
| r5666 | r5667 | |
| 319 | 319 | result = floppy_get_heads_per_disk(flopimg_get_image(cur_image)) - 1; |
| 320 | 320 | break; |
| 321 | 321 | case 0x0a: /* At track 0: 0=track zero 1=not track zero */ |
| 322 | logerror("sony_status(): reading Track 0 pc=0x%08x\n", (int) cpu_get_pc(device->machine->cpu | |
| 322 | logerror("sony_status(): reading Track 0 pc=0x%08x\n", (int) cpu_get_pc(device->machine->firstcpu | |
| 323 | 323 | if (cur_image) |
| 324 | 324 | result = floppy_drive_get_flag_state(cur_image, FLOPPY_DRIVE_HEAD_AT_TRACK_0) ? 0 : 1; |
| 325 | 325 | else |
| r5666 | r5667 | |
| 375 | 375 | if (LOG_SONY) |
| 376 | 376 | { |
| 377 | 377 | logerror("sony_doaction(): action=%d pc=0x%08x%s\n", |
| 378 | action, (int) cpu_get_pc(device->machine->cpu | |
| 378 | action, (int) cpu_get_pc(device->machine->firstcpu | |
| 379 | 379 | } |
| 380 | 380 | |
| 381 | 381 | if (sony_floppy_enable) |
| r5666 | r5667 | |
|---|---|---|
| 256 | 256 | { |
| 257 | 257 | /* calculate delay; it isn't clear why we have to do this every single time */ |
| 258 | 258 | attotime delay = (line->delay != 0) |
| 259 | ? cpu_clocks_to_attotime(device->machine->cpu | |
| 259 | ? cpu_clocks_to_attotime(device->machine->firstcpu | |
| 260 | 260 | : attotime_zero; |
| 261 | 261 | |
| 262 | 262 | timer_adjust_oneshot(line->timer, delay, (int) value); |
| r5666 | r5667 | |
|---|---|---|
| 77 | 77 | return mess_default_text[string_num]; |
| 78 | 78 | } |
| 79 | 79 | |
| 80 | ||
| 81 | ||
| 82 | /*************************************************************************** | |
| 83 | CPU | |
| 84 | ***************************************************************************/ | |
| 85 | ||
| 86 | const device_config *cpu_get_by_index(running_machine *machine, int index) | |
| 87 | { | |
| 88 | const device_config *cpu = cpu_first(machine->config); | |
| 89 | while((cpu != NULL) && (index > 0)) | |
| 90 | { | |
| 91 | cpu = cpu_next(cpu); | |
| 92 | index--; | |
| 93 | } | |
| 94 | return cpu; | |
| 95 | } |
| r5666 | r5667 | |
|---|---|---|
| 73 | 73 | /* uitext */ |
| 74 | 74 | const char * ui_getstring (int string_num); |
| 75 | 75 | |
| 76 | /* retrieves a CPU by index */ | |
| 77 | const device_config *cpu_get_by_index(running_machine *machine, int index); | |
| 78 | ||
| 76 | 79 | #endif /* MSLEGACY_H */ |
| r5666 | r5667 | |
|---|---|---|
| 66 | 66 | { |
| 67 | 67 | |
| 68 | 68 | if (!CyclesPerFrame) |
| 69 | CyclesPerFrame = (int)(cpu_get_clock(machine->cpu | |
| 69 | CyclesPerFrame = (int)(cpu_get_clock(machine->firstcpu | |
| 70 | 70 | |
| 71 | 71 | if (NumEvents < TotalEvents) |
| 72 | 72 | { |
| r5666 | r5667 | |
|---|---|---|
| 108 | 108 | static INPUT_CHANGED( kim1_reset ) |
| 109 | 109 | { |
| 110 | 110 | if (newval == 0) |
| 111 | device_reset(field->port->machine->cpu | |
| 111 | device_reset(field->port->machine->firstcpu | |
| 112 | 112 | } |
| 113 | 113 | |
| 114 | 114 |
| r5666 | r5667 | |
|---|---|---|
| 393 | 393 | static INTERRUPT_GEN( cdi_irq ) |
| 394 | 394 | { |
| 395 | 395 | // if(input_code_pressed(KEYCODE_Z)) |
| 396 | // cpu_set_input_line(device->machine->cpu | |
| 396 | // cpu_set_input_line(device->machine->firstcpu | |
| 397 | 397 | // ram[0x2004/2]^=0xffff; |
| 398 | 398 | } |
| 399 | 399 |
| r5666 | r5667 | |
|---|---|---|
| 29 | 29 | static INPUT_CHANGED( junior_reset ) |
| 30 | 30 | { |
| 31 | 31 | if (newval == 0) |
| 32 | device_reset(field->port->machine->cpu | |
| 32 | device_reset(field->port->machine->firstcpu | |
| 33 | 33 | } |
| 34 | 34 | |
| 35 | 35 |
| r5666 | r5667 | |
|---|---|---|
| 36 | 36 | va_start( v, s_fmt ); |
| 37 | 37 | vsprintf( buf, s_fmt, v ); |
| 38 | 38 | va_end( v ); |
| 39 | logerror( "%08x: %s", cpu_get_pc(machine->cpu | |
| 39 | logerror( "%08x: %s", cpu_get_pc(machine->firstcpu | |
| 40 | 40 | } |
| 41 | 41 | } |
| 42 | 42 | |
| r5666 | r5667 | |
| 86 | 86 | // master enable? |
| 87 | 87 | if (gba_state->IME & 1) |
| 88 | 88 | { |
| 89 | cpu_set_input_line(machine->cpu[0], ARM7_IRQ_LINE, ASSERT_LINE); | |
| 90 | cpu_set_input_line(machine->cpu[0], ARM7_IRQ_LINE, CLEAR_LINE); | |
| 89 | cpu_set_input_line(machine->firstcpu, ARM7_IRQ_LINE, ASSERT_LINE); | |
| 90 | cpu_set_input_line(machine->firstcpu, ARM7_IRQ_LINE, CLEAR_LINE); | |
| 91 | 91 | } |
| 92 | 92 | } |
| 93 | 93 | } |
| r5666 | r5667 | |
| 142 | 142 | int ctrl; |
| 143 | 143 | int srcadd, dstadd; |
| 144 | 144 | UINT32 src, dst; |
| 145 | const address_space *space = cpu_get_address_space(machine->cpu | |
| 145 | const address_space *space = cpu_get_address_space(machine->firstcpu | |
| 146 | 146 | gba_state *gba_state = machine->driver_data; |
| 147 | 147 | |
| 148 | 148 | src = gba_state->dma_src[ch]; |
| r5666 | r5667 | |
| 1734 | 1734 | // if we still have interrupts, yank the IRQ line again |
| 1735 | 1735 | if (gba_state->IF) |
| 1736 | 1736 | { |
| 1737 | timer_adjust_oneshot(gba_state->irq_timer, cpu_clocks_to_attotime(machine->cpu | |
| 1737 | timer_adjust_oneshot(gba_state->irq_timer, cpu_clocks_to_attotime(machine->firstcpu | |
| 1738 | 1738 | } |
| 1739 | 1739 | } |
| 1740 | 1740 | break; |
| r5666 | r5667 | |
| 1777 | 1777 | gba_state->HALTCNT = data & 0x000000ff; |
| 1778 | 1778 | |
| 1779 | 1779 | // either way, wait for an IRQ |
| 1780 | cpu_spinuntil_int(machine->cpu | |
| 1780 | cpu_spinuntil_int(machine->firstcpu | |
| 1781 | 1781 | } |
| 1782 | 1782 | } |
| 1783 | 1783 | if( (mem_mask) & 0xffff0000 ) |
| r5666 | r5667 | |
| 2265 | 2265 | |
| 2266 | 2266 | if (gba_state->eeprom_bits == 0) |
| 2267 | 2267 | { |
| 2268 | mame_printf_verbose("%08x: EEPROM: %02x to %x\n", cpu_get_pc(space-> machine->cpu | |
| 2268 | mame_printf_verbose("%08x: EEPROM: %02x to %x\n", cpu_get_pc(space-> machine->firstcpu | |
| 2269 | 2269 | gba_state->gba_eeprom[gba_state->eeprom_addr] = gba_state->eep_data; |
| 2270 | 2270 | gba_state->eeprom_addr++; |
| 2271 | 2271 | gba_state->eep_data = 0; |
| r5666 | r5667 | |
| 2304 | 2304 | |
| 2305 | 2305 | if (image_length(image) <= (16*1024*1024)) |
| 2306 | 2306 | { |
| 2307 | memory_install_read32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd000000, 0xdffffff, 0, 0, eeprom_r); | |
| 2308 | memory_install_write32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xd000000, 0xdffffff, 0, 0, eeprom_w); | |
| 2307 | memory_install_read32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xd000000, 0xdffffff, 0, 0, eeprom_r); | |
| 2308 | memory_install_write32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xd000000, 0xdffffff, 0, 0, eeprom_w); | |
| 2309 | 2309 | } |
| 2310 | 2310 | else |
| 2311 | 2311 | { |
| 2312 | memory_install_read32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xdffff00, 0xdffffff, 0, 0, eeprom_r); | |
| 2313 | memory_install_write32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xdffff00, 0xdffffff, 0, 0, eeprom_w); | |
| 2312 | memory_install_read32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xdffff00, 0xdffffff, 0, 0, eeprom_r); | |
| 2313 | memory_install_write32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xdffff00, 0xdffffff, 0, 0, eeprom_w); | |
| 2314 | 2314 | } |
| 2315 | 2315 | break; |
| 2316 | 2316 | } |
| r5666 | r5667 | |
| 2319 | 2319 | nvptr = (UINT8 *)&gba_state->gba_sram; |
| 2320 | 2320 | nvsize = 0x10000; |
| 2321 | 2321 | |
| 2322 | memory_install_read32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe00ffff, 0, 0, sram_r); | |
| 2323 | memory_install_write32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe00ffff, 0, 0, sram_w); | |
| 2322 | memory_install_read32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe00ffff, 0, 0, sram_r); | |
| 2323 | memory_install_write32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe00ffff, 0, 0, sram_w); | |
| 2324 | 2324 | break; |
| 2325 | 2325 | } |
| 2326 | 2326 | else if (!memcmp(&ROM[i], "FLASH1M_", 8)) |
| r5666 | r5667 | |
| 2333 | 2333 | nvptr = (UINT8 *)&gba_state->gba_flash64k; |
| 2334 | 2334 | nvsize = 0x10000; |
| 2335 | 2335 | |
| 2336 | memory_install_read32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe007fff, 0, 0, flash64k_r); | |
| 2337 | memory_install_write32_handler(cpu_get_address_space(image->machine->cpu[0], ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe007fff, 0, 0, flash64k_w); | |
| 2336 | memory_install_read32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe007fff, 0, 0, flash64k_r); | |
| 2337 | memory_install_write32_handler(cpu_get_address_space(image->machine->firstcpu, ADDRESS_SPACE_PROGRAM), 0xe000000, 0xe007fff, 0, 0, flash64k_w); | |
| 2338 | 2338 | break; |
| 2339 | 2339 | } |
| 2340 | 2340 | else if (!memcmp(&ROM[i], "SIIRTC_V", 8)) |
| r5666 | r5667 | |
| 2431 | 2431 | |
| 2432 | 2432 | static DRIVER_INIT(gbadv) |
| 2433 | 2433 | { |
| 2434 | memory_set_direct_update_handler( cpu_get_address_space(machine->cpu | |
| 2434 | memory_set_direct_update_handler( cpu_get_address_space(machine->firstcpu | |
| 2435 | 2435 | } |
| 2436 | 2436 | |
| 2437 | 2437 | /* YEAR NAME PARENT COMPAT MACHINE INPUT INIT CONFIG COMPANY FULLNAME */ |
| r5666 | r5667 | |
|---|---|---|
| 1 | 0.13 | |
| 1 | 0.134 | |
| 2 | 2 | |
| 3 | 3 | New System Drivers Supported (in no particular order): |
| 4 | 4 | ------------------------------------------------------ |
| r5666 | r5667 | |
| 121 | 121 | - [Z8] Added preliminary Z8 cpu core for JuTe computer. [Curt Coder] |
| 122 | 122 | |
| 123 | 123 | |
| 124 | ||
| 124 | 125 | User Interface Changes: |
| 125 | 126 | ----------------------- |
| 126 | 127 | (none) |
| r5666 | r5667 | |
| 135 | 136 | |
| 136 | 137 | Source Changes: |
| 137 | 138 | ---------------- |
| 138 | - The core is based on MAME 0.13 | |
| 139 | - The core is based on MAME 0.134 | |
| 139 | 140 | update to this core. [MAME team] |
| 140 | 141 | |
| 141 | 142 | - Floppy cleanup [Miodrag Milanovic] |
| 142 | 143 | |
| 144 | ||
| 145 | ||
| 143 | 146 | 0.133 |
| 144 | 147 | |
| 145 | 148 | New System Drivers Supported (in no particular order): |
| r5666 | r5667 | |
|---|---|---|
| 1 | 0.13 | |
| 1 | 0.134 | |
| 2 | 2 | ----- |
| 3 | 3 | |
| 4 | 4 | |
| 5 | 5 | MAMETesters Bugs Fixed |
| 6 | 6 | ---------------------- |
| 7 | - 03191: [Crash/Freeze] armchmp2: Allowing Demo to run triggersTest | |
| 8 | Mode (hap) | |
| 9 | - 02916: [Crash/Freeze] srmvs: [debug] Assertion (Aaron Giles) | |
| 10 | - 03300: [Crash/Freeze] tmmjprd, tmpdoki: [debug] Crash after OK | |
| 11 | (Aaron Giles) | |
| 12 | - 03310: [Misc.] cobram3, cobra: Parent/clone relationship missing | |
| 13 | (Aaron Giles) | |
| 14 | - 03311: [Misc.] p911uc, p911j: chd a00c02 is used in both clones but | |
| 15 | they use different hashes (Angelo Salese) | |
| 7 | - 03433: [Misc.] Jolly Card, Royal Card, Lucky Lady, Royal Vegas sets | |
| 8 | (and others)...: All games that need NVRAM initialized aren't | |
| 9 | working anymore. (Roberto Fresca) | |
| 10 | - 03434: [Sound] dingo: Sound is messed up (couriersud) | |
| 11 | - 03432: [Sound] circusc and clones: Partially missing sounds. | |
| 12 | (couriersud) | |
| 13 | - 03430: [Crash/Freeze] Drivers having empty INPUT definitions: | |
| 14 | Access Violation (Curt Coder) | |
| 16 | 15 | |
| 17 | 16 | |
| 17 | ||
| 18 | 18 | Source Changes |
| 19 | 19 | -------------- |
| 20 | Added GAME_IMPERFECT_SOUND flag to taitogn.c games since we don't | |
| 21 | emulate the sound CPU. [Fabio Priuli] | |
| 20 | Partial fix to CIA timer: avoid timer's desync in read count | |
| 21 | operation. [robiza] | |
| 22 | 22 | |
| 23 | CDP1802: [Curt Coder] | |
| 24 | - refactored the Q and DMA callbacks to use devcb | |
| 25 | - fixed state code output and load mode | |
| 23 | Fixed access violation in MESS skeleton drivers with empty | |
| 24 | INPUT_PORT sections. [Curt Coder] | |
| 26 | 25 | |
| 27 | Added FP registers to PPC debugger interface. Fixed bugs in the x64 | |
| 28 | back-end that prevented proper 3D rendering for Model 3 games. | |
| 26 | [Z8] Fixed disassembler argument order. [Curt Coder] | |
| 27 | ||
| 28 | MAMEUI uses input_seq_from_tokens() outside the context of a running | |
| 29 | emulation, so this code will crash if machine == NULL and the | |
| 30 | keycode was not a built in keycode. Changed this so that it will | |
| 31 | gracefully fail if machine == NULL. [Nathan Woods] | |
| 32 | ||
| 33 | Naomi/AW: Enforce read-only status of PowerVR ID registers. | |
| 34 | [R. Belmont] | |
| 35 | ||
| 36 | Added debug_global_input_code_pressed() for use in debugging. | |
| 29 | 37 | [Aaron Giles] |
| 30 | 38 | |
| 31 | ARM7 improvements: [R. Belmont] | |
| 32 | - Added ARMv5+ CLZ instruction. | |
| 33 | - Added ARMv5TE instructions: QADD, QDADD, QSUB, QDSUB, SMLAxy, | |
| 34 | SMLALxy, SMULxy, SMULWy, and SMLAWy | |
| 35 | - Fixed disassembly of CLZ | |
| 39 | Remove remaining references to machine->cpu[n]. Removed cpu[n] array. | |
| 40 | Replaced with machine->firstcpu which is a fast access to the head | |
| 41 | of the list of CPUs. [Aaron Giles] | |
| 36 | 42 | |
| 37 | Improved DIP switches in toypop. [kanikani] | |
| 43 | Minor cleanup of machine/generic.c. Changed watchdog_read handlers to | |
| 44 | return the address space's unmapped value rather than 0xff. | |
| 45 | [Aaron Giles] | |
| 38 | 46 | |
| 39 | Audited and added GAME_SUPPORTS_SAVE flag to all games in the mappy.c | |
| 40 | driver (superpac, pacnpal, grobda, phozon, mappy, todruaga, digdug2, | |
| 41 | motos and clones of each) [MooglyGuy] | |
| 47 | Fixed CIA PRA, PRB, DDRA, DDRB ports. [robiza] | |
| 42 | 48 | |
| 43 | Naomi update [Deunan Knute, R. Belmont] | |
| 44 | - Implemented cartridge protection chip mechanism | |
| 45 | - Added protection data for doa2 and doa2m | |
| 46 | - Added real dumped cartridge X76F100 data for doa2/doa2m | |
| 49 | Added discrete sound to the Noraut Poker games. | |
| 50 | [Derrick Renaud, Roberto Fresca] | |
| 47 | 51 | |
| 48 | Several MESS-specific snes fixes for rendering. [Angelo Salese] | |
| 52 | Funworld.c changes: [Roberto Fresca] | |
| 53 | * Discovered and documented new features in Jolly Card (Evona | |
| 54 | Electronics). | |
| 55 | * Removed the commented hack for joly980 driver init since is not | |
| 56 | needed anymore. | |
| 57 | * Fixed a bug introduced with the massive input change, that didn't | |
| 58 | allow initialize all sets that need the normal procedure to do it. | |
| 59 | * Updated technical notes. | |
| 49 | 60 | |
| 50 | Merit Multi-Poker improvements: [Roberto Fresca] | |
| 51 | * Full Inputs. | |
| 52 | * DIP Switches. | |
| 53 | * Simulated spark-watchdog circuitery. | |
| 54 | * Demuxed custom port. | |
| 55 | * NVRAM support. | |
| 56 | * CPU clock derived from #defined crystal. | |
| 57 | * 8000-8007 Output ports. | |
| 58 | * Coin related counters. | |
| 59 | * Sound components and trigger found at 8000-8003, bit2. | |
| 60 | * Full lamps support. | |
| 61 | * PCBs layouts & technical notes. | |
| 62 | The 4 games are fully playable. Sound seems to be discrete, so the | |
| 63 | circuitery need to be traced. Colors are still wrong. | |
| 61 | PIC16C5x CPU - Fixed the T0CKI count input being controlled by the | |
| 62 | wrong edge sensing. [Quench] | |
| 64 | 63 | |
| 65 | Added documentation regarding different Cobra Command versions. | |
| 66 | [Ruben Panossian] | |
| 64 | SNES: Added emulation for the DSP-3 and DSP-4 add-on chips, based on | |
| 65 | latest ZSNES [ZSNES Team, Fabio Priuli] | |
| 67 | 66 | |
| 68 | Fixed card reset in Taito g-net games. [Joerg Hartenberger] | |
| 67 | G65816: Fixed a bug with SBC opcode N flag behaviour in Decimal Mode. | |
| 68 | [Angelo Salese] | |
| 69 | 69 | |
| 70 | Fixed gun and crosshair positioning in TimeCrisis and Bubble Trouble. | |
| 71 | [hap] | |
| 70 | Segas24 rom games don't have NVRAM; fixed nvram_save writing 0KB | |
| 71 | file. [hap] | |
| 72 | 72 | |
| 73 | Decoded some ram based tiles in jclub2. [David Haywood] | |
| 73 | 68681/2681 duart: When a channel is in loopback mode, do not actually | |
| 74 | transmit bytes sent to that duart channel over the TX pin. | |
| 75 | [Lord Nightmare] | |
| 74 | 76 | |
| 75 | Fixed interrupts in the cischeat driver, fixing Scud Hammer and | |
| 76 | Arm Champs II. [hap] | |
| 77 | Hooked up F6 again as a global cheat enable/disable. [Pugsy] | |
| 77 | 78 | |
| 79 | i386 fixes: [Gabriele Gorla] | |
| 80 | - Add missing arpl instruction | |
| 81 | - Fixed BCD carry | |
| 82 | - Fixed disassembly of group D8 when modrm > 0xc0 | |
| 83 | - Add fucompp instruction to disassembler | |
| 78 | 84 | |
| 85 | Added "increase or equal" and "decrease or equal" options to the new | |
| 86 | cheat commands. [Sandro Ronco] | |
| 79 | 87 | |
| 80 | New games added or promoted from NOT_WORKING status | |
| 81 | --------------------------------------------------- | |
| 82 | Multi-Poker [Roberto Fresca] | |
| 88 | Added helper function core_i64_hex_format. Replaced several printf | |
| 89 | cases in the debugger with this function to avoid runtime differences | |
| 90 | on older Windows systems. Also fixed up some error logging messages | |
| 91 | to output the correct number of characters for addresses and data, | |
| 92 | using the new function. [Aaron Giles] | |
| 83 | 93 | |
| 94 | Added missing static and const qualifiers, and fixed up some header | |
| 95 | files. [Atari Ace] | |
| 84 | 96 | |
| 85 | 97 | |
| 86 | New clones added | |
| 87 | ---------------- | |
| 88 | Super Free Kick (set 2) [Klaus Sommers] | |
| 89 | 98 | |
| 99 | New games added or promoted from NOT_WORKING status | |
| 100 | --------------------------------------------------- | |
| 101 | Povar / Sobrat' Buran / Agroprom [Mariusz Wojcieszek] | |
| 102 | Czernyj Korabl [Mariusz Wojcieszek] | |
| 103 | Brodjaga [Mariusz Wojcieszek] | |
| 90 | 104 | |
| 91 | 105 | |
| 92 | 0.132u5 | |
| 106 | ||
| 107 | 0.133u5 | |
| 93 | 108 | ------- |
| 94 | 109 | |
| 95 | 110 | |
| 96 | 111 | MAMETesters Bugs Fixed |
| 97 | 112 | ---------------------- |
| 98 | - 03250: [DIP/Input] empcity and clones: Credits are registering twice | |
| 99 | (Luigi30) | |
| 100 | - 03309: [Crash/Freeze] All Sets in ojankohs.c: When game issues a | |
| 101 | sound/voice, the game crashes (Tafoid) | |
| 102 | - 03308: [Crash/Freeze] overdriv: Game Resets at "Ram Check" (Tafoid) | |
| 103 | - 03235: [Graphics] timecris and clones: Severe graphics corruption | |
| 104 | (Skeleton081983) | |
| 105 | - 03299: [Core] tehkanwcc: double and wrong rom definition | |
| 106 | (Roman Scherzer) | |
| 107 | - 03305: [Graphics] blockout, blckoutj, blckout2: The text in yellow | |
| 108 | on the "blockmaster" screen is corrupted (Fabio Priuli) | |
| 109 | - 00772: [Gameplay] burnforc: The powerup item is always "L" in mame. | |
| 113 | - 03240: [Crash/Freeze] topracra: Error Message: devcb_resolve_read8: | |
| 114 | unable to find input port 'IN0L' (couriersud) | |
| 115 | - 03426: [Sound] wtennis: Missing ball sound (Tafoid) | |
| 116 | - 03422: [Graphics] porter: Missing in-game graphics (Tafoid) | |
| 117 | - 03421: [Crash/Freeze] samuraia, sngkace: Access Violation (hap) | |
| 118 | - 03420: [Crash/Freeze] espial, espialu, netwars: Access Violation | |
| 110 | 119 | (hap) |
| 111 | - 02197: [Gameplay] rthun2, rthun2j, finehour: Black screen, game does | |
| 112 | not start (Phil Bennett) | |
| 113 | - 03298: [Compiling] Warning at devintrf.c:128 compiling with MSVC | |
| 114 | (Aaron Giles) | |
| 120 | - 03416: [Crash/Freeze] bradley: Exits with DISCRETE_ADJUSTMENT_TAG - | |
| 121 | NODE_88 has invalid tag. (couriersud) | |
| 122 | - 03418: [Crash/Freeze] dday, ddayc: Access Violation after coin | |
| 123 | insertion (M.A.S.H.) | |
| 124 | - 03025: [Sound] bzone, bzone2, bzonec: inaccurate sound effects | |
| 125 | (couriersud) | |
| 126 | - 03413: [Compiling] 64-bit compiler warnigs (Aaron Giles) | |
| 127 | - 03391: [Misc.] popn2 & bmclubmx: CHD version is V3 for the two new | |
| 128 | added sets (hap) | |
| 129 | - 03073: [Sound] scorpion, scorpiona, scorpionb: Sound Missing | |
| 130 | (couriersud) | |
| 131 | - 03075: [Sound] explorer: Sound Missing (couriersud) | |
| 115 | 132 | |
| 116 | 133 | |
| 117 | 134 | |
| 118 | 135 | Source Changes |
| 119 | 136 | -------------- |
| 120 | DIPSW update [kanikani] | |
| 121 | - fixed default setting of jjsquawk, marked the game as | |
| 122 | IMPERFECT_SOUND, and added some notes | |
| 123 | - added DIPLOCATION for toypop and liblrabl | |
| 137 | Discrete sound updates: [couriersud] | |
| 138 | - Fix comments for DISCRETE_TRANSFORM | |
| 139 | - FatalError if formula is bad | |
| 140 | - Fixed two bugs in DISCRETE_RCDISC3 | |
| 141 | - Fix some ugly bugs around DISCRETE_FILTER_SW: | |
| 142 | - No more iterations | |
| 143 | - The CD4066 internal resistance largely determines sound | |
| 144 | amplitude. This may vary significantly depending on VCC and | |
| 145 | type (74HC, 74HCV, CD4066, ...). The current choice makes | |
| 146 | scramble sound "about right". | |
| 147 | - Added some profiling code for discrete tasks | |
| 148 | - Added DISCRETE_INPUT_BUFFER to use a stream to buffer an input | |
| 149 | node. For input nodes with a lot of writes this prevents a | |
| 150 | stream_update on the whole discrete module which is very | |
| 151 | ineffective. Instead, the data is buffered and the discrete | |
| 152 | emulation can process a lot of samples in one go later. | |
| 153 | - Added disc_syc.c as a container for core modules (output, task) | |
| 154 | - Discrete wav and csv logs now are treated as nodes | |
| 155 | - Added DISCRETE_START and DISCRETE_STOP functions to be called at | |
| 156 | device start/stop | |
| 157 | - As a side effect, profiling measures log overhead as well | |
| 158 | - DSO_TASK_END now builds it's own dependence list. | |
| 159 | - now simply DSO_TASK_END() ends a task | |
| 160 | - added node parameter to RC_(DIS)CHARGE_EXP | |
| 161 | - added const where appropriate | |
| 162 | - removed some dead code | |
| 124 | 163 | |
| 125 | Intel 8255A PPI: | |
| 126 | - Added a new implementation of the I8255A device. Rewritten from | |
| 127 | scratch to properly support handshaking in modes 1 and 2. | |
| 128 | - Refactored sg1000a.c to use the new implementation. | |
| 164 | Color bprom verified correct Royal Card Pro v2. [Team Europe] | |
| 129 | 165 | |
| 130 | Redumped Konami Viper CF and NVRAM for all games and updated drivers. | |
| 131 | [Guru, Angelo Salese] | |
| 166 | De-globalified sound.c and input.c. [Atari Ace] | |
| 132 | 167 | |
| 133 | Fixed Aqua Jet sample ROM loading offset again. [Phil Bennett] | |
| 168 | Improvements to Noraut Poker driver.... [Roberto Fresca] | |
| 169 | * Corrected CPU clock to Xtal/8. | |
| 170 | * Discovered 3 new I/O lines coming from PPI-2, PC0-PC2. They are | |
| 171 | mixed with the handshake ones. | |
| 172 | * Added the READOUT button to noraut12 games. | |
| 173 | * Splitted the main machine driver to cover 2 different Noraut | |
| 174 | systems. | |
| 175 | * Added partial support for PPI-2, PC0-PC2 output lines on noraut11 | |
| 176 | games. | |
| 177 | * Figured out other remaining I/O lines. | |
| 178 | * Added new handlers to simulate the handshake lines. Still need | |
| 179 | real support through PPI-2. | |
| 180 | * Updated technical notes. | |
| 181 | * Rerouted norautp and norautjp READOUT button to its own place. | |
| 182 | * Routed the whole video RAM access through PPI-2. | |
| 183 | (bypassed the handshake lines for now). | |
| 184 | * Merged back the noraut machine drivers after the 3rd PPI connection. | |
| 185 | * Added Low Level Hopper manual input. | |
| 186 | * Added a new machine driver for extended hardware. | |
| 187 | It has 2 jumpers that cut the a14 and a15 addressing lines. | |
| 134 | 188 | |
| 135 | Fixed screen masking and left screen call drawing in tmmjprd. | |
| 136 | [Angelo Salese] | |
| 189 | Fixed i386 carry/borrow flag in ADC/SBB [Gabriele Gorla] | |
| 137 | 190 | |
| 138 | Added hardware notes to the Quake Arcade Tournament driver. | |
| 139 | [vidpro1, Andrew Gardner] | |
| 191 | Fixes to the PIC16C5x CPU core: [Quench] | |
| 192 | - Indirect addressing was not taking into account special purpose | |
| 193 | memory mapped locations. | |
| 194 | - 'iorlw' instruction was saving the result to memory instead of | |
| 195 | the W register. | |
| 196 | - 'tris' instruction no longer modifies Port-C on PIC models that do | |
| 197 | not have Port-C implemented. | |
| 140 | 198 | |
| 141 | Added mechanism for the laserdisc core to return 0 for the philips | |
| 142 | codes if video is squelched. Updated the Gottlieb and Cliff Hanger | |
| 143 | drivers to request it this way, since they decode externally. | |
| 144 | [Aaron Giles] | |
| 199 | Added difficulty DIP to BigTwin. [Quench] | |
| 145 | 200 | |
| 146 | Made a couple of minor tweaks to the Cliff Hanger driver. Fixed | |
| 147 | interrupt timing (was not taking into account interlacing) to fix up | |
| 148 | glitches in playback and ensure the disk test passes. Added SHA1 and | |
| 149 | marked the game as working. [Aaron Giles] | |
| 201 | Battery backed 2KB RAM, fixing the default high-scores in speedbal. | |
| 202 | [Pierpaolo Prazzoli] | |
| 150 | 203 | |
| 151 | Promoted Final Lap 2 & Final Lap 3 to working since they just require | |
| 152 | to init their analog controls (same sequence as Final Lap R). | |
| 153 | [Angelo Salese] | |
| 204 | Shogun Warriors - various fixes: | |
| 205 | - Extracted tables required for Shogun Warriors to work | |
| 206 | [Tomasz Slanina] | |
| 207 | - Decrypted + verified table data for Shogun Warriors [David Haywood] | |
| 208 | - Marked 2 graphic roms in Shogun Warriors as BAD_DUMP [David Haywood] | |
| 209 | - Temporarily added a hack to the collision function to only use the | |
| 210 | B.Rap Boys code if the game is B.Rap Boys until we have a single | |
| 211 | function that works with both [David Haywood] | |
| 154 | 212 | |
| 155 | Added basic support in bitmap.c for 64-bit indexed bitmaps. As a | |
| 156 | result, you will need a full recompile with this change, since the | |
| 157 | bitmap formats enum was altered. [Aaron Giles] | |
| 213 | SuperFX updates [Anonymous] | |
| 214 | - Fixed disassembly of LMULT/FMULT ops | |
| 215 | - Fixed reads using LDW/LDB | |
| 216 | - Fixed writes using STW/STB | |
| 217 | - Fixed SBC carry behavior | |
| 218 | - Fixed GETC ROM access behavior | |
| 219 | - Some SuperFX games begin to show things in MESS | |
| 220 | - At least partly fixed PLOT and RPIX behavior. This fixes many gfxs | |
| 221 | in Star Fox and Vortex, but no polys yet. | |
| 158 | 222 | |
| 159 | Introduced new feature -burnin, which can be used to generate a PNG | |
| 160 | that represents the overall brightness seen during the course of | |
| 161 | running a game. This PNG can be used as a fake "bezel" that overlays | |
| 162 | the screen via the artwork systems (with a low alpha, say 0.1 or 0.2) | |
| 163 | to simulate running a game with a monitor that has been burned in | |
| 164 | from another game. [Aaron Giles] | |
| 223 | Simplified kaneko16 decryption functions by working out what each of | |
| 224 | the bits does and removing game specific references. Re-based the | |
| 225 | decryption tables as a result. End result is verified to be the same. | |
| 226 | [David Haywood] | |
| 165 | 227 | |
| 166 | ||
| 228 | Added | |
| 167 | 229 | |
| 168 | Made pr8210 serial processing a little more robust. [Aaron Giles] | |
| 230 | Fix circus charly slowdowns: [couriersud] | |
| 231 | - use SOUND_DAC device to "buffer" data and avoid 1 sample updates | |
| 232 | for discrete part | |
| 233 | - this is related to "03401: circusc and clones: Slowdown in | |
| 234 | attract mode with DIP SW "Demo Sounds=ON"" though I do not | |
| 235 | consider it a bug, but a implementation optimization. | |
| 169 | 236 | |
| 170 | Fixed year for Mighty Monkey (and clones) based on US Copyright | |
| 171 | Searches. [Braille] | |
| 237 | Fixed sound banking for Shogun Warriors [David Haywood] | |
| 172 | 238 | |
| 173 | ARM7 updates [R. Belmont, Ryan Holtz] | |
| 174 | - Prepped to support multiple architecture versions | |
| 175 | - Added ARM9 CPU type (ARMv5TE) | |
| 176 | - Added mostly-stubbed system coprocessor/MMU support | |
| 239 | Added different TOD implementation for CIA6526 and CIA8520. [robiza] | |
| 177 | 240 | |
| 178 | Fixed resource leak in core_fload(). [Aaron Giles] | |
| 241 | Fixed a small bug with kaneko16 graphic decoding and removed old | |
| 242 | comment about bad sound banking. [David Haywood] | |
| 179 | 243 | |
| 180 | Added flashv2.u30 (v2 bios) to the taitogn driver. [Joerg Hartenberger] | |
| 244 | SuperFX updates: [Harmony] | |
| 245 | - Inlined a number of functions for possible speed increase | |
| 246 | - Removed some memory buffering cruft, to be re-added later | |
| 247 | - Fixed behavior of ASR opcode | |
| 248 | - With additional MESS-side changes, Stunt Race FX is playable, and | |
| 249 | Vortex shows much more. | |
| 250 | - Hooked up RAM and ROM buffering | |
| 251 | - Inlined several more functions | |
| 252 | - Removed debug spew | |
| 253 | - Added the ability to define an external IRQ line callback, and | |
| 254 | hooked it up to the 65C816 | |
| 255 | - Fixed flag calculation for HIB opcode | |
| 256 | - Hooked SuperFX chip up to the SNES machine driver | |
| 257 | - Fixed carry handling in ADC, ADCI, SBC and SBCI opcodes. Fixes many | |
| 258 | SNES SuperFX bugs. | |
| 181 | 259 | |
| 182 | Added IDE Lock mechanism to the IDE Driver in MAME, so games on gnet | |
| 183 | v2 bios are working correct now (idectrl.c / idectrl.h) & taitogn.c. | |
| 184 | [Joerg Hartenberger] | |
| 260 | Added some basic cheat search functionality to the debugger, allowing | |
| 261 | searches on various memory sizes. [Sandro Ronco] | |
| 185 | 262 | |
| 186 | Further improvements for Shogun Warriors: | |
| 187 | [David Haywood, Tomasz Slanina] | |
| 188 | -- decoded tables for several of the startup commands, made some | |
| 189 | observations, was unable to properly decode table 0x80, second byte | |
| 190 | scrambling is .. odd, so just using extract data right now. | |
| 191 | -- properly mapped inputs in Shogun Warriors | |
| 192 | -- decodes a block of data used by the Japanese version (fjbuster) | |
| 193 | for the character select screen. Basically block 0x40 is the same | |
| 194 | as mcu block/table 0x41, but using different encryption (inline | |
| 195 | encryption table + additional overlay table instead of each byte | |
| 196 | being bit shifted) | |
| 263 | Added 'Reload All' option to the cheat menu. [Pugsy] | |
| 197 | 264 | |
| 198 | Updated Jockey Club II notes. [David Haywood, Gerald] | |
| 265 | Enabled display of cheat comments from within the cheat menu. Press | |
| 266 | the SPACE key to toggle display. [Pugsy] | |
| 199 | 267 | |
| 200 | ||
| 268 | Tweak | |
| 201 | 269 | |
| 202 | Added new split tool that can be used for splitting giant files | |
| 203 | with per-file hashes and without corrupting them. [Aaron Giles] | |
| 270 | Added new function mame_fclose_and_open_next() which will close a | |
| 271 | file and then keep searching the searchpath for the next valid file. | |
| 272 | Did some internal rearranging in fileio.c to make this work. | |
| 273 | [Aaron Giles] | |
| 204 | 274 | |
| 275 | Changed cheat search so that it loads *all* cheat files in all search | |
| 276 | paths. Note that it is easy to end up with duplicate entries this way. | |
| 277 | Some currently disabled code is present which filters out duplicates, | |
| 278 | but the logic for doing this is quite unclear with the presence of | |
| 279 | text-only cheats, which is why the code is disabled for now. | |
| 280 | [Aaron Giles] | |
| 205 | 281 | |
| 282 | M377xx: fix CLB/SEB when not in bank 0. [R. Belmont] | |
| 206 | 283 | |
| 207 | New games added or promoted from NOT_WORKING status | |
| 208 | --------------------------------------------------- | |
| 209 | Cliff Hanger [Aaron Giles, Warren Ondras, Ernesto Corvi] | |
| 210 | Cobra Command (M.A.C.H. 3 conversion) [Aaron Giles, Warren Ondras] | |
| 211 | Otenami Haiken Final (V2.07JC) [Joerg Hartenberger] | |
| 212 | Back Fire (Tecmo) [Tirino73, David Haywood] | |
| 284 | Fixed numerous opcodes in the AVR8 core [Harmony] | |
| 213 | 285 | |
| 286 | Enabled alternate register naming in the MIPS core [Harmony] | |
| 214 | 287 | |
| 288 | Add loopback mode and counter/timer modes 3 and 6 to 68681 DUART, | |
| 289 | self-tests now pass in dectalk in MESS. [Lord Nightmare] | |
| 215 | 290 | |
| 216 | New clones added | |
| 217 | ---------------- | |
| 218 | Witch Card (german?) [Team Europe / Dumping Union] | |
| 291 | SNES updates: [R. Belmont, Harmony] | |
| 292 | - Corrected ROM loading behavior for SuperFX games | |
| 293 | - Added more ROM mirroring needed by certain SuperFX 2 games | |
| 294 | - Corrected the behavior of certain bit-restricted SuperFX registers. | |
| 295 | Doom, Yoshi's Island, Dirt Trax FX and Voxel Demo show things now. | |
| 296 | - Improved S-DD1 emulation, neither game using S-DD1 boots yet | |
| 219 | 297 | |
| 298 | Added preliminary Zilog Z8 CPU core for MESS. [Curt Coder] | |
| 220 | 299 | |
| 300 | Cleaned up drivers that write files which are not being actively | |
| 301 | developed. Also, commented our or changed the printf-ing of some | |
| 302 | messages to LOGERROR. [Tafoid] | |
| 221 | 303 | |
| 222 | New games marked as GAME_NOT_WORKING | |
| 223 | ------------------------------------ | |
| 224 | Shootout Pool [f205v] | |
| 225 | Multipede [Angelo Salese] | |
| 226 | Cobra Command (Data East LD) [Angelo Salese] | |
| 227 | Road Blaster (Data East LD) [Angelo Salese] | |
| 228 | Time Traveller [Angelo Salese] | |
| 229 | Super Cherry Master [Team Europe / Dumping Union] (incomplete set) | |
| 304 | Made numerous corrections to SNES S-DD1 chip emulation, SFA2 and | |
| 305 | Star Ocean still do not boot [Harmony] | |
| 230 | 306 | |
| 307 | Golden Poker driver... [Roberto Fresca] | |
| 308 | * Added 2 new Witch Card sets. | |
| 309 | * Reworked inputs for Witch Card (german set 1). | |
| 310 | * Created new inputs for Witch Card (english, witch game, lamps). | |
| 311 | * Added and connected lamps for both sets. | |
| 312 | * Added minimal bet and 50/60 Hz. switches to both sets. | |
| 313 | * Added DIP switches info for Witch Card (german, set 2). | |
| 231 | 314 | |
| 315 | Added missing rom to a GEI Poker set [Team Europe, Dumping Union] | |
| 232 | 316 | |
| 233 | 0.132u4 | |
| 234 | ------- | |
| 317 | Naomi/Atomiswave video hardware update: [David Haywood] | |
| 235 | 318 | |
| 319 | Basically the region array is processed, and the data from the | |
| 320 | accumulation buffer where we render is now copied into the | |
| 321 | framebuffer depending on the tiles specified in the tile list. | |
| 322 | This isn't full 'tile-based rendering' as that would require more | |
| 323 | work on the preprocessing side, and writing out the data pointers | |
| 324 | and data in real formats, however it's a step in the right direction | |
| 236 | 325 | |
| 237 | MAMETesters Bugs Fixed | |
| 238 | ---------------------- | |
| 239 | - 03277: [DIP/Input] batrid & clones: If you select freeplay, hit | |
| 240 | score, music & sound dips are inverted vs MAME tab | |
| 241 | (Fabio Priuli) | |
| 242 | - 03292: [Crash/Freeze] battles, gallag, gatsbee: [debug] assert: | |
| 243 | src/mame/machine/namco06.c:240: state->device[2] != NULL || | |
| 244 | config->chip2 == NULL (Fabio Priuli) | |
| 245 | - 03019: [Core] Sets with added Shifters: Running with the Shifter | |
| 246 | changes orientation in vertical games (Mr. Do) | |
| 326 | Currently only 565 formats are supported for both framebuffer write | |
| 327 | and framebuffer read. The accumulation buffer is alwys 8888, data | |
| 328 | is converted down to the specified format. The real accumulation | |
| 329 | buffer is 32x32 and filled per tile, ours is still full screen. | |
| 247 | 330 | |
| 331 | The video update now just displays the framebuffer using the | |
| 332 | framebuffer read parameters specified (again only 565 is currently | |
| 333 | supported) This allows the Atomiswave bios screens and the | |
| 334 | rendered output to co-exist. | |
| 248 | 335 | |
| 336 | Added proms to scherrym [Team Europe] | |
| 249 | 337 | |
| 250 | Source Changes | |
| 251 | -------------- | |
| 252 | Fixed sound in Seibu Cup Soccer bootleg [Angelo Salese] | |
| 338 | Jaguar updates: [Robbbert] | |
| 339 | - Added RGB 24-bit pixels (for Iron Soldier) | |
| 340 | - Added depth 0 and 1 to scaled bitmaps (for Val Disere Skiing) | |
| 341 | - Preliminary work on PIT support | |
| 253 | 342 | |
| 254 | ||
| 343 | G | |
| 255 | 344 | |
| 256 | K053936 cleanup and some improvements for Racin' Force [David Haywood] | |
| 345 | Added verbose debug logging for the little robin 'vdp' writes in | |
| 346 | preparation for looking at it further. [David Haywood] | |
| 257 | 347 | |
| 258 | ||
| 348 | Improved | |
| 259 | 349 | |
| 260 | Added very basic SCC68070 implementation, currently is just a basic | |
| 261 | m68k with 32-bits of address lines. The plan is to add the on-chip | |
| 262 | peripherals on the magicard.c driver then, when I get some | |
| 263 | consistency, hardwire it to the cpu core. [Angelo Salese] | |
| 350 | Fixed the plane order in the gfx deodes for Black Touch '96 sprites, | |
| 351 | and Poke Champ sprites. [David Haywood] | |
| 264 | 352 | |
| 265 | Better fix for Amiga AGA ddf_stop_pixel, to avoid breaking Amiga 1200 | |
| 266 | startup screen. [Mariusz Wojcieszek] | |
| 353 | Improveed the sprite emulation in Black Touch '96 (still wrong tho). | |
| 354 | [David Haywood] | |
| 267 | 355 | |
| 268 | Fixed Cubo CD32 framerate to 50 [Mariusz Wojcieszek] | |
| 356 | Fixed LOOP instructions in 16-bit mode in the i386 core. | |
| 357 | [Gabriele Gorla] | |
| 269 | 358 | |
| 270 | Confirmed Last Duel sets and changed to use genuine GFX ROMs | |
| 271 | [Team Japump] | |
| 359 | Added various notes + checksums for Chihiro board. | |
| 360 | [Alex's Rom Dumping Project, Mr Mudkips, Philip Burke] | |
| 272 | 361 | |
| 273 | Marked vf3tb CROM0 ROMs as BAD_DUMP (they should be 4MB). Updated game | |
| 274 | status notes. [Phil Bennett] | |
| 362 | Fixed stupid unidasm bug that double-counted bytes. [Aaron Giles] | |
| 275 | 363 | |
| 276 | Allow skeetsht to put some gfxs. [Angelo Salese] | |
| 364 | Major Naomi/Atomiswave update: | |
| 365 | - Emulated Atomiswave coin slots and standard Dreamcast controller. | |
| 366 | Non-lightgun games without other problems are now playable. | |
| 367 | [R. Belmont] | |
| 368 | - Added protection data to Moero Justice Gakuen, Heavy Metal | |
| 369 | Geomatrix, WWF Royal Rumble, Gigawing 2, Toy Fighter, and Guilty | |
| 370 | Gear X (all are now playable but still marked GAME_NOT_WORKING | |
| 371 | due to general Naomi concerns). | |
| 372 | [R. Belmont, Guru, Deunan Knute, Cah4e3] | |
| 373 | - Completed partial dumps: Derby Owners Club II, Slashout, WWF | |
| 374 | Royal Rumble, Gigawing 2, Moero Justice Gakuen, Wild Riders, | |
| 375 | Virtua Fighter 4 (cartridge) [Guru] | |
| 277 | 376 | |
| 278 | SCC68070: hooked up basic registers in the memory map. [Angelo Salese] | |
| 377 | Rename osd_profiling_ticks() to get_profile_ticks(). Moved | |
| 378 | implemention into inline functions in eminline.h and the ei* | |
| 379 | functions. [couriersud, Aaron Giles] | |
| 279 | 380 | |
| 280 | Update to the lastduel.c driver: | |
| 281 | * Better rom load / decode for Last Duel sets [David Haywood] | |
| 282 | * Readme / PCB layout [Guru] | |
| 283 | * Corrected rom labels and added PCB locations to Mad Gear / LED | |
| 284 | Storm sets [Brian Troha] | |
| 381 | Added 'options' parameter to the CPU_DISASSEMBLE prototype. For now, | |
| 382 | the debugger always passes 0 for this. unidasm has been updated to | |
| 383 | accept a mode parameter, which is passed for the options. | |
| 384 | [Aaron Giles] | |
| 285 | 385 | |
| 286 | model3: masked CROM bank, fixes missing gfx in several games. | |
| 287 | [R. Belmont] | |
| 386 | Added PORT_CROSSHAIR_MAPPER() allowing you to specify an alternate, | |
| 387 | non-linear mapping function from the raw crosshair value to its | |
| 388 | position onscreen. [Aaron Giles] | |
| 288 | 389 | |
| 289 | Adds DIP port locations to Last Duel & Mad Gear sets. [Brian Troha] | |
| 290 | 390 | |
| 291 | Added redumped vf3tb ROMs [Guru] | |
| 292 | 391 | |
| 293 | Tokimeki Mahjong Paradise driver improvements: | |
| 294 | - split tmmjprd / tmpdoki from rabbit.c as it uses the graphic chip | |
| 295 | in a very different way, and having them together was making it | |
| 296 | more difficult to make progress on [David Haywood] | |
| 297 | - changed them to use custom rendering code instead of tilemaps, as | |
| 298 | they can address tile data at a sub-tile level, this fixes the | |
| 299 | girls in the intro [David Haywood] | |
| 300 | - added inputs [Angelo Salese] | |
| 301 | - added some notes about a hang, and possible reason [David Haywood] | |
| 302 | - marked the graphic roms of tmpdoki as BAD as it appears to be | |
| 303 | using tiles which are not present in the tmmjprd roms for the | |
| 304 | title screen [David Haywood] | |
| 392 | New games added or promoted from NOT_WORKING status | |
| 393 | --------------------------------------------------- | |
| 394 | Shogun Warriors / Fujiyama Buster | |
| 395 | [David Haywood, Tomasz Slanina, Luca Elia] | |
| 396 | Cal Omega - Game 7.4 (Gaming Poker, W.Export) | |
| 397 | [Roberto Fresca, Team Europe] | |
| 398 | Kero Kero Keroppi no Issyoni Asobou [Team Japump!!!, Hau] | |
| 399 | Dolphin Blue [R. Belmont, Guru] | |
| 400 | The Rumble Fish [R. Belmont, Guru] | |
| 401 | Knights of Valour: The Seven Spirits [R. Belmont, Guru] | |
| 305 | 402 | |
| 306 | ARM (26-bit): TST/TEQ should only update flags. This eliminates the | |
| 307 | need for patches in poizone/ertictac, all deco32 games still run | |
| 308 | (including hvysmsh), and it better matches the documentation. | |
| 309 | [R. Belmont] | |
| 310 | 403 | |
| 311 | Updated the Led Storm Rally 2011 set with the new roms as per the | |
| 312 | Guru's info. Marked this game as GAME_IPERFECT_GRAPHICS due to the | |
| 313 | bad sprite ect. [Brian Troha] | |
| 314 | 404 | |
| 315 | Corrected p911uc compact flash dump by Guru. [Angelo Salese] | |
| 405 | New clones added | |
| 406 | ---------------- | |
| 407 | Karate Champ (US, VS version set 2) [Siftware] | |
| 408 | Strong X (Strategy X bootleg) [Siftware] | |
| 409 | Mortal Kombat (Turbo 3.1 09/09/93, hack) | |
| 410 | [Jonathan Hughes, Patrick McCarron] | |
| 411 | Narc (Rev 2.0) [Volker Hann, Team Europe] | |
| 412 | Witch Card (english, witch game, lamps) [Roberto Fresca, Team Europe] | |
| 413 | Master Ninja (bootleg of Ninja Gaiden) [f205v, David Haywood] | |
| 414 | (NOT WORKING) | |
| 316 | 415 | |
| 317 | Added fade in/fade out effects for tmmjprd [Angelo Salese] | |
| 318 | 416 | |
| 319 | Document the Pacman on Tecmo World Cup '90 hardware. Lists the roms | |
| 320 | plus CRC32 / SHA1 in the comment section to prevent it from turning | |
| 321 | up as a newly "found" game and to show users MAME is aware of it | |
| 322 | existence. [Brian Troha] | |
| 417 | New games marked as GAME_NOT_WORKING | |
| 418 | ------------------------------------ | |
| 419 | Mr. Driller 2 (DR22 Ver.A) [Guru] | |
| 420 | The House of the Dead 2 [Guru] | |
| 421 | Super Major League '99 [Guru] | |
| 422 | Gun Survivor 2: Bio Hazard Code Veronica [Guru] | |
| 423 | Club Kart: European Session [Guru] | |
| 424 | The King of Fighters Neowave [R. Belmont, Guru] | |
| 425 | Neo Geo Battle Coliseum [R. Belmont, Guru] | |
| 323 | 426 | |
| 324 | Add gun I/O board to Teraburst and hook up 68k/PPC comms. Not sure how | |
| 325 | the guns are read yet but this fixes the CALL ATTENDENT immediate | |
| 326 | death and the game runs fine now. [R. Belmont] | |
| 327 | 427 | |
| 328 | Changes to support address maps for arbitrary devices: [Aaron Giles] | |
| 329 | 428 | |
| 330 | - Moved address_map array from cpu_config to device_config. Added MDRV | |
| 331 | macros in the device for specifying address maps. Changed the memory | |
| 332 | system to fetch the maps from the new location. | |
| 429 | 0.133u4 | |
| 430 | ------- | |
| 333 | 431 | |
| 334 | - Moved the address-space related get_info constants to devintrf | |
| 335 | (including endianness). Removed space array from the CPU class | |
| 336 | header. Made the memory system much more device-neutral. Various | |
| 337 | other cleanups along the way. | |
| 338 | 432 | |
| 339 | - Expanded address maps from 3 to 4. Moved ADDRESS_SPACE_PROGRAM/DATA/ | |
| 340 | IO constants to cpuintrf, as those names are really only applicable | |
| 341 | to CPUs. Added new ADDRESS_MAP_0/1/2/3 constants to identify address | |
| 342 | maps more generically. | |
| 433 | MAMETesters Bugs Fixed | |
| 434 | ---------------------- | |
| 435 | - 03405: [Misc.] trckydoc trckydoca: Default hiscore wrong | |
| 436 | (Pierpaolo Prazzoli) | |
| 437 | - 03412: [Gameplay] goindol and clones: Unable to control and graphics | |
| 438 | corrupted (Tafoid) | |
| 439 | - 03404: [Crash/Freeze] Some drivers using mc6845.c: Access Violation | |
| 440 | (hap) | |
| 441 | - 01043: [DIP/Input] m79amb: There's considerable difficulty in aiming | |
| 442 | in the game. (hap) | |
| 443 | - 01754: [Graphics] tm7k, tm, tm3k, tm4k, tm5k: Background Color/ | |
| 444 | Palette Incorrect (Luca Elia) | |
| 445 | - 02191: [Sound] wseries, basebal2, dblplay, strkzone: Speech quality | |
| 446 | regression (couriersud) | |
| 447 | - 02608: [Color/Palette] machomou: Colors are wrong. (hap) | |
| 343 | 448 | |
| 344 | - Updated memory system to be more general about address map handling. | |
| 345 | Added the concept of default address maps (in addition to the | |
| 346 | already existing internal memory maps). The difference between | |
| 347 | internal and default memory maps is that internal memory maps always | |
| 348 | override everything (including user-specified maps), but default | |
| 349 | memory maps simply provide a default that can be overridden. | |
| 350 | 449 | |
| 351 | - Converted the okim6295 sound driver to use address maps for access. | |
| 352 | By default, it defines a ROM address map that overlays its full | |
| 353 | region. As a result, the validity checks require all okim6295 | |
| 354 | regions to be at least 256k, unless you provide your own address | |
| 355 | map. Updated all regions to meet this requirement. | |
| 356 | 450 | |
| 357 | - Updated the atarijsa code to use a custom address space for its | |
| 358 | okim6295 accesses (which are banked on the first half and static on | |
| 359 | the second half), as an example of configuring a device with a | |
| 360 | custom address space. | |
| 451 | Source Changes | |
| 452 | -------------- | |
| 453 | Intel 8085: [Curt Coder] | |
| 454 | - refactored callbacks to use devcb | |
| 455 | - added 8080A variant | |
| 361 | 456 | |
| 362 | - For now, attempts to use okim6295_set_bank_base() will still work, | |
| 363 | though banking for the okim chips should be moved to custom address | |
| 364 | maps in the drivers eventually. The first time | |
| 365 | okim6295_set_bank_base() is called, it will install a banked memory | |
| 366 | handler over the region and use memory_set_bankptr() to change the | |
| 367 | base on subsequent bank switches. | |
| 457 | Added helper macros to devcb for input lines tied to GND/Vcc. | |
| 458 | [Curt Coder] | |
| 368 | 459 | |
| 369 | - Moved address map validity checks to be run for each device instead of | |
| 370 | just each CPU. | |
| 460 | Added Dirt Dash wave ROM redumps [Guru] | |
| 371 | 461 | |
| 372 | Removed PREDECODE_GFX compile flag, as the on-the-fly decoding seems | |
| 373 | to be working reliably. Deprecated the ROMREGION_DISPOSE flag, as 98% | |
| 374 | of the use of it no longer is applicable with on-the-fly decoding, | |
| 375 | and the remaining cases are difficult to identify among the others. | |
| 462 | Battle Zone discrete sound & discrete sound additions: [couriersud] | |
| 463 | - added discrete sound to battle zone | |
| 464 | - engine frequency (resistor R11) can be changed with slider | |
| 465 | - discrete sound may be disabled by setting BZONE_DISCRETE to 0 in | |
| 466 | bzone.h | |
| 467 | ||
| 468 | Discrete sound improvements: [couriersud] | |
| 469 | - DISCRETE_RCDISC3: added diode junction voltage; junction voltage | |
| 470 | also indicates polarity | |
| 471 | - DISCRETE_OPAMP_FILTER: added type | |
| 472 | DISC_OP_AMP_FILTER_IS_LOW_PASS_1M; INP2 takes role of v_ref in | |
| 473 | this type | |
| 474 | - DISCRETE_OPAMP: fixed a bug (possible divide by 0) | |
| 475 | - DISCRETE_LFSR: fixed bug preventing output of shift reg to sub | |
| 476 | node 1 | |
| 477 | ||
| 478 | SNES improvements: [Angelo Salese] | |
| 479 | - Fixed half colour blending behaviour | |
| 480 | ||
| 481 | Added infrastructure to compile universal standalone disassembler: | |
| 376 | 482 | [Aaron Giles] |
| 483 | - added unidasm to the tools build | |
| 484 | - split the disassemblers out of libcpu and into new libdasm | |
| 485 | - ensured the disassembly entry points for all disassemblers are | |
| 486 | in the source file for the disassembler (sometimes new generic | |
| 487 | versions were created) | |
| 377 | 488 | |
| 378 | Documentation updates: [Kevin Eshbach] | |
| 379 | * For Super Basketball adds the rom locations for those that were | |
| 380 | missing before and adds the jumper settings | |
| 381 | * Documents the SEGA cpu part number for Future Spy and Super Zaxxon | |
| 489 | Improvements to Noraut Poker driver... [Roberto Fresca] | |
| 490 | * Switched to pre-defined Xtal clock. | |
| 491 | * Changed the way how graphics are banked/accessed. | |
| 492 | * Fixed the graphics offset and number of tiles per bank. | |
| 493 | * Added new set: Noraut Red Hot Joker Poker. | |
| 494 | * Added new set: Noraut Poker (NTX10A). | |
| 495 | * Added new set: Noraut Joker Poker (V3.010a). | |
| 496 | * Fixed the tile size/decode for the first GFX bank. | |
| 497 | * Added proper norautrh inputs, including the readout button. | |
| 498 | * Added partial DIP switches to norautrh. | |
| 499 | * Added an extra DIP switch to Noraut Red Hot Joker Poker. | |
| 500 | * Also added DIP locations to the whole bank. | |
| 501 | * Added a default NVRAM for Noraut Joker Poker | |
| 502 | * Executed a trojan on 2 noraut systems to confirm the way 16x32 | |
| 503 | tiles are decoded. | |
| 504 | * Fixed the x-offset for 32x32 tiles lines. | |
| 505 | * Fixed the screen aspect and visible area. | |
| 506 | * Confirmed correct colors. No bipolar PROM involved. | |
| 507 | * Added Noraut Joker Poker hardware and PCB layouts. | |
| 508 | * Documented the discrete audio circuitry. Added a full diagram. | |
| 509 | * Fixed the coin counters. | |
| 510 | * Documented all the output ports. | |
| 511 | * Added a scheme with descriptions for every existent port. | |
| 512 | * Added full lamps support to naroutp, naroutjp, naroutrh and naroutpn. | |
| 513 | * Created lamps layouts for 11 and 12-lamps scheme. | |
| 514 | * Rerouted some inputs to mantain the inputs layout. | |
| 515 | * Renamed some inputs to match the text with the real cab buttons. | |
| 516 | * Removed the imperfect colors flag from the existent sets. | |
| 517 | * Added 2 different control panel layouts to the source. | |
| 518 | * Updated technical notes. | |
| 382 | 519 | |
| 383 | safarir: fixed colors and filenames, and added samples [Hau] | |
| 520 | Fixed redundancy in clock speed assignments in some drivers by | |
| 521 | cleaning all divided by 1 (/1) instances. [Tafoid] | |
| 384 | 522 | |
| 385 | Update Deniam driver YM3812 clocks to match recording. | |
| 386 | [Lord Nightmare] | |
| 523 | Argonaut SuperFX core improvements: [Anonymous] | |
| 524 | - Hooked up Branch instructions | |
| 525 | - Fixed numerous SuperFX core bugs. | |
| 526 | - Improved disassembler to more gracefully handle ALT* opcode effects. | |
| 527 | - Corrected instruction behaviors: STOP, SUB, SBC, SUBI, CMP | |
| 528 | - Added LSR and ROL opcodes | |
| 529 | - Updated instructions to use the safer superfx_gpr_write: LOOP, | |
| 530 | PLOT, INC, DEC | |
| 531 | - Added missing register writeback to LMS | |
| 532 | - Corrected carry flag behavior in ROL opcode | |
| 533 | - Corrected BRA target address calculation (maybe still wrong) | |
| 534 | - Corrected LOOP target address calculation | |
| 535 | - Made sure that FROM sets cpustate->sreg_idx | |
| 536 | - Disabled RAM/ROM clocking, going with instant transfer for now | |
| 537 | - Understood and re-enabled pipelined instruction architecture, Star | |
| 538 | Fox runs farther | |
| 539 | - Fixed a ridiculous typo in ROL instruction | |
| 540 | - Fixed overflow flag calculation on ADDI / ADCI | |
| 541 | - Fixed lack of register reset after ADD / ADC / ADDI / ADCI | |
| 387 | 542 | |
| 388 | Added comment about galaga.c bootlegs using 06XX emulation. | |
| 389 | [Fabio Priuli] | |
| 543 | tmaster.c update [Luca Elia] | |
| 544 | - implemented carts banking and multiple EEPROMs | |
| 545 | - added "pen replacement" blit mode | |
| 546 | - fixed palette size | |
| 390 | 547 | |
| 391 | Fixed Aqua Jet sample ROM loading [skeleton081983] | |
| 548 | Discrete work [couriersud] | |
| 549 | - change the way custom modules are handled | |
| 550 | - updated drivers mario and dkong accordingly | |
| 551 | - minor change to stream input handling | |
| 552 | - no more linear lists for nodes. All node processing switched to | |
| 553 | linked lists. | |
| 554 | - module step and reset now only get a node pointer passed | |
| 555 | - Added discrete_info * pointer to node | |
| 556 | - Only nodes with a step routine actually get processed. | |
| 557 | - Fixed a bug: discrete logs did not work since some time | |
| 558 | - preliminary parallel task constants; depending on results these may | |
| 559 | vanish again. | |
| 560 | - Overall slight performance increase. dkong 940% to 960%, galaxian | |
| 561 | 740% to 790% | |
| 392 | 562 | |
| 393 | Fix | |
| 563 | Fix | |
| 394 | 564 | |
| 395 | Improved Jockey Club 2 driver organization: [David Haywood] | |
| 396 | - added different machine drivers for the different sets. | |
| 397 | - added an st0016 to the 'older hardware' machine driver, that's | |
| 398 | what the 'z80' rom on it is for (see st0016.c) the newer | |
| 399 | hardware and bootleg don't use it. | |
| 400 | - still waiting for proper gfx dumps | |
| 565 | Fixed IM2 interrupt cycles in the Z80 core. [eke] | |
| 401 | 566 | |
| 567 | kaneko16 updates: | |
| 568 | - Decoded all protection data for B.Rap Boys | |
| 569 | [David Haywood, Tomasz Slanina] | |
| 570 | - Cleaned up decryption function for B.Rap Boys external Rom | |
| 571 | [David Haywood] | |
| 572 | - Improved video emulation for B.Rap Boys [David Haywood] | |
| 573 | - Marked several GFX roms as bad on B.Rap Boys [David Haywood] | |
| 574 | - Improved protection simulation logic w/regards to writeback | |
| 575 | addresses, allowing B.Rap Boys to boot [Tomasz Slanina] | |
| 576 | - Redumped GFX Roms [Guru] | |
| 577 | - Added hitbox simulation based on suprnova / game requirements | |
| 578 | [Tomasz Slanina] | |
| 579 | - Converted MCU writes to use write_byte [David Haywood] | |
| 580 | - Added kludge to reset MCU data write address to prevent game from | |
| 581 | running out of ram and crashing [David Haywood] | |
| 582 | - Added DSWs [David Haywood] | |
| 583 | - Added eeprom support to the B Rap Boys protection simulation | |
| 584 | [David Haywood] | |
| 585 | - Change to priorities to fix some visibility problems. | |
| 586 | [David Haywood] | |
| 402 | 587 | |
| 588 | Added correct U2 sound ROM to the mk3 sets [MK3Fan - Mike] | |
| 403 | 589 | |
| 590 | Discrete sound parallel tasks support: [couriersud] | |
| 591 | - Introduced DISCRETE_TASK_START, DISCRETE_TASK_END | |
| 592 | - DISCRETE_TASK_START: Start a new task. A task is a set of nodes | |
| 593 | which only depend on input nodes and nodes in the set | |
| 594 | - DISCRETE_TASK_END(task_output_node): Marks the end of the task. | |
| 595 | task_output_node is the node whose output over time should be | |
| 596 | preserved. This node can be accessed by nodes in the main thread. | |
| 597 | - Illustrated the concept in the dkong discrete emulation. This also | |
| 598 | has been enhanced to buffer DAC output. | |
| 599 | - Discrete tasks now support multiple task output nodes | |
| 600 | ||
| 601 | Further discrete changes: [couriersud] | |
| 602 | - DISCRETE_OUTPUT now is a stepping node. | |
| 603 | - DISCRETE_STREAM_INPUT now advances input pointer in step. | |
| 604 | - More linked_list usage. | |
| 605 | ||
| 606 | Pit Boss driver updates: [Brian Troha] | |
| 607 | - Corrected rom names for the Megastar & Supertouch 30 | |
| 608 | - Added missing rom to Supertouch 30 and verified old bad_dumps | |
| 609 | - Added documentation about the Megastar sets | |
| 610 | - Made pbst30b a clone of pbst30 and added program versions to the | |
| 611 | name, IE: Pit Boss Supertouch 30 (9234-10-01) | |
| 612 | ||
| 613 | Fixed B-Rap Boys sound banking [Phil Bennett] | |
| 614 | ||
| 615 | Sigma Poker: Fixed duplicated definition of Hold 2 button. Added the | |
| 616 | missing Hold 3 button. [Roberto Fresca] | |
| 617 | ||
| 618 | Continued discrete sound system "list-ification": [couriersud] | |
| 619 | - No more constraints on number of input and output nodes | |
| 620 | - input nodes now make use of a context | |
| 621 | ||
| 622 | Removed osd_is_bad_read_ptr function. [Aaron Giles] | |
| 623 | ||
| 624 | ||
| 625 | ||
| 404 | 626 | New games added or promoted from NOT_WORKING status |
| 405 | 627 | --------------------------------------------------- |
| 406 | Mahjong Private [Ali, Uki] | |
| 407 | Tokimeki Mahjong Paradise - Dear My Love [David Haywood, Angelo Salese] | |
| 408 | Tokimeki Mahjong Paradise - Doki Doki Hen [David Haywood, Angelo Salese] | |
| 409 | Woodpecker (set 2) [Guru] | |
| 410 | Teraburst (1998/07/17 ver UEL) [Guru, Mark Frisbee] | |
| 411 | (Greyhound) Trivia (Questions Series 11) [Brian Troha, Dumping Union] | |
| 628 | Noraut Red Hot Joker Poker [Roberto Fresca, Alan Griffin] | |
| 629 | Galaxy Games StarPak 2 [Luca Elia, Siftware] | |
| 630 | Great Football | |
| 631 | [Kevin Eshbach, Charles MacDonald, Smitdogg, Dumping Union] | |
| 632 | Pit Boss Megastar (9244-00-01) [Mariusz Wojcieszek] | |
| 633 | B.Rap Boys / B.Rap Boys Special | |
| 634 | [David Haywood, Tomasz Slanina, Luca Elia] | |
| 635 | Billiard [Alexander Stakhanov, CaH4e3, Black1972] | |
| 412 | 636 | |
| 413 | 637 | |
| 414 | 638 | |
| 415 | 639 | New clones added |
| 416 | 640 | ---------------- |
| 417 | Millennium Nuovo 4000 (Version 1.3) [Tomasz Slanina] | |
| 418 | Millennium Nuovo 4000 (Version 1.6) [Tomasz Slanina] | |
| 419 | The Next Space (Japan, licensed to PIC) [Team Japump] | |
| 420 | Peter Pan [David Haywood] | |
| 421 | Knights of the Round (World 911127, bootleg) [David Haywood] | |
| 422 | Tehkan World Cup (set 3, bootleg) [David Haywood] | |
| 423 | International Toote II (World?) [David Haywood] | |
| 424 | SportTime Table Hockey (Arcadia, set 2) [Siftware] | |
| 425 | World Darts (Arcadia, set 2) [Siftware] | |
| 426 | Ninja Mission (Arcadia, set 2) [Siftware] | |
| 427 | Sidewinder (Arcadia, set 2) [Siftware] | |
| 641 | Kollon (V2.04JC) [Joerg Hartenberger, Frank Berlt] | |
| 642 | Mortal Kombat Turbo Ninja (rev 3.1 T-Unit 03/19/93, hack) | |
| 643 | [MK3Fan - Mike] | |
| 644 | Pit Boss Megastar (9244-00-01) [Brian Troha, Dumping Union] | |
| 428 | 645 | |
| 429 | 646 | |
| 430 | 647 | |
| 431 | 648 | New games marked as GAME_NOT_WORKING |
| 432 | 649 | ------------------------------------ |
| 433 | Pirati [Tomasz Slanina] | |
| 434 | Johnny Nero Action Hero [R. Belmont, The Dumping Union] | |
| 435 | Poly-Net Warriors [Uki] | |
| 436 | Sunset Riders (bootleg of Megadrive version) | |
| 437 | [Gatinho, Smitdogg, Dumping Union, David Haywood] | |
| 438 | The House of the Dead III [GDX-0001] [MAME Italia] | |
| 439 | Jockey Club II (2 sets) [David Haywood] | |
| 440 | Quake Arcade Tournament [Siftware] | |
| 441 | Turret Tower [Siftware] | |
| 650 | Noraut Poker (NTX10A) [Roberto Fresca, Alan Griffin] | |
| 651 | Noraut Joker Poker (V3.010a) [Roberto Fresca, Alan Griffin] | |
| 442 | 652 | |
| 443 | 653 | |
| 444 | 654 | |
| 445 | 0.13 | |
| 655 | 0.133u3 | |
| 446 | 656 | ------- |
| 447 | 657 | |
| 448 | 658 | |
| 449 | 659 | MAMETesters Bugs Fixed |
| 450 | 660 | ---------------------- |
| 451 | - 03288: [Sound] raiga, stratof: Sound is messed up (Mamesick) | |
| 452 | - 03185: [Interface] All games using Lightguns: [debug] Bitmap memory | |
| 453 | Leak (Firewave) | |
| 454 | - 02797: [Core] hangplt: Hang Pilot no longer boots since the new PPC | |
| 455 | DRC went in (Phil Bennett) | |
| 661 | - 03389: [DIP/Input] amspdwy: Both cars steer with Player 1 controls | |
| 662 | - 03120: [Color/Palette] nss_lwep: Wrong colors during gameplay | |
| 663 | (Angelo Salese) | |
| 664 | - 02701: [Core] z80.c: SCF CCF X and Y flags (hap) | |
| 665 | - 02959: [Crash/Freeze] kinstb: Killer Instinct (SNES Bootleg) no | |
| 666 | longer starts up, freezes at blank screen. (R. Belmont) | |
| 667 | - 03275: [Sound] gradius4: Gradius IV Fukkatsu sound has the wrong | |
| 668 | pitch (R. Belmont) | |
| 669 | - 03387: [DIP/Input] galmedes: Demo Sound Dip Inverted (Tafoid) | |
| 456 | 670 | |
| 457 | 671 | |
| 458 | 672 | |
| 459 | 673 | Source Changes |
| 460 | 674 | -------------- |
| 461 | mlanding: fixed sub CPU reset line,fixed main-to-sound CPUs comms, | |
| 462 | added PORT_TOGGLE for the inputs and fixed color banking. Fixed analog | |
| 463 | inputs. Added DSP and background graphics. [Angelo Salese] | |
| 675 | Added a lot of new clones to multfish and cleaned up the driver. | |
| 676 | [Vampirz, Fabio Priuli, Brian Troha] | |
| 464 | 677 | |
| 465 | Added redumped sample ROMs to Hang Pilot. [Guru] | |
| 678 | Further ROM name fixes and driver name changes [Yasuhiro Ogawa] | |
| 679 | - renamed digdugb to digdug1 (it's a rev1, not a bootleg) | |
| 680 | - renamed digduga1 to digdugat1 | |
| 466 | 681 | |
| 467 | Mapped Player 2 Start in Salary Man Champ [smf] | |
| 682 | SNES Updates: [Angelo Salese] | |
| 683 | - Fixed direct color gfxs in mode 7 | |
| 684 | - Fixed direct color gfxs in mode 3/4 | |
| 685 | - Fixed a vram out-of-bounds bug | |
| 686 | - Fixed a blending bug involving main/sub color maths | |
| 687 | - Fixed interlace mode gfxs when not in gfx modes 5/6 | |
| 688 | - Fixed a GDMA boundary bug | |
| 689 | - Made the OAM address reset more accurate. | |
| 690 | - Fixed HDMA mid-frame inits. | |
| 691 | - Added clip colors to black window function | |
| 692 | - Converted color clipping to use struct entries | |
| 693 | - Made dynamic H resolutions to be called only at vblank start and and fixed gfx mode switching 1/5 and 5/1 | |
| 694 | - Made the gfx mode switches more accurate. | |
| 695 | - Corrected a bunch of SPC registers behaviour | |
| 696 | - improved joypad read/write handling and fixed a serial port quirk. | |
| 697 | - Fixed serial port for player 2 as well | |
| 698 | - Improved cart mode 20 reserved access behaviour | |
| 699 | - added OBJ interlace support | |
| 468 | 700 | |
| 469 | Marked all beatmania iidx games as not working. [smf] | |
| 701 | ST-V: Improved timer 1 irq behaviour. Pebble Beach still have issues | |
| 702 | with gameplay start though (writes lots of garbage for whatever | |
| 703 | reason, really worked for random chances before). [Angelo Salese] | |
| 470 | 704 | |
| 471 | mlanding: fixed foreground framebuffer graphics [Phil Bennett] | |
| 705 | Corrected name from Devil's Island to Devil Island. Filled in year | |
| 706 | for Fruit Bonus 2006 SE & Bug Fever. [Brian Troha] | |
| 472 | 707 | |
| 473 | Fixed AGA display window start and stop (fixes startup screen and | |
| 474 | lsrquiz & lsrquiz2 missing graphics) [Mariusz Wojcieszek] | |
| 708 | Discrete sound update: [couriersud] | |
| 709 | - removed global variable discrete_current_context | |
| 710 | - discrete_info is now passed instead of device, we may get device by | |
| 711 | using disc_info->device | |
| 712 | - Added DISCRETE_IMPORT(*block): imports another discrete block | |
| 713 | - Added DISCRETE_REMOVE(node1, node2): removes a range of nodes | |
| 714 | - Added DISCRETE_REPLACE: next node replaces existing node, thus | |
| 715 | preserving run order | |
| 716 | - Added DISCRETE_NOP(node): does nothing, to be replaced. | |
| 717 | - Added a prescanning stage to build final block list after execution | |
| 718 | of the above. | |
| 719 | - The additions provide an easy way to document subtle difference | |
| 720 | between boards. | |
| 721 | - Please see audio/galaxian.c for an example | |
| 475 | 722 | |
| 476 | Added PCB location to several rom sets in the asteroid.c driver. | |
| 477 | [Brian Troha] | |
| 723 | Galaxian sound updates: [couriersud] | |
| 724 | - Moon Cresta and Galaxian now have their respective schematics | |
| 725 | emulated, i.e. Moon Cresta has a slightly different mixing stage. | |
| 726 | - Cleaned up driver, added some section titles and comments, removed | |
| 727 | old code. | |
| 728 | - Removed emu_timer, this was causing a stream of stream_updates only | |
| 729 | updating 3 samples | |
| 730 | - Replaced with discrete timer module DSS_TIMER now. | |
| 731 | - Use DISCRETE_NOTE for pitch generation; it is more accurate | |
| 732 | (within the one ms where the pitch changes :-) ) and saves a node | |
| 733 | - Use DISCRETE_BITS_DECODE and save 2 nodes. | |
| 478 | 734 | |
| 479 | Added TMS0980 cpu core. [Wilbert Pol] | |
| 735 | YM2612/3834 updates [Eke-Eke, Nemesis] | |
| 736 | - Split YM2612/3834 to a separate file to avoid disturbing other OPN | |
| 737 | chips | |
| 738 | - SSG-EG, envelope, LFO, and CSM behavior all improved to better | |
| 739 | match tested behavior on real YM2612 chips | |
| 740 | ||
| 741 | DSS_COUNTER updates: [couriersud] | |
| 742 | - clock_node no longer needs to be static for DISC_CLK_IS_FREQ | |
| 743 | - rewrote inc/dec logic to avoid loop | |
| 480 | 744 | |
| 481 | mc68hc11 improvements: [Angelo Salese] | |
| 482 | * Added STX DIR, STY DIR opcodes. | |
| 483 | * Fixed a bug with TAP opcode. | |
| 484 | * Fixed internal RAM/internal I/O start-up state. | |
| 485 | * Fixed the I/O system by changing the has_io flag with a | |
| 486 | has_extended_io flag (switch between 0x40 and 0x100 I/O registers) | |
| 487 | the latter is used by the Taito JC HC11 CPU only at the current | |
| 488 | time. | |
| 489 | * Fixed a register r/w to allow Skeet Shooter to put some gfxs. | |
| 745 | Added DISCRETE_BIT(S)_DECODE: [couriersud] | |
| 746 | - decodes individual bits from input values | |
| 747 | - Updated drivers which had macro DISCRETE_BITSET (which was a bit | |
| 748 | misleading) | |
| 749 | - This should be slightly faster than using DISCRETE_TRANSROM | |
| 490 | 750 | |
| 491 | Added default monochrome amber and green palettes. [Curt Coder] | |
| 751 | Discrete sound enhancements: [couriersud] | |
| 752 | - Put some life into RCDISC5 enable mode. This now acts as a switch | |
| 753 | between R and C. Capacitor voltage will be preserved if disabled. | |
| 754 | - Made galaxian use the above. Saved 2 nodes and increased accuracy. | |
| 755 | - Added DISC_LFSR_FLAG_OUTPUT_SR_SN1 flag to shift register noise | |
| 756 | generator. This will output the value of the shift register to | |
| 757 | sub-node 1. This is needed for future bzone discrete sound | |
| 758 | emulation. BTW: RCDISC5 will be used as well. | |
| 759 | - Left a note on RCDISC3 on what is needed to be implemented for | |
| 760 | bzone. | |
| 761 | - Optimized the LFSR a bit. LFSRs running at high frequency | |
| 762 | (> sample_freq) should benefit. | |
| 492 | 763 | |
| 493 | Redumped m1 ROM of minasan [Team Japump] | |
| 764 | Verified and fixed deniam.c M68K, Z80, YM3812 and OKIM6295 clocks | |
| 765 | and OKI pin 7 for logic pro and logic pro 2. Fixed visible area on | |
| 766 | logic pro and logic pro 2 to match real PCBs. Add comment about what | |
| 767 | ym3812 clone is used. Add note about missing graphical effect in | |
| 768 | logic pro (screen dim on coin insert) and marked as | |
| 769 | IMPERFECT_GRAPHICS. Add note about 4 pixels at left edge of screen. | |
| 770 | [Charles MacDonald, Lord Nightmare] | |
| 494 | 771 | |
| 495 | PPCDRC: fix flags on STWCX and fix FMULS to use the correct registers. | |
| 496 | [R. Belmont] | |
| 772 | Attempt to define an I64FMT string that can be used for printf'ing | |
| 773 | 64-bit integers. This is defined to be "I64" on MSVC and recent mingw | |
| 774 | compilers, and "ll" for all others. Updated all instances of 64-bit | |
| 775 | prints to use the new macro. [Aaron Giles] | |
| 497 | 776 | |
| 498 | ||
| 777 | Added s | |
| 499 | 778 | |
| 500 | ||
| 779 | M | |
| 501 | 780 | |
| 502 | Fixed a graphic bug with Saboten Bombers. [Angelo Salese] | |
| 781 | Z80 changes: [hap] | |
| 782 | - Fixed X/Y flags in CCF/SCF/BIT, ZEXALL is happy now | |
| 783 | - Simplified DAA, renamed MEMPTR (3.8) to WZ (same temp register as | |
| 784 | the officially named WZ in the 8080), added TODO | |
| 503 | 785 | |
| 504 | Fixed magtruck to use the alternate EEPROM. [R. Belmont] | |
| 786 | 8085 changes: [hap] | |
| 787 | - fixed cycle deduction on unconditional CALL / RET, it took about | |
| 788 | half too many cycles | |
| 789 | - added cycle tables and cleaned up source layout. This was done | |
| 790 | very carefully, it should be errorfree. | |
| 791 | - removed HLT cycle eating (earlier, HLT after EI could theoretically | |
| 792 | fail) | |
| 793 | - fixed parity flag on add/sub/cmp. Bug was caused by z80 overflow | |
| 794 | detection accidentally left in | |
| 795 | - renamed temp register XX to official name WZ | |
| 796 | - renamed flags from Z80 style S Z Y H X V N C to S Z X5 H X3 P V C | |
| 797 | and fixed X5 / V flags where accidentally broken due to flag names | |
| 798 | confusion | |
| 505 | 799 | |
| 506 | ||
| 800 | F | |
| 507 | 801 | |
| 508 | Adds latest US BIOS to the Naomi driver. Adds EPR-21577G, version 1.70 | |
| 509 | [Gerald (COY), Dumping Union] | |
| 802 | Added rgb[a]int_sh[l|r] operations to the rgbutils. rgbvmx needs to be | |
| 803 | updated. (Nobody is using them yet.) [Aaron Giles] | |
| 510 | 804 | |
| 511 | Added kludges to get racin force / open golf past the initial check | |
| 512 | screens with the TMS emulation enabled. [David Haywood] | |
| 805 | Added color PROM for Triple Draw Poker. [David Haywood] | |
| 513 | 806 | |
| 514 | ||
| 807 | Changed profiler to s | |
| 515 | 808 | |
| 516 | ||
| 809 | ta | |
| 517 | 810 | |
| 518 | Model 3 driver updates: [R. Belmont] | |
| 519 | - Interrupt controller improved | |
| 520 | - Fixed chip IDs for magtruck and von254g | |
| 521 | - Various notes for working out additional issues | |
| 811 | Added decryption key for Extreme Hunting 2. [Andreas Naive] | |
| 522 | 812 | |
| 523 | Removed old drawgfx APIs after converting the remaining drivers to | |
| 524 | the new ones. [Atari Ace, Aaron Giles] | |
| 813 | Naomi update: | |
| 814 | [R. Belmont, Deunan Knute, Alex, Mr. Mudkips, Frank Bukor] | |
| 815 | - Use new dump for ic31/32, ROM board test passes now | |
| 816 | - Add protection hookup for Marvel vs. Capcom 2, game is playable | |
| 817 | w/sound | |
| 525 | 818 | |
| 526 | PPCDRC: Generate some FPSCR flags [Phil Bennett] | |
| 819 | Added support TMS1000 family models TMS1000/1070/1100/1200/1270/1300. | |
| 820 | Added support for configuration of output PLA to the tms0980/tms1000 | |
| 821 | interface. [Wilbert Pol] | |
| 527 | 822 | |
| 823 | Implemented transparent mode access for some 6845 model sy6845. | |
| 824 | [Roberto Lavarone] | |
| 528 | 825 | |
| 826 | Verified clocks + Vsyncs on Downtown, Caliber 50 and Xmen (2-4 | |
| 827 | players). [Corrado Tomaselli] | |
| 529 | 828 | |
| 829 | Changed to mono both Downtown and Caliber 50: these pcbs don't have a | |
| 830 | stereo connector. [Corrado Tomaselli] | |
| 831 | ||
| 832 | Verified and added correct xtals values for cps1 boards. Added correct | |
| 833 | xtal and divisor for OKI6295 taken from Forgotten Worlds schematics. | |
| 834 | [Corrado Tomaselli] | |
| 835 | ||
| 836 | Decrypted several tables from the B-Rap Boys ROM. [David Haywood] | |
| 837 | ||
| 838 | ||
| 839 | ||
| 530 | 840 | New games added or promoted from NOT_WORKING status |
| 531 | 841 | --------------------------------------------------- |
| 532 | Hyper Bishi Bashi Champ (2 sets) [smf] | |
| 533 | Bass Angler 2 (GE865 VER. JAA) [smf] | |
| 534 | Laser Quiz [Mariusz Wojcieszek, stephh] | |
| 535 | Laser Strixx 2 [Mariusz Wojcieszek, stephh] | |
| 536 | Laser Quiz 2 [Mariusz Wojcieszek, stephh] | |
| 537 | Magic Number [Mariusz Wojcieszek, stephh] | |
| 538 | Magic Premium [Mariusz Wojcieszek, stephh] | |
| 842 | WOW New Fantasia [Irongiant, David Haywood] | |
| 843 | Island 2 (060529) [Vampirz] | |
| 844 | Pirate (060210) [Vampirz] | |
| 845 | Keks (several sets) [Vampirz] | |
| 539 | 846 | |
| 540 | 847 | |
| 541 | ||
| 542 | 848 | New clones added |
| 543 | 849 | ---------------- |
| 544 | E-Jan Sakurasou (v1.2) [The Guru] | |
| 545 | Bloody Roar 2 (World) [Brian Troha] | |
| 546 | Super Basketball (version I, encrypted) | |
| 547 | [Mr Goodwraith, Smitdogg, Dumping Union] | |
| 548 | Super Locomotive (Rev.A) [Team Japump] | |
| 549 | Mario Bros. (US, Revision F) [Mr Goodwraith, Smitdogg, Dumping Union] | |
| 550 | Pae Wang Jeon Seol / Legend of Warrior (Korean censored) [Guru] | |
| 551 | Fruits & Bunny (clone of Country Girl) [TeamEurope, Dumping Union] | |
| 552 | Lost World (older) [Team Japump] | |
| 553 | Cactus (clone of Saboten Bombers) | |
| 554 | [TeamEurope, Dumping Union, David Haywood] | |
| 555 | Sunset Riders (bootleg of Megadrive version) | |
| 556 | [Gatinho, Smitdogg, Dumping Union, David Haywood] | |
| 850 | Fruit Cocktail (060111) [Vampirz] | |
| 851 | Saulabi Spirits / Jin Saulabi Tu Hon (Korean release of Samurai | |
| 852 | Shodown II) [Guru / David Haywood] | |
| 557 | 853 | |
| 558 | 854 | |
| 559 | 855 | |
| 560 | 856 | New games marked as GAME_NOT_WORKING |
| 561 | 857 | ------------------------------------ |
| 562 | Mahjong Shiseikatsu [Uki, Ali] | |
| 563 | Skeet Shot [Phil Bennett, Andy Welburn, Angelo Salese] | |
| 564 | Magical Truck Adventure [R. Belmont] | |
| 858 | Colorama (english) [Roberto Fresca, Angelo Salese] | |
| 859 | Roulette V75 (spanish) [Roberto Fresca, Angelo Salese] | |
| 860 | Rabbit Poker (Arizona Poker v1.1?) | |
| 861 | [Roberto Fresca, Andreas Naive, Tomasz Slanina] | |
| 862 | Coinmaster Keno (Y2K, spanish, 2000-12-14) [Roberto Fresca] | |
| 863 | Coinmaster Keno (Y2K, spanish, 2000-12-02) [Roberto Fresca] | |
| 864 | Extreme Hunting 2 [Guru] | |
| 865 | Dirt Dash (Rev. DT2) [Guru] | |
| 565 | 866 | |
| 566 | 867 | |
| 567 | 868 | |
| 568 | 0.13 | |
| 869 | 0.133u2 | |
| 569 | 870 | ------- |
| 570 | 871 | |
| 571 | 872 | |
| 572 | 873 | MAMETesters Bugs Fixed |
| 573 | 874 | ---------------------- |
| 574 | - 02974: [Crash/Freeze] dmdtouch: Freeze/Hang of process | |
| 575 | (Angelo Salese) | |
| 576 | - 03278: [Gameplay] steelwkr: Inserting a coin at certain moments | |
| 577 | during attract mode results in a broken game. (Hau) | |
| 578 | - 03276: [Sound] bangball, balcube, batlbubl, daitoa: Missing sound | |
| 579 | (Fabio Priuli) | |
| 580 | - 03267: [Crash/Freeze] arabian, arabiana: Game Hangs In demo or play | |
| 581 | (Tafoid) | |
| 875 | - 00191: [Graphics] miaj: some text of the boot-up screen is not | |
| 876 | correctly displayed (hap) | |
| 877 | - 02267: [Graphics] devilw, darkadv, majuu: Some rogue sprites (hap) | |
| 878 | - 03370: [Sound] gng and clones: Music slows down while shooting | |
| 879 | (Corrado Tomaselli) | |
| 880 | - 03373: [Misc.] looping: Unmapped I/O read/writes result in large | |
| 881 | error log and major performance drop (robiza) | |
| 882 | - 03381: [Crash/Freeze] pc_moglf, pc_mtoid: Crashes with access | |
| 883 | violation a short time after boot. (hap) | |
| 884 | - 03376: [Crash/Freeze] All Sets with Rev 1 Sound Board in gottlieb.c: | |
| 885 | Access Violation (hap) | |
| 886 | - 03175: [Crash/Freeze] cham24: Game doesn't start correctly | |
| 887 | - 03354: [DIP/Input] cobram3: Infinite lives dip switch triggers service mode | |
| 888 | - 03352: [DIP/Input] cobram3: No demo (attract) sound (Xander) | |
| 889 | - 03370: gng and clones: Music slows down while shooting | |
| 582 | 890 | |
| 583 | 891 | |
| 584 | 892 | |
| 585 | 893 | Source Changes |
| 586 | 894 | -------------- |
| 587 | Added sound to bayrouteb2. [Angelo Salese] | |
| 895 | Add PCB locations to the rom names for Dream Land (Bubble Bobble | |
| 896 | bootleg). [Briah Troha] | |
| 588 | 897 | |
| 589 | ||
| 898 | Adde | |
| 590 | 899 | |
| 591 | Fixed sprite flipping bits in Pro Sports [Angelo Salese] | |
| 900 | Hand-tuned BGM tempo in Tryout thanks to a side-by-side reference. | |
| 901 | [Angelo Salese] | |
| 592 | 902 | |
| 593 | Cleaned up sexyboom memory map. [Angelo Salese] | |
| 903 | SNES fixes (mostly MESS specific) [Angelo Salese] | |
| 904 | - Fixed Super Kick Boxing booting and sound. | |
| 905 | - Preliminary open bus emulation for allowing Shien's Revenge / | |
| 906 | Shien the Blade Chaser to boot | |
| 907 | - Fixed mode 5/6 bg drawing cutted in half bug | |
| 908 | - Fixed (presumably) broken gfxs in nss_sten | |
| 909 | - More accurate behaviour of the last scroll register. | |
| 910 | - Improved mode 5/6 gfxs when tile size = 16x16. | |
| 911 | - Fixed rowscroll line bugs in many games | |
| 912 | - Made the unsupported reads on i/o open bus, fixed a layer enable | |
| 913 | in Super Kick Boxing | |
| 914 | - Fixed vram size when in hires mode | |
| 915 | - Hooked up interlace mode | |
| 916 | - Fixed doubled y-axis sprites when in interlace mode | |
| 917 | - Improved window effects when in H-512 mode. | |
| 918 | - Removed a kludge with color windows. | |
| 919 | - Fixed buggy layer clearance when in H-512 modes | |
| 920 | - Fixed the x scrolling wrap around bug when hscroll == 0 | |
| 921 | - Fixed a bug that were causing a row of corrupted tiles during | |
| 922 | scrolling situations | |
| 923 | - Fixed irq ack and fixed TIMEUP register open bus behaviour. | |
| 924 | - Even more aggressive open bus fixes. | |
| 925 | - Fixed a partial update bug when the screen is in interlace mode | |
| 926 | - Fixed 8bpp layer colors. | |
| 594 | 927 | |
| 595 | Identified the main CPU in Hit Poker [Olivier Galibert] | |
| 928 | Patched progolfa rom like progolf. Removed bad dump flag in progolf; | |
| 929 | with progolfa you get the same rom error in test mode and progolfa | |
| 930 | have different encryption. [robiza] | |
| 596 | 931 | |
| 597 | Fleshed out the MC68HC11 CPU core, adding support for numerous new | |
| 598 | opcodes and basic IRQ support. [Angelo Salese] | |
| 932 | Added a stop4 input to slot default and remapped slot default keys to | |
| 933 | better suit Amcoe games. [Fabio Priuli] | |
| 599 | 934 | |
| 600 | Improved/fixed ROM names for Mortal Kombat 4. [Brian Troha] | |
| 935 | Updated sfbonus.c to use the new gambling inputs. Fixed many years | |
| 936 | and descriptions. Reworked parent/clone relationships so that parent | |
| 937 | is the higher revision and/or the Export version. Also, tried to | |
| 938 | establish common rules in the choice of the romset names. | |
| 939 | [Fabio Priuli] | |
| 601 | 940 | |
| 602 | Add correct keys for Sports Shoting USA and Ranger Mission | |
| 603 | [Andreas Naive] | |
| 941 | Added default input mappings for Hanafuda games. Updated most of the | |
| 942 | Hanafuda games to use them. Like for Mahjong games, keys A->H are used. | |
| 943 | "Yes" is mapped to M, "No" is mapped to N. [Fabio Priuli] | |
| 604 | 944 | |
| 605 | Added extremely rudimentary Atmel 8-bit AVR CPU core, missing most | |
| 606 | opcodes and any attempt at proper cycle counts. [MooglyGuy] | |
| 945 | Add correct color PROM for panther. [Mr. Do, Angelo Salese] | |
| 607 | 946 | |
| 608 | Added PCB layout for Gaelco's Bang!, corrected Bang! rom names and | |
| 609 | minor correction of Snowboard PCB layout [Brian Troha] | |
| 947 | Removed fake P3 Start from Nichibutsu mahjong games and properly | |
| 948 | called "Credit Clear" that input. Also, added back Bet button in | |
| 949 | nb1413m3.c fixing omotesnd. [Fabio Priuli] | |
| 610 | 950 | |
| 611 | Fixed gfx decoding in Hit Poker [David Haywood] | |
| 951 | nmk16.c driver documentation update / clean up: [Briah Troha] | |
| 952 | - Moved the PCB layout for S.B.S Gomorrah (Bio-Ship Paladin) down by | |
| 953 | the game's romdef. | |
| 954 | - Added PCB layout for Spectrum 2000 & corrected company name to | |
| 955 | YONA Tech | |
| 956 | - Added PCB layout for Red Hawk | |
| 957 | - Moved decryption routines (if needed) to between the info/PCB | |
| 958 | layout header and game romdef. | |
| 612 | 959 | |
| 613 | Made some logic fixes to Hit Poker and significantly improved the | |
| 614 | video. [Angelo Salese] | |
| 960 | Added the 8751 MCU code to Saigo no Nindou (nspiritj). | |
| 961 | [Guru, David Haywood] | |
| 615 | 962 | |
| 616 | hachamf: redumped GFX maskROM and corrected filename [Team Japump!!!] | |
| 963 | Implemented preliminary bg map banking in 18 Holes Pro Golf. | |
| 964 | [Angelo Salese, Robiza] | |
| 617 | 965 | |
| 618 | Amiga AGA update [Mariusz Wojcieszek] | |
| 619 | - fixed sprite data fetching and sprite colors | |
| 966 | Fixed a mapping error with Maikobana [BET] (mmaiko) which caused the | |
| 967 | NVRAM not to save correctly. [Tafoid] | |
| 620 | 968 | |
| 621 | Cubo CD32 update [stephh] | |
| 622 | - fixed inputs | |
| 623 | - found why inputs are not read (protection ?), hacked to work now | |
| 969 | Aristocrat MK-4 HW: Hooked up mc6845, fixed a rom crc in goldenc and | |
| 970 | implemented flip y. [Angelo Salese] | |
| 624 | 971 | |
| 625 | Fixed PPCDRC incorrect instruction checksum order | |
| 626 | [Phil Bennett, R Belmont] | |
| 972 | DIP switch cleanups in gberet, mainevt, ninjakd2, and taito_z. | |
| 973 | [kanikani] | |
| 627 | 974 | |
| 628 | Fixed breakpoints in the TMS9900 CPU core [Olivier Galibert] | |
| 975 | Added GAME_IMPERFECT_SOUND flag to all sets that use external samples | |
| 976 | which were not already flagged for sound. Flagged Speed Freak | |
| 977 | (speedfrk) as GAME_SUPPORTED_SAVE to match the rest of the driver. | |
| 978 | [Tafoid] | |
| 629 | 979 | |
| 630 | Improved sound and inputs in Midnight Landing. [Angelo Salese] | |
| 980 | SNES video updates: [Fabio Priuli] | |
| 981 | * re-enabled video debug functionalities in debug build (to toggle | |
| 982 | background layers) | |
| 983 | * added proper priority tables for various bg/obj layers | |
| 984 | * largely simplified tile and line drawing routines, and fixed small | |
| 985 | bits here and there | |
| 986 | * further simplification of tile drawing routines | |
| 987 | * added palette index to 8bpp tiles (correct color_shift still unsure, | |
| 988 | though) | |
| 989 | * reworked video drawing routine to simplify the various graphic | |
| 990 | mode drawing and to allow proper implementation of priority orders | |
| 991 | (especially bg3 priority bit and mode 7 priority order) | |
| 992 | * improved mode 7 extbg (still missing mosaic) | |
| 993 | * added some more debugging options | |
| 994 | * improved Mode 7 math precision (but still some issues remain) and | |
| 995 | added a few elements to PPU struct | |
| 996 | * implemented Mosaic in Mode 7 | |
| 997 | * merged OAM functions | |
| 998 | * added a few elements to PPU struct (this might be handy if we ever | |
| 999 | come to convert SNES PPU to a device) | |
| 1000 | * fixed Mode 7 shared scrolling/matrix registers | |
| 1001 | * slightly optimized Mode 7 math (by using Anomie's recursive | |
| 1002 | formula) | |
| 1003 | * moved some more register contents to PPU struct | |
| 1004 | * added PPU1/PPU2 Open Bus support, STAT77/STAT78 registers should be | |
| 1005 | more accurate (even if still not perfect) | |
| 1006 | * simplified window masking code and moved some more regs to PPU | |
| 1007 | struct | |
| 631 | 1008 | |
| 632 | Improved protection simulation for Brap / Shogun warriors, eliminating | |
| 633 | the hardcoded table with the initial program snippet in, getting it | |
| 634 | from the rom instead, and generally cleaning things up. | |
| 635 | [David Haywood] | |
| 1009 | More NES work: [Robert Bohms] | |
| 1010 | * Fixed bug in nes_apu that caused errors reading $4015 | |
| 1011 | * Added length counter status bits to $4015 | |
| 1012 | * Fixed 4-screen mirroring (PPU regression) | |
| 1013 | * Fixed cham24 | |
| 1014 | * Improved Sprite Overflow emulation of NES PPU (this fixes the first | |
| 1015 | of blargg's Sprite Overflow tests) | |
| 636 | 1016 | |
| 637 | Added GALs to the Klax sets and fixed the ROM names. [Kevin Eshbach] | |
| 1017 | Added remaining PCB "U" locations to roms that didn't have for | |
| 1018 | G-Stream G2020. [Brian Troha] | |
| 638 | 1019 | |
| 639 | Updated Bally Sente Spiker with the cartridge type and added notice | |
| 640 | that it has an undumped PAL. [Kevin Eshbach] | |
| 1020 | Atomiswave updates: [R. Belmont, Cah4e3] | |
| 1021 | - Hooked up flash ROM at 0 | |
| 1022 | - Use proper AW memory map | |
| 1023 | - Emulate AW ROM board (different from Naomi) | |
| 641 | 1024 | |
| 642 | Added some information to the Gottlieb driver about the board ids of | |
| 643 | Q*Bert and M.A.C.H. 3 and the various known Gottlieb assigned game | |
| 644 | ids. [Kevin Eshbach] | |
| 1025 | Fixed buggy breakpoints in the g65816 cpu core. [Angelo Salese] | |
| 645 | 1026 | |
| 646 | Removed Shooting Master Unprotected set since the initial dump was | |
| 647 | bad and turned out to match the EVG revision. [Kevin Eshbach] | |
| 1027 | Fixed Atomiswave COIN ERROR. [Wind] | |
| 648 | 1028 | |
| 649 | Normalized driver-specific drawing code to use the standard parameter | |
| 650 | ordering: bitmap, cliprect, gfx, ... Updated most video drivers to | |
| 651 | use the more modern drawgfx_* variants. Eventually the generic | |
| 652 | drawgfx will be deprecated, so please use the newer functions. | |
| 1029 | n8080 update [Team Japump!!!] | |
| 1030 | - corrected ROM names for Space Fever and SF High Splitter | |
| 1031 | - renamed spacefeva to spacefevo2 | |
| 1032 | - added spacefevo | |
| 1033 | - added highspltb | |
| 1034 | ||
| 1035 | Updated Sega Hikaru readme [Guru] | |
| 1036 | ||
| 1037 | Discrete sound update: [couriersud] | |
| 1038 | - Added "abs" function to DISCRETE_TRANSFORM | |
| 1039 | - Fixed a bug in DISCRETE_RCDISC5 | |
| 1040 | ||
| 1041 | Added 1 missing sample to safarir.c [Team Japump!!!] | |
| 1042 | ||
| 1043 | Created discrete sound emulation for galaxian [couriersud] | |
| 1044 | - Changed all audio related AM_WRITE to AM_DEV_WRITE | |
| 1045 | - Moved discrete sound related pieces such as initialization into | |
| 1046 | audio/galaxian.h | |
| 1047 | - Split some memory maps into sound related and not sound related | |
| 1048 | parts. | |
| 1049 | - Added possibility in discrete.h to select hardware (galaxian/moon | |
| 1050 | cresta) at compile time. This leads to slightly different volume | |
| 1051 | levels. Hit sound (explosion) has been hacked to increase volume. | |
| 1052 | Currently, we can not accurately model the switch/opamp filter | |
| 1053 | circuit. | |
| 1054 | - Rewrote timer code so that the pitch timer is only used when it | |
| 1055 | produces audible results. | |
| 1056 | ||
| 1057 | Cojag/jaguar video updates (primarily for MESS) [Robbbert] | |
| 1058 | * Added variable pixel width. | |
| 1059 | * Fixed display of screens wider than 360 pixels. | |
| 1060 | * Enabled use of RGB16. | |
| 1061 | ||
| 1062 | looping: modified the cop420 rom region, fixed mcu rom region in clone | |
| 1063 | set, added mcu support. [robiza] | |
| 1064 | ||
| 1065 | Redumped bingor2 program roms [Klaus Sommers] | |
| 1066 | ||
| 1067 | Corrected Kamakazi III's dipswitch setting (the same as superg) and | |
| 1068 | relabeled it a superg hack. Also the dipswitch setting for the Taito | |
| 1069 | license was the same as superg so I eliminated one. [Brian Troha] | |
| 1070 | ||
| 1071 | Improved speaker-toggle emulation with alias filter. | |
| 1072 | [Anders Hallstrom] | |
| 1073 | ||
| 1074 | NES: Fixed bank switching in multigm3 (broken due to a mistake of | |
| 1075 | mine when including original Rob Bohms' code). The game still refuses | |
| 1076 | to work, unfortunately. [Fabio Priuli] | |
| 1077 | ||
| 1078 | vsnes update [Team Japump!!!] | |
| 1079 | - fixed ROM names | |
| 1080 | - added vssoccerj | |
| 1081 | ||
| 1082 | ROM name fixes for sicv, sisv, and sisv2 [Team Japump!!!] | |
| 1083 | ||
| 1084 | Corrected TNZS vsync to 59.15 as verified on pcb. [Corrado Tomaselli] | |
| 1085 | ||
| 1086 | Fixed bootleg description inconsistency in goldnpkr.c. [hap] | |
| 1087 | ||
| 1088 | Fixed sprite wrapping in sonson. [hap] | |
| 1089 | ||
| 1090 | Added Intel 4004 CPU core. [Miodrag Milanovic] | |
| 1091 | ||
| 1092 | Converted the tilemap lists to be private information held by the | |
| 1093 | running_machine instead of global variables. Added new APIs to the | |
| 1094 | tilemap code to handle the "ALL_TILEMAPS" cases, and removed the | |
| 1095 | old ALL_TILEMAPS definition. [Atari Ace] | |
| 1096 | ||
| 1097 | Added redumped gfx rom on Shogun Warrior [Guru] | |
| 1098 | ||
| 1099 | Updated romload.c and validity.c to not rely on global variables. | |
| 653 | 1100 | [Atari Ace] |
| 654 | 1101 | |
| 655 | Added casts to ensure proper values are passed to the ctype.h | |
| 656 | functions. [Juergen Buchmueller] | |
| 1102 | Corrected resistor values in Cliff Hanger discrete sound based on | |
| 1103 | actual PCB values. [Ruben Panossian] | |
| 657 | 1104 | |
| 1105 | Removed DAA tables from the 8085 and Z180 implementations in favor of | |
| 1106 | just computing the values. Also fixed code in 8085 to prevent | |
| 1107 | accidental multiple reads due to macro overuse. [hap] | |
| 658 | 1108 | |
| 1109 | Added game time and coinage DIP switches to Space Walk, along with | |
| 1110 | service mode and test. Also added support for the 2nd controller and | |
| 1111 | coin counter. Removed GAME_NOT_WORKING as it is working fine. Added | |
| 1112 | color overlay based on photo. [hap] | |
| 659 | 1113 | |
| 1114 | Added a simple color overlay for Depthcharge based on flyers. [hap] | |
| 1115 | ||
| 1116 | Updated the Konami twin16 driver. Functional changes: [hap] | |
| 1117 | - improved sprite status register, this fixed the rogue sprites | |
| 1118 | problem in devilw | |
| 1119 | - added fround coin counters | |
| 1120 | - lowered k007232 volume | |
| 1121 | - added savestate support | |
| 1122 | - added shadows | |
| 1123 | - fixed devilw and gradius2 sprite lag | |
| 1124 | - added text layer x/y flipping | |
| 1125 | - reverted gradius2 sprite-background priority hack, this fixes | |
| 1126 | severe priority problems in devilw, but reintroduces bugs on | |
| 1127 | gradius2 level 7 and ending | |
| 1128 | ||
| 1129 | ||
| 1130 | ||
| 660 | 1131 | New games added or promoted from NOT_WORKING status |
| 661 | 1132 | --------------------------------------------------- |
| 662 | Pro Sports [Angelo Salese] | |
| 663 | Candy Puzzle [Mariusz Wojcieszek, stephh] | |
| 664 | Harem Challenge [Mariusz Wojcieszek, stephh] | |
| 1133 | 18 Holes Pro Golf [robiza, Angelo Salese] | |
| 1134 | Python (Photon System) [Mick, Mariusz Wojcieszek] | |
| 1135 | Pop n' Music 2 [Guru] | |
| 1136 | beatmania ClubMIX [Team Japump!!!, The Guru] | |
| 1137 | Ridge Racer (3 screen? Rev. RR2, World) [Guru, Smitdogg] | |
| 1138 | Sky Love [bbmmamoh, David Haywood] | |
| 1139 | Triple Draw Poker [Team Europe, David Haywood] (Wrong Colours) | |
| 665 | 1140 | |
| 666 | 1141 | |
| 667 | 1142 | |
| 668 | 1143 | New clones added |
| 669 | 1144 | ---------------- |
| 670 | High Impact Football (rev LA1 12/16/90) | |
| 671 | [K. Lee, M. Josephson, Smitdogg] | |
| 672 | Asteroids (rev 4) [Andy Welburn, Dumping Union] | |
| 673 | Lupin III (set 1) [Hau, Team Japump] | |
| 1145 | Gun Bullet (World, GN3 Rev B) [Brian Troha, Dumping Union] | |
| 1146 | Megatouch 5 (9255-60-01 ROI, Standard version) | |
| 1147 | [Brian Troha, Dumping Union] | |
| 1148 | Dragon World (V021O) [f205v, Olivier Galibert, David Haywood] | |
| 1149 | Winding Heat (JAA, JPN v2.11) [Guru] | |
| 1150 | Qix (set 2, smaller roms) [Team Europe] | |
| 1151 | 9-Ball Shootout Championship [SiftWare] | |
| 674 | 1152 | |
| 675 | 1153 | |
| 676 | 1154 | |
| 677 | New games marked as GAME_NOT_WORKING | |
| 678 | ------------------------------------ | |
| 679 | Hit Poker [Angelo Salese] | |
| 680 | ||
| 681 | ||
| 682 | ||
| 683 | 0.132u1 | |
| 1155 | 0.133u1 | |
| 684 | 1156 | ------- |
| 685 | 1157 | |
| 686 | 1158 | |
| 687 | 1159 | MAMETesters Bugs Fixed |
| 688 | 1160 | ---------------------- |
| 689 | - 03262: [DIP/Input] Drivers using TMS9928: Using any type of | |
| 690 | frameskip causes crash (Fabio Priuli) | |
| 691 | - 03247: [DIP/Input] battles: Unable to locate input port 'IN0' | |
| 692 | (stephh) | |
| 693 | - 03263: [Crash/Freeze] polyplay: PolyPlay crashes/exits with some | |
| 694 | acces violation (Fabio Priuli) | |
| 695 | - 03255: [Compiling] Compile errors with GCC 4.4 (SDLMAME specific) | |
| 696 | - 03251: [Sound] kingofb, ringkin3, ringkinw: No sound output (Tafoid) | |
| 697 | - 03237: [Crash/Freeze] bagman, sbagman and clones: Error Message: | |
| 698 | Duplicate save state registration entry (Tafoid) | |
| 699 | - 03245: [DIP/Input] nitrobal, gunball: Screen Flipped by default/ | |
| 700 | Input not allowed (Tafoid) | |
| 1161 | - 03352: [DIP/Input] cobram3: No demo (attract) sound (Xander) | |
| 1162 | - 03354: [DIP/Input] cobram3: Infinite lives dip switch triggers | |
| 1163 | service mode (Xander) | |
| 1164 | - 02377: [Graphics] fourtrax: There are some graphics glitches | |
| 1165 | (POSIRQ-related?). (hap) | |
| 1166 | - 02645: [Gameplay] sbrkout: Super Breakout paddle not reaching left | |
| 1167 | hand side (hap) | |
| 1168 | - 03317: [Graphics] starblad: No Large polygons displayed (hap) | |
| 1169 | - 02378: [Graphics] fourtrax: Sprite banking (for rear view mirror) | |
| 1170 | isn't working. (hap)s | |
| 1171 | - 01119: [Color/Palette] finehour: [possible] Some bigger enemies | |
| 1172 | seems to have bad colors. (hap) | |
| 1173 | - 03242: [Graphics] fantzone, fantzon1: Background scroll is | |
| 1174 | completely broken. (hap) | |
| 1175 | - 03314: [Documentation] mrdrillr, mrdrilr2: Title should be "Mr. | |
| 1176 | Driller" (dot), not "Mr Driller" (Fabio Priuli) | |
| 1177 | - 03349: [Sound] mpatrol, mpatrolw: Wimpy explosion sound (couriersud) | |
| 1178 | - 03366: [Compiling] Default mametiny build no longer compiles | |
| 1179 | (Fabio Priuli) | |
| 1180 | - 02715: [Crash/Freeze] sokyugrt, shienryu: sokyugrt freezes after | |
| 1181 | the loading and patent screens. shienryu allows coins but | |
| 1182 | that's it. (Angelo Salese) | |
| 1183 | - 03359: [Graphics] sonson: unsupported negative sprite positions | |
| 1184 | (Angelo Salese) | |
| 1185 | - 03358: [Misc.] sonson: Unimplemented coincounter (Angelo Salese) | |
| 1186 | - 03348: [Graphics] jjsquawb: Background Graphics Incorrectly mapped | |
| 1187 | (robiza) | |
| 1188 | - 03320: [Sound] cliffhgr: dip switch setting reversed for demo sound | |
| 1189 | play (Tafoid) | |
| 1190 | - 03316: [Sound] burglarx: The main music is distorted (Osso) | |
| 1191 | - 03313: [Misc.] cliffhgr, cliffhga: Missing parent/clone | |
| 1192 | relationship (smf) | |
| 701 | 1193 | |
| 702 | 1194 | |
| 703 | 1195 | |
| 704 | 1196 | Source Changes |
| 705 | 1197 | -------------- |
| 706 | Fixed handshaking signals for PPI8255 modes 1/2, and mode 2 input | |
| 707 | mask. [Curt Coder] | |
| 1198 | Made cliffhga a clone of cliffhgr. [smf] | |
| 708 | 1199 | |
| 709 | Added framebuffer support in 18 Holes Pro Golf. Fixed backgrounds | |
| 710 | and added inputs. Decoupled from btime. [Angelo Salese] | |
| 1200 | ARM7 updates: [R. Belmont] | |
| 1201 | - Preliminary PXA255 support, including Intel-specific CP14 | |
| 1202 | - Hooked up TLB | |
| 711 | 1203 | |
| 712 | Adjusted sound command descriptions for dkong to be closer to the | |
| 713 | other drivers, and added a missing command description. [Kef Schecter] | |
| 1204 | Fixed player 2 input port in photon.c. Fixed bad CRC/SHA1 in photon.c. | |
| 1205 | [Mariusz Wojcieszek] | |
| 714 | 1206 | |
| 715 | Added SP0256 pinout. [Curt Coder] | |
| 1207 | Naomi/AW updates: [Deunan Knute, CaH4e3, R. Belmont] | |
| 1208 | - DMA protection emulation for qmegamis, fixes in-game graphics | |
| 1209 | - Correct decryption key for Extreme Hunting | |
| 1210 | - Added protection emulation for Cosmic Smash | |
| 1211 | - Added protection emulation for Capcom vs. SNK (cartridge ver) | |
| 716 | 1212 | |
| 717 | Fixed colors in Jan-Oh [Angelo Salese] | |
| 1213 | DIPSW fixes: [kanikani] | |
| 1214 | - argus: fixed service switch (was defined to port that does not | |
| 1215 | exist), and fixed DIPLOCATION order. | |
| 1216 | - valtric: fixed note for how to enter test mode. coin1 and coin2 | |
| 1217 | were swapped, and fixed DIPLOCATION order. | |
| 1218 | - butasan: coin1 and coin2 were swapped, and fixed DIPLOCATION order. | |
| 718 | 1219 | |
| 719 | Fixed several issues compiling with gcc 4.4. [R. Belmont] | |
| 1220 | The 6532 RIOT timer should keep spinning after a timeout (regression | |
| 1221 | introduced in 0.126u2). [Wilbert Pol] | |
| 720 | 1222 | |
| 721 | Added Dip Locations and made default settings changes to match manuals | |
| 722 | for Star Wars and The Empire Strikes back. [Tafoid] | |
| 1223 | Did the following changes to the tankbatt.c driver [Angelo Salese]: | |
| 1224 | * Cleaned-up the irq / nmi firing and fixed irq acks; | |
| 1225 | * Cleaned-up the memory map; | |
| 1226 | * Added coin counter, coin lockouts and added a second coin chute; | |
| 1227 | * Documented some unclear i/os; | |
| 1228 | * Flagged the game as GAME_IMPERFECT_SOUND since it uses samples | |
| 1229 | instead of proper discrete sound emulation; | |
| 723 | 1230 | |
| 724 | Added irq ack support in the rohga driver, fixes character selection | |
| 725 | behaviour in Wizard Fire. [Angelo Salese] | |
| 1231 | Fixed DEMO_SOUND Dip assignment in cliffhgr to work correctly when | |
| 1232 | turned ON. [Tafoid] | |
| 726 | 1233 | |
| 727 | Fixed background colors and improved the graphics in Pro Soccer. | |
| 728 | [Angelo Salese] | |
| 1234 | Improved colors in Merit Poker [Angelo Salese] | |
| 729 | 1235 | |
| 730 | Refactored MC6845 to use devcb and added cursor callback (for MESS). | |
| 731 | [Curt Coder] | |
| 1236 | Fixed the version number of 2 sound roms for Mortal Kombat 4 and | |
| 1237 | made U2 1MB in size which is correct. The actual rom type is a 27C800 | |
| 1238 | and has been verified on 2 seperate PCBs. All the rest of the roms | |
| 1239 | are 27C160 as per the driver. [Brian Troha] | |
| 732 | 1240 | |
| 733 | Added basic gfx pal descrambling to liberate.c, and enabled sound | |
| 734 | (memory map was disabled but it is actually good?) Fixed for good the | |
| 735 | background colors and added gfx rom read-back (helps a lot for the | |
| 736 | tile-based sprites). Improved playability by tweaking IRQ generation. | |
| 737 | [Angelo Salses] | |
| 1241 | Added license information to the 2 Red Hawk sets (IE: the US & Italy). | |
| 1242 | [Brian Troha] | |
| 738 | 1243 | |
| 739 | Added correct ROM names for eprom/eprom2. [Phil Bennett] | |
| 1244 | Added Screen Raw Params hook-up to the ST-V driver, fixes some of the | |
| 1245 | current issues [Angelo Salese] | |
| 740 | 1246 | |
| 741 | Made the 8237 dma controller emulation more accurate by implementing | |
| 742 | it as a state machine. Deprecated the dma8237_run_transfer function. | |
| 743 | [Wilbert Pol] | |
| 1247 | Added dip port locations to Glass, Alligator Hunt, Touch & Go, World | |
| 1248 | Rally 2: Twin Racing & Maniac Square [Brian Troha] | |
| 744 | 1249 | |
| 745 | Updated readmes for ATOMISWAVE and TWINKLE hardware. [Guru] | |
| 1250 | Added dip port locations to Big Karnak, Biomechanical Toy, Maniac | |
| 1251 | Square (prototype), Squash & Thunder Hoop [Brian Troha] | |
| 746 | 1252 | |
| 747 | Fixed prom hook-up in Dambuster. [Angelo Salese] | |
| 1253 | Updated many clone names to use more than 8 characters. | |
| 1254 | [Yasuhiro Ogawa, Brian Troha, Tafoid, Fabio Priuli] | |
| 748 | 1255 | |
| 749 | Twinkle WIP: [R. Belmont] | |
| 750 | - SPU board emulation improvements (memory map, IRQ controller, IDE, | |
| 751 | RF5c400) | |
| 752 | - Change 4th mix to use real dumped security dongle data | |
| 1256 | Added dip port locations to Sky Soldier, Time Soldiers and Paddle | |
| 1257 | Mania. [Brian Troha] | |
| 753 | 1258 | |
| 754 | Many graphics and logic fixes to Pro Sports. [Angelo Salese] | |
| 1259 | 39 in 1 improvements: [MooglyGuy, R. Belmont] | |
| 1260 | - Fleshed out some Intel PXA255 peripherals. | |
| 1261 | - Improved PXA255 DMA controller emulation. | |
| 1262 | - Fixed FBARx register accesses to wait until the current DMA | |
| 1263 | transfer has completed before triggering another interrupt. | |
| 1264 | - Hooked up 93C66 EEPROM. | |
| 1265 | - Fixed LCD DMA behavior | |
| 1266 | - Fixed EEPROM byte order | |
| 1267 | - Video, inputs, and flash data ROM hooked up | |
| 1268 | - Improved PXA255 LCDC, DMA and I2S emulation | |
| 1269 | - Working but not great CPLD protection simulation | |
| 1270 | ||
| 1271 | ST-V: Hand-tuned pixel-clock to match measured fps from the pcb | |
| 1272 | [Angelo Salese, Corrado Tomaselli] | |
| 755 | 1273 | |
| 756 | ||
| 1274 | Improved h | |
| 757 | 1275 | |
| 758 | Fixed a DECO16 CPU core bug that was causing issues with Pro Bowling | |
| 759 | part of Pro Sports. [Angelo Salese] | |
| 1276 | Added PCB location to 4 roms in a Head Panic clone. [Brian Troha] | |
| 760 | 1277 | |
| 761 | Implemented a new DECO CPU-16 opcode, used by Express Raider for | |
| 762 | V-BLANK bit and a bunch of liberate.c games for TILT bit. Converted | |
| 763 | Express Raider to use the DECO CPU-16 core instead of the plain M6502. | |
| 764 | [Angelo Salese] | |
| 1278 | Corrected rom names for Four Trax. Added the Guru's readme for Four | |
| 1279 | Trax. Derived all CPU clocks based on actual OSC timing. | |
| 1280 | [Guru, Brian Troha] | |
| 765 | 1281 | |
| 766 | Added BPROMs for Intruder. [Yasuhiro Ogawa] | |
| 1282 | Added basic PCB layout and added "U" locations to as many rom names | |
| 1283 | as I could identify in a hi-res pic of the PCB for G-Stream G2020. | |
| 1284 | [Brian Troha] | |
| 767 | 1285 | |
| 768 | Total Vice now uses the correct boot ROM (same as Polystars). | |
| 769 | [Phil Bennett] | |
| 1286 | Updated sonson DIP locations and defaults to match those of the game | |
| 1287 | upgrade manual. [Tafoid] | |
| 770 | 1288 | |
| 771 | Fixed Pro Tennis gameplay and added basic background hook-up. | |
| 772 | [Angelo Salese] | |
| 1289 | Added dip port locations to: [Brian Troha] | |
| 1290 | * Gaplus / Galaga 3 and clones | |
| 1291 | * Funny Bubble and clone | |
| 1292 | * Gang Busters and clones | |
| 1293 | * Green Beret plus clones and Mr. Goemon (also cleaned up) | |
| 1294 | * GI Joe and clones | |
| 1295 | * Gladiator and clones (also corrected to match factory settings) | |
| 1296 | * Ghosts'n Goblins and clones (also restated bonus descriptions) | |
| 1297 | * Goindol and clones | |
| 1298 | * Grand Champion | |
| 1299 | * MX5000 / Flack Attack | |
| 1300 | * Food Fight and clones | |
| 1301 | * Got-cha Mini Game Festival and clone | |
| 1302 | * Aquarium, Gun Dealer plus clones and Wise Guy plus clone | |
| 1303 | * Haunted Castles and clones | |
| 1304 | * The Main Event, Devastators and various clones | |
| 1305 | * Magical Cat Adventure, Nostradamus and various clones | |
| 1306 | * Multi Champ and clone (also added support for coinage mode 1 & 2) | |
| 1307 | * Dragon Master | |
| 1308 | * B-Wings and clones | |
| 1309 | * DECO Cassette System driver (also split out settings for specific | |
| 1310 | games where appropriate) | |
| 1311 | * Vandyke, Blackheart, Many Block, Task Force Harrier, US AFF | |
| 1312 | Mustang, Hacha Mecha Fighter, Koutetsu Yousai Strahl, Bio-Ship | |
| 1313 | Paladin, Acrobat Mission, Super Spacefortress Macross, Super | |
| 1314 | Spacefortress Macross II, Thunder Dragon, Thunder Dragon 2, | |
| 1315 | GunNail, Sabotan Bombers, Bombjack Twin, Nouryoku Koujou Iinkai, | |
| 1316 | Guardian Storm | |
| 1317 | * Stagger I & clones, Bubble 2000, Fire Hawk and Spectrum 2000 | |
| 1318 | * Air Attack, SS Mission and Twin Action | |
| 1319 | * Super Pac-Man, Pac & Pal, Grodbda, Phozon, Mappy, Tower of Druaga, | |
| 1320 | Dig Dug II and Motos as well as clones | |
| 773 | 1321 | |
| 774 | Improved protection simulation and documentation for Shogun Warriors/ | |
| 775 | BRAP Boys. [David Haywood] | |
| 1322 | Various improvements to Yumefuda / Alba ZG driver [Angelo Salese] | |
| 1323 | * Hooked up basic mc6845 crtc, fixing resolution and refresh rate; | |
| 1324 | * Hooked up the ppi8255; | |
| 1325 | * Hooked up some previously unemulated system inputs; | |
| 1326 | * Added coin counter / coin lockout and added proper flip screen bit; | |
| 1327 | * Corrected system clock; | |
| 776 | 1328 | |
| 777 | Pointer-ified the minx CPU core. [Atari Ace] | |
| 1329 | Added dip port locations to Bosconian, Galaga, Xevious Dig Dug and | |
| 1330 | clones. Added proper conditional bonus (based on number of starting | |
| 1331 | fighters) to Bosconian and Galaga [Brian Troha] | |
| 778 | 1332 | |
| 779 | Improved System 16 bootleg behaviors, especially with regards to | |
| 780 | sprite rendering. [David Haywood] | |
| 1333 | More accurate program rom names for Polygonet Commanders (ver UAA) | |
| 1334 | set. [Brian Troha] | |
| 781 | 1335 | |
| 1336 | Improved bonus verbiage for the galaga.c, gng.c, gberet.c & gbusters.c | |
| 1337 | drivers. Verbiage more like the actual manual. [Brian Troha] | |
| 782 | 1338 | |
| 1339 | Various improvements to the Speed Attack driver [Angelo Salese] | |
| 1340 | * Hooked up basic mc6845 crtc, fixing resolution and refresh rate; | |
| 1341 | * Added the watchdog; | |
| 1342 | * Corrected system clock; | |
| 1343 | * Removed a video quirkness (tilemap h/w values were bigger than its VRAM) and cleaned up some other minor stuff; | |
| 783 | 1344 | |
| 1345 | Redumped bingor2 gfx roms. [Team Europe] | |
| 1346 | ||
| 1347 | Simplified Atomiswave's decryption routine & keys. [Andreas Naive] | |
| 1348 | ||
| 1349 | Added Guardian Storm PCB layout [Brian Troha] | |
| 1350 | ||
| 1351 | funworld.c improvements [Roberto Fresca] | |
| 1352 | - Removed generic funworld DRIVER_INIT. | |
| 1353 | - Added partial PIAs connection diagram. | |
| 1354 | - Updated technical notes. | |
| 1355 | ||
| 1356 | Rewrite of NES PPU: [Robert Bohms] | |
| 1357 | - Ported ppu2c0x to use a device memory map | |
| 1358 | - Ported all rendering to access PPU address space through memory | |
| 1359 | map | |
| 1360 | - Updated MAME drivers to install read handlers or memory banks in | |
| 1361 | PPU memory map, as appropriate. | |
| 1362 | - Removed all mirroring and banking code from the ppu, as the backing | |
| 1363 | memory is documented to be external | |
| 1364 | - Supplied replacement banking alternatives for all MAME drivers | |
| 1365 | (vsnes.c, playch10.c, cham24.c, and multigam.c) | |
| 1366 | ||
| 1367 | Sound map cleanup for the taito_x.c driver. [Tafoid] | |
| 1368 | ||
| 1369 | Improved Irem sound: [couriersud] | |
| 1370 | - Better Moon Patrol sound | |
| 1371 | - Revisited schematics | |
| 1372 | - Found 10-Yard schematics as well | |
| 1373 | - Corrected a bug, some discrete values and added two RC nodes from | |
| 1374 | schematics | |
| 1375 | ||
| 1376 | NMK16 driver clean ups. Merged some of the duplicated code in nmk16.c, | |
| 1377 | and attempting to handle the larger tilemaps used by Thunder Dragon 2, | |
| 1378 | Rapid Hero and Macross 2 in a more correct way. This has fixed some | |
| 1379 | glitches in the intro of Rapid Hero without breaking the ingame | |
| 1380 | graphics. [David Haywood] | |
| 1381 | ||
| 1382 | Added default input mappings for gambling / poker / slot games. | |
| 1383 | Converted many drivers to use the new mappings. [Fabio Priuli] | |
| 1384 | ||
| 1385 | Some improvements to the meadows driver: [robiza] | |
| 1386 | - set autocenter value to 0 in deadeye | |
| 1387 | - implemented correct inputs in bowl3d and removed not working flag | |
| 1388 | ||
| 1389 | Unified sets with unknown manufacturer to use all the same | |
| 1390 | manufacturer <unknown>. [Fabio Priuli] | |
| 1391 | ||
| 1392 | Decrypted progolfa. [robiza] | |
| 1393 | ||
| 1394 | Documented what the "language" dipswitch actually does for Rapid Hero. | |
| 1395 | When set to "Japanese", the main characters text "talk" on the Stage | |
| 1396 | Clear screens. When set to "English" you simply see "Stage 'x' Clear" | |
| 1397 | (where 'x' is the current stage you just finished). [Brian Troha] | |
| 1398 | ||
| 1399 | Changed clocks on Trojan as verified on pcb. [Corrado Tomaselli] | |
| 1400 | ||
| 1401 | Changed quake CPU speed to 233MHz, added basic PC IO map, hooked up | |
| 1402 | 8259, corrected year to 1998, added some TODO statements. [Luigi30] | |
| 1403 | ||
| 1404 | Moved priority_bitmap from a global into the running_machine struct. | |
| 1405 | Updated all drivers accordingly. [Atari Ace] | |
| 1406 | ||
| 1407 | Changed Scud Hammer analog controls from paddle to accelerometer. | |
| 1408 | Previously, if you did nothing, the paddle control caused the hammer | |
| 1409 | to smash automatically. [hap] | |
| 1410 | ||
| 1411 | Verified and updated the vertical syncs on the following pcb: | |
| 1412 | [Corrado Tomaselli] | |
| 1413 | - system18 motherboards | |
| 1414 | - ninja ryukenden | |
| 1415 | - tricky doc | |
| 1416 | - raiden | |
| 1417 | - Ninja Kid 2 | |
| 1418 | - atomic robokid | |
| 1419 | - tiger road | |
| 1420 | - stv motherboard | |
| 1421 | - toki | |
| 1422 | - raiden 2 / raiden dx (same pcb) | |
| 1423 | - cabal | |
| 1424 | - blood bros | |
| 1425 | - tengai | |
| 1426 | - gng | |
| 1427 | - rally byke | |
| 1428 | - vimana | |
| 1429 | ||
| 1430 | Fixed some inconsistencies with bootleg manufacturer names, eg. using | |
| 1431 | Bootleg (big B), or using the original company if the rom is a | |
| 1432 | bootleg. [hap] | |
| 1433 | ||
| 1434 | Changed sound z80 of ghost and goblins from 3mhz to 1.5mhz as verified | |
| 1435 | on pcb. [Corrado Tomaselli] | |
| 1436 | ||
| 1437 | Documented lamps/motor usage for Night Striker [Angelo Salese] | |
| 1438 | ||
| 1439 | Made irqs more accurate in City Connection [Angelo Salese] | |
| 1440 | ||
| 1441 | Hooked up Cobra Command sound ROM. [Jim Hernandez, Aaron Giles] | |
| 1442 | ||
| 1443 | Fixed cobram3 dip switch. [Xander] | |
| 1444 | ||
| 1445 | Fixed a bug related to eating cycles during 68k cpu reset. Previously, | |
| 1446 | initial_cycles had a wrong value after reset, and if cycles were < 0, | |
| 1447 | it'd always return 0. This change also happens to fix a scrolling bug | |
| 1448 | in Fantasy Zone, introduced when that cycle eating thing was added. | |
| 1449 | [hap] | |
| 1450 | ||
| 1451 | Calc 3 update: [David Haywood] | |
| 1452 | - Shuffled a few things around based on new findings | |
| 1453 | - Added an extra decryption table used for the Brap Boys startup code | |
| 1454 | (still doesn't do anything interesting) | |
| 1455 | - Noted that one of the unknown parameters for the MCU Init command | |
| 1456 | is where it reads / writes eeprom data from. | |
| 1457 | - Noted that an additional parameter in the MCU commands may cause | |
| 1458 | further displacement of the writeback address, as BRap Boys seems | |
| 1459 | to rely on this (needs further testing) - added a hack for now so | |
| 1460 | that BRap Boys places the writeback address of the initial table | |
| 1461 | somewhere that causes it to get executed. | |
| 1462 | ||
| 1463 | Marked graphics ROMs on Led Storm Rally 2011 (US) as bad, as they | |
| 1464 | cannot possibly be the right ones for this set. [David Haywood] | |
| 1465 | ||
| 1466 | Properly added support for namcos2 multiple posirq anyway. Fixes | |
| 1467 | the following issues:[hap] | |
| 1468 | - starblad polys | |
| 1469 | - fourtrax track and mirror | |
| 1470 | - dirtfoxj game start spotlight effect, game still locks up tho | |
| 1471 | - burnforc 'hiccup' glitches when scrolling left/right | |
| 1472 | - luckywld tunnel glitch (still a bit glitchy though) | |
| 1473 | - finehour bad sprite colors | |
| 1474 | ||
| 1475 | Changed vsyncs to the following games: truxton, demon's world, Pang, | |
| 1476 | super pang, block block, yie ar kungfu and kikikaikai. | |
| 1477 | [Corrado Tomaselli] | |
| 1478 | ||
| 1479 | Corrected sn76459 clock to Ye Ar Kungfu and verified the other clocks. | |
| 1480 | [Corrado Tomaselli] | |
| 1481 | ||
| 1482 | Changed the main clock of Pang, Super Pang and Block Block. | |
| 1483 | [Corrado Tomaselli] | |
| 1484 | ||
| 1485 | Switched galaxian LFO sound to use the long-disabled NEW_LFO. It's not | |
| 1486 | entirely fixed, but it's closer. [hap] | |
| 1487 | ||
| 1488 | Minor MCR documentation changes: [Kevin Eshbach] | |
| 1489 | * Updated all of the TRON sets with location of the roms and the | |
| 1490 | board they belong to | |
| 1491 | * Updated the name of the PROM on the Super Sound I/O board | |
| 1492 | * Added notes about PALs that need to be dumped (The same PAL part | |
| 1493 | numbers are also used on Xenophobe and probably other MCR II & | |
| 1494 | III games.) | |
| 1495 | ||
| 1496 | Fixed chdman -update to leave the write protect state alone when | |
| 1497 | updating uncompressed CHDs. [Michael Zapf] | |
| 1498 | ||
| 1499 | Changed default key for Mahjong P1 Bet to '3', because '2' was | |
| 1500 | conflicting with P2 Start in 2 players Mahjong games. [Fabio Priuli] | |
| 1501 | ||
| 1502 | ||
| 1503 | ||
| 784 | 1504 | New games added or promoted from NOT_WORKING status |
| 785 | 1505 | --------------------------------------------------- |
| 786 | New Double Bet Mahjong [alien_mame, Dumping Union] | |
| 787 | Pro Soccer [Angelo Salese] | |
| 788 | Steel Worker [Hau, Chack'n, Dumping Union] | |
| 1506 | Tetris (Photon System) [Miodrag Milanovic, Mariusz Wojcieszek] | |
| 1507 | Touchmaster 2000 [Mike Green, Dumping Union] | |
| 1508 | 3-D Bowling [robiza] | |
| 1509 | Panther [Angelo Salese, robiza, Mr. Do] | |
| 1510 | 39 in 1 [R. Belmont, MooglyGuy] | |
| 789 | 1511 | |
| 790 | 1512 | |
| 791 | 1513 | |
| 792 | 1514 | New clones added |
| 793 | 1515 | ---------------- |
| 794 | Give us a Break (6 versions) [Anonymous, alien_mame] | |
| 795 | Dambusters (US, set2) | |
| 796 | [N. Garnier, D. Beneke, J. Leyda, A. Costin, W. Belk and Smitdogg] | |
| 797 | Cruis'n Exotica (version 2.4) [K. Lee, Smitdogg] | |
| 798 | Grand Striker (Americas) [ClawGrip, ShengLuc] | |
| 799 | Best League (World) [ClawGrip, ShengLuc] | |
| 800 | Grand Striker 2 (Europe and Oceania) [ClawGrip, ShengLuc] | |
| 1516 | Royal Card Professional v2.0 [Team Europe / Dumping Project] | |
| 1517 | (not working) | |
| 1518 | Guardian Storm [Christian Raftopol, David Haywood, Dumping Union] | |
| 1519 | Outrun (original revision) [Guru] | |
| 1520 | Touchmaster 5000 (v7.01 Standard) [Brian Troha, Dumping Union] | |
| 1521 | Cruis'n Exotica v2.0 [Smitdogg, Guru, Dumping Union] (not working) | |
| 1522 | Pinball Action (set 4, encrypted) [Team Europe / Dumping Project] | |
| 1523 | Kamakazi III (Galaxian Clone) [Darran] | |
| 1524 | Enchanted Forest (2 sets) [Heihachi_73, AGEMAME] (not working) | |
| 1525 | Soccer Superstars (ver JAC) [f205v] (not working) | |
| 1526 | Dream Land / Super Dream Land (bootleg of Bubble Bobble) | |
| 1527 | [Sean Clough, David Haywood] | |
| 801 | 1528 | |
| 802 | 1529 | |
| 803 | 1530 | |
| 804 | 1531 | New games marked as GAME_NOT_WORKING |
| 805 | 1532 | ------------------------------------ |
| 806 | Sports Shooting USA [Guru] | |
| 807 | Ranger Mission [Guru] | |
| 808 | beatmania IIDX [Guru] | |
| 1533 | Extreme Hunting [Guru] | |
| 1534 | Photo Play [Klaus Sommers, Angelo Salese] | |
| 1535 | Capcom vs. SNK Millenium Fight 2000 (000904) [Deunan Knute] | |
| 1536 | Videotronics Poker [Angelo Salese, Siftware] | |
| 1537 | Bingo Roll (4 sets) [Team Europe, Dumping Project] | |
| 1538 | Space Walk [Siftware, David Haywood] | |
| 1539 | '98 NeoPri Best 44 (Neo Print) [JohnBoy] | |
| 1540 | Top Gear [Heihachi_73, AGEMAME] | |
| 1541 | K.G. Bird (2 sets) [Heihachi_73, AGEMAME] | |
| 1542 | Black Rhino [Heihachi_73, AGEMAME] | |
| 1543 | 3 Bags Full [Heihachi_73, AGEMAME] | |
| 1544 | Phantom Pays [Heihachi_73, AGEMAME] | |
| 1545 | Sweet Hearts II [Heihachi_73, AGEMAME] | |
| 1546 | Golden Canaries [Heihachi_73, AGEMAME] | |
| 1547 | Coral Riches II [Heihachi_73, AGEMAME] | |
| 1548 |
| Previous | 15994 Revisions | Next |