trunk/src/devices/machine/wozfdc.cpp
r250328 | r250329 | |
186 | 186 | |
187 | 187 | READ8_MEMBER(wozfdc_device::read) |
188 | 188 | { |
189 | | lss_sync(); |
190 | 189 | control(offset); |
191 | 190 | |
192 | 191 | if(!(offset & 1)) { |
| 192 | lss_sync(); |
193 | 193 | return data_reg; |
194 | 194 | } |
195 | 195 | return 0xff; |
r250328 | r250329 | |
202 | 202 | |
203 | 203 | WRITE8_MEMBER(wozfdc_device::write) |
204 | 204 | { |
| 205 | control(offset); |
205 | 206 | lss_sync(); |
206 | | control(offset); |
207 | 207 | last_6502_write = data; |
208 | 208 | } |
209 | 209 | |
r250328 | r250329 | |
220 | 220 | |
221 | 221 | void wozfdc_device::control(int offset) |
222 | 222 | { |
223 | | if(offset < 8) |
| 223 | if(offset < 8) { |
| 224 | if(active) |
| 225 | lss_sync(); |
224 | 226 | phase(offset >> 1, offset & 1); |
225 | 227 | |
226 | | else |
| 228 | } else |
227 | 229 | switch(offset) { |
228 | 230 | case 0x8: |
229 | 231 | if(active == MODE_ACTIVE) { |
| 232 | lss_sync(); |
230 | 233 | delay_timer->adjust(attotime::from_seconds(1)); |
231 | 234 | active = MODE_DELAY; |
232 | 235 | } |
r250328 | r250329 | |
249 | 252 | case 0xa: |
250 | 253 | external_io_select = false; |
251 | 254 | if(floppy != floppy0->get_device()) { |
252 | | if(active) |
| 255 | if(active) { |
| 256 | lss_sync(); |
253 | 257 | floppy->mon_w(true); |
| 258 | } |
254 | 259 | floppy = floppy0->get_device(); |
255 | 260 | if(active) |
256 | 261 | floppy->mon_w(false); |
r250328 | r250329 | |
262 | 267 | { |
263 | 268 | if (floppy != floppy1->get_device()) |
264 | 269 | { |
265 | | if(active) |
| 270 | if(active) { |
| 271 | lss_sync(); |
266 | 272 | floppy->mon_w(true); |
| 273 | } |
267 | 274 | floppy = floppy1->get_device(); |
268 | 275 | if(active) |
269 | 276 | floppy->mon_w(false); |
r250328 | r250329 | |
276 | 283 | break; |
277 | 284 | case 0xc: |
278 | 285 | if(mode_load) { |
279 | | if(active) |
| 286 | if(active) { |
| 287 | lss_sync(); |
280 | 288 | address &= ~0x04; |
| 289 | } |
281 | 290 | mode_load = false; |
282 | 291 | } |
283 | 292 | break; |
284 | 293 | case 0xd: |
285 | 294 | if(!mode_load) { |
286 | | if(active) |
| 295 | if(active) { |
| 296 | lss_sync(); |
287 | 297 | address |= 0x04; |
| 298 | } |
288 | 299 | mode_load = true; |
289 | 300 | } |
290 | 301 | break; |
291 | 302 | case 0xe: |
292 | 303 | if(mode_write) { |
293 | | if(active) |
| 304 | if(active) { |
| 305 | lss_sync(); |
294 | 306 | address &= ~0x08; |
| 307 | } |
295 | 308 | mode_write = false; |
296 | | attotime now = machine().time(); |
297 | | if(floppy) |
298 | | floppy->write_flux(write_start_time, now, write_position, write_buffer); |
299 | 309 | } |
300 | 310 | break; |
301 | 311 | case 0xf: |
302 | 312 | if(!mode_write) { |
303 | 313 | if(active) { |
| 314 | lss_sync(); |
304 | 315 | address |= 0x08; |
305 | 316 | write_start_time = machine().time(); |
306 | | write_position = 0; |
307 | 317 | if(floppy) |
308 | 318 | floppy->set_write_splice(write_start_time); |
309 | 319 | } |
r250328 | r250329 | |
345 | 355 | if(!active) |
346 | 356 | return; |
347 | 357 | |
348 | | attotime next_flux = floppy ? floppy->get_next_transition(cycles_to_time(cycles-1)) : attotime::never; |
| 358 | attotime next_flux = floppy ? floppy->get_next_transition(cycles_to_time(cycles) - attotime::from_usec(1)) : attotime::never; |
349 | 359 | |
350 | 360 | UINT64 cycles_limit = time_to_cycles(machine().time()); |
351 | 361 | UINT64 cycles_next_flux = next_flux != attotime::never ? time_to_cycles(next_flux) : UINT64(-1); |
r250328 | r250329 | |
372 | 382 | write_line_active = !write_line_active; |
373 | 383 | assert(write_position != 32); |
374 | 384 | write_buffer[write_position++] = cycles_to_time(cycles); |
375 | | } else if(write_position >= 30) { |
376 | | attotime now = cycles_to_time(cycles); |
377 | | if(floppy) |
378 | | floppy->write_flux(write_start_time, now, write_position, write_buffer); |
379 | | write_start_time = now; |
380 | | write_position = 0; |
381 | 385 | } |
382 | 386 | } |
383 | 387 | |
trunk/src/mame/drivers/galaxian.cpp
r250328 | r250329 | |
7126 | 7126 | ROM_LOAD( "gxrf.6l", 0x0000, 0x0020, CRC(992350e5) SHA1(e901b1abd11cc0f02dd6d87b429d8997f762c15d) ) |
7127 | 7127 | ROM_END |
7128 | 7128 | |
7129 | | |
7130 | 7129 | ROM_START( astrians ) |
7131 | 7130 | ROM_REGION( 0x10000, "maincpu", 0 ) |
7132 | 7131 | ROM_LOAD( "astrians.7h", 0x0000, 0x0800, CRC(21eba3d0) SHA1(d07f141d785c86faca8c40af034c26f2789e9346) ) |
r250328 | r250329 | |
7158 | 7157 | ROM_REGION( 0x0020, "proms", 0 ) |
7159 | 7158 | ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) |
7160 | 7159 | ROM_END |
| 7160 | |
7161 | 7161 | ROM_START( superg ) |
7162 | 7162 | ROM_REGION( 0x4000, "maincpu", 0 ) |
7163 | 7163 | ROM_LOAD( "7f.bin", 0x0000, 0x1000, CRC(4335b1de) SHA1(e41e3d90dac738cf71377f3b476ec67b14dee27a) ) |
r250328 | r250329 | |
7173 | 7173 | ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) |
7174 | 7174 | ROM_END |
7175 | 7175 | |
| 7176 | ROM_START( supergs ) // rom names are from HBMAME; real names yet to be found |
| 7177 | ROM_REGION( 0x10000, "maincpu", 0 ) |
| 7178 | ROM_LOAD( "7f.bin", 0x0000, 0x1000, CRC(4335b1de) SHA1(e41e3d90dac738cf71377f3b476ec67b14dee27a) ) |
| 7179 | ROM_LOAD( "superg.w", 0x1000, 0x0800, CRC(ddeabdae) SHA1(daa5109a32c7c9a80bdb212dc3e4e3e3c104a731) ) |
| 7180 | ROM_LOAD( "superg.y", 0x1800, 0x0800, CRC(9463f753) SHA1(d9cb35c19aafec43d08b048bbe2337a790f6ba9d) ) |
| 7181 | ROM_LOAD( "supergs.z", 0x2000, 0x0800, CRC(95e9005c) SHA1(cb4c556f00ec2ae9876d235224a7eb7816c06f60) ) |
| 7182 | |
| 7183 | ROM_REGION( 0x1000, "gfx1", 0 ) |
| 7184 | ROM_LOAD( "galmidw.1j", 0x0000, 0x0800, CRC(84decf98) SHA1(2e565cb6057b1816a6b4541e6dfadd3c3762fa36) ) |
| 7185 | ROM_LOAD( "galmidw.1k", 0x0800, 0x0800, CRC(c31ada9e) SHA1(237ebb48549b34ca59a13cc2706512d957413ec4) ) |
| 7186 | |
| 7187 | ROM_REGION( 0x0020, "proms", 0 ) |
| 7188 | ROM_LOAD( "6l.bpr", 0x0000, 0x0020, CRC(c3ac9467) SHA1(f382ad5a34d282056c78a5ec00c30ec43772bae2) ) |
| 7189 | ROM_END |
| 7190 | |
7176 | 7191 | ROM_START( galturbo ) |
7177 | 7192 | ROM_REGION( 0x4000, "maincpu", 0 ) |
7178 | 7193 | ROM_LOAD( "galturbo.u", 0x0000, 0x0800, CRC(e8f3aa67) SHA1(a0e9576784dbe602dd9780e667f01f31defd7c00) ) |
r250328 | r250329 | |
11052 | 11067 | /* straight Galaxian ripoffs on basic galaxian hardware */ |
11053 | 11068 | GAME( 1979, moonaln, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "Namco / Nichibutsu (Karateco license?)", "Moon Alien", MACHINE_SUPPORTS_SAVE ) // or bootleg? |
11054 | 11069 | GAME( 1979, superg, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "hack", "Super Galaxians (galaxiana hack)", MACHINE_SUPPORTS_SAVE ) |
| 11070 | GAME( 1979, supergs, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "hack", "Super Galaxians (Silver Systems)", MACHINE_SUPPORTS_SAVE ) |
11055 | 11071 | GAME( 1979, galturbo, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "hack", "Galaxian Turbo (superg hack)", MACHINE_SUPPORTS_SAVE ) |
11056 | 11072 | GAME( 1979, galapx, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "hack", "Galaxian Part X (moonaln hack)", MACHINE_SUPPORTS_SAVE ) |
11057 | 11073 | GAME( 1979, galap1, galaxian, galaxian, superg, galaxian_state, galaxian, ROT90, "hack", "Space Invaders Galactica (galaxiana hack)", MACHINE_SUPPORTS_SAVE ) |