@@ -305,8 +305,8 @@ void tp84_state::draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect)
305
305
306
306
int const code = m_spriteram[offs + 1 ];
307
307
int const color = palette_base | (m_spriteram[offs + 2 ] & 0x0f );
308
- int const flip_x = ~m_spriteram[offs + 2 ] & 0x40 ;
309
- int const flip_y = m_spriteram[offs + 2 ] & 0x80 ;
308
+ int const flip_x = BIT ( ~m_spriteram[offs + 2 ], 6 ) ;
309
+ int const flip_y = BIT ( m_spriteram[offs + 2 ], 7 ) ;
310
310
311
311
m_gfxdecode->gfx (1 )->transmask (bitmap, cliprect, code, color, flip_x, flip_y, x, y,
312
312
m_palette->transpen_mask (*m_gfxdecode->gfx (1 ), color, palette_base));
@@ -405,28 +405,26 @@ uint8_t tp84_state::sh_timer_r()
405
405
406
406
void tp84_state::filter_w (offs_t offset, uint8_t data)
407
407
{
408
- int C;
409
-
410
408
// 76489 #0
411
- C = 0 ;
412
- if (offset & 0x008 ) C += 47000 ; // 47000pF = 0.047uF
413
- if (offset & 0x010 ) C += 470000 ; // 470000pF = 0.47uF
409
+ int C = 0 ;
410
+ if (BIT ( offset, 3 ) ) C += 47000 ; // 47000pF = 0.047uF
411
+ if (BIT ( offset, 4 ) ) C += 470000 ; // 470000pF = 0.47uF
414
412
m_filter[0 ]->filter_rc_set_RC (filter_rc_device::LOWPASS_3R, 1000 , 2200 , 1000 , CAP_P (C));
415
413
416
414
// 76489 #1 (optional)
417
415
C = 0 ;
418
- if (offset & 0x020 ) C += 47000 ; // 47000pF = 0.047uF
419
- if (offset & 0x040 ) C += 470000 ; // 470000pF = 0.47uF
416
+ if (BIT ( offset, 5 ) ) C += 47000 ; // 47000pF = 0.047uF
417
+ if (BIT ( offset, 6 ) ) C += 470000 ; // 470000pF = 0.47uF
420
418
// m_filter[1]->filter_rc_set_RC(filter_rc_device::LOWPASS_3R, 1000, 2200, 1000, CAP_P(C));
421
419
422
420
// 76489 #2
423
421
C = 0 ;
424
- if (offset & 0x080 ) C += 470000 ; // 470000pF = 0.47uF
422
+ if (BIT ( offset, 7 ) ) C += 470000 ; // 470000pF = 0.47uF
425
423
m_filter[1 ]->filter_rc_set_RC (filter_rc_device::LOWPASS_3R, 1000 , 2200 , 1000 , CAP_P (C));
426
424
427
425
// 76489 #3
428
426
C = 0 ;
429
- if (offset & 0x100 ) C += 470000 ; // 470000pF = 0.47uF
427
+ if (BIT ( offset, 8 ) ) C += 470000 ; // 470000pF = 0.47uF
430
428
m_filter[2 ]->filter_rc_set_RC (filter_rc_device::LOWPASS_3R, 1000 , 2200 , 1000 , CAP_P (C));
431
429
}
432
430
@@ -454,7 +452,7 @@ void tp84_state::tp84_cpu1_map(address_map &map)
454
452
map (0x4400 , 0x47ff ).ram ().share (m_fg_videoram);
455
453
map (0x4800 , 0x4bff ).ram ().share (m_bg_colorram);
456
454
map (0x4c00 , 0x4fff ).ram ().share (m_fg_colorram);
457
- map (0x5000 , 0x57ff ).ram ().share (" cpu1_2 " );
455
+ map (0x5000 , 0x57ff ).ram ().share (" sharedram " );
458
456
map (0x8000 , 0xffff ).rom ();
459
457
}
460
458
@@ -464,7 +462,7 @@ void tp84_state::tp84b_cpu1_map(address_map &map)
464
462
map (0x0400 , 0x07ff ).ram ().share (m_fg_videoram);
465
463
map (0x0800 , 0x0bff ).ram ().share (m_bg_colorram);
466
464
map (0x0c00 , 0x0fff ).ram ().share (m_fg_colorram);
467
- map (0x1000 , 0x17ff ).ram ().share (" cpu1_2 " );
465
+ map (0x1000 , 0x17ff ).ram ().share (" sharedram " );
468
466
map (0x1800 , 0x1800 ).w (" watchdog" , FUNC (watchdog_timer_device::reset_w));
469
467
map (0x1a00 , 0x1a00 ).portr (" SYSTEM" ).writeonly ().share (m_palette_bank);
470
468
map (0x1a20 , 0x1a20 ).portr (" P1" );
@@ -495,7 +493,7 @@ void tp84_state::cpu2_map(address_map &map)
495
493
map (0x4000 , 0x4000 ).w (FUNC (tp84_state::sub_irq_mask_w));
496
494
map (0x6000 , 0x679f ).ram ();
497
495
map (0x67a0 , 0x67ff ).ram ().w (FUNC (tp84_state::spriteram_w)).share (m_spriteram);
498
- map (0x8000 , 0x87ff ).ram ().share (" cpu1_2 " );
496
+ map (0x8000 , 0x87ff ).ram ().share (" sharedram " );
499
497
map (0xe000 , 0xffff ).rom ();
500
498
}
501
499
@@ -571,9 +569,9 @@ static const gfx_layout charlayout =
571
569
RGN_FRAC (1 ,1 ),
572
570
2 ,
573
571
{ 4 , 0 },
574
- { 0 , 1 , 2 , 3 , 8 *8 + 0 , 8 * 8 + 1 , 8 * 8 + 2 , 8 * 8 + 3 },
575
- { 0 * 8 , 1 * 8 , 2 * 8 , 3 * 8 , 4 * 8 , 5 * 8 , 6 * 8 , 7 * 8 },
576
- 16 * 8
572
+ { STEP4 ( 0 , 1 ), STEP4 ( 8 *8 , 1 ) },
573
+ { STEP8 ( 0 , 8 ) },
574
+ 8 * 8 * 2
577
575
};
578
576
579
577
static const gfx_layout spritelayout =
@@ -582,11 +580,9 @@ static const gfx_layout spritelayout =
582
580
RGN_FRAC (1 ,2 ),
583
581
4 ,
584
582
{ RGN_FRAC (1 ,2 )+4 , RGN_FRAC (1 ,2 )+0 , 4 ,0 },
585
- { 0 , 1 , 2 , 3 , 8 *8 +0 , 8 *8 +1 , 8 *8 +2 , 8 *8 +3 ,
586
- 16 *8 +0 , 16 *8 +1 , 16 *8 +2 , 16 *8 +3 , 24 *8 +0 , 24 *8 +1 , 24 *8 +2 , 24 *8 +3 },
587
- { 0 *8 , 1 *8 , 2 *8 , 3 *8 , 4 *8 , 5 *8 , 6 *8 , 7 *8 ,
588
- 32 *8 , 33 *8 , 34 *8 , 35 *8 , 36 *8 , 37 *8 , 38 *8 , 39 *8 },
589
- 64 *8
583
+ { STEP4 (0 ,1 ), STEP4 (8 *8 *1 ,1 ), STEP4 (8 *8 *2 ,1 ), STEP4 (8 *8 *3 ,1 ) },
584
+ { STEP8 (0 ,8 ), STEP8 (8 *8 *4 ,8 ) },
585
+ 16 *16 *2
590
586
};
591
587
592
588
static GFXDECODE_START ( gfx_tp84 )
@@ -660,7 +656,7 @@ void tp84_state::tp84b(machine_config &config)
660
656
***************************************************************************/
661
657
662
658
ROM_START ( tp84 )
663
- ROM_REGION ( 0x10000 , " cpu1" , 0 )
659
+ ROM_REGION ( 0x10000 , " cpu1" , ROMREGION_ERASE00 )
664
660
ROM_LOAD ( " 388_f04.7j" , 0x8000 , 0x2000 , CRC(605f61c7) SHA1(6848ef35ec7f92cccefb0fb2de42c4b0e9ec476f) )
665
661
ROM_LOAD ( " 388_05.8j" , 0xa000 , 0x2000 , CRC(4b4629a4) SHA1(f3bb1ee66c9e47d050370ac9ca74f3020cb9cfa3) )
666
662
ROM_LOAD ( " 388_f06.9j" , 0xc000 , 0x2000 , CRC(dbd5333b) SHA1(65dee1fd4c940a5423d57cb55a7f2ad89c59c5c6) )
@@ -669,7 +665,7 @@ ROM_START( tp84 )
669
665
ROM_REGION ( 0x10000 , " sub" , 0 )
670
666
ROM_LOAD ( " 388_f08.10d" , 0xe000 , 0x2000 , CRC(36462ff1) SHA1(118a1b46ee01a583e6cf39af59b073321c76dbff) ) // E08?
671
667
672
- ROM_REGION ( 0x10000 , " audiocpu" , 0 )
668
+ ROM_REGION ( 0x4000 , " audiocpu" , ROMREGION_ERASE00 )
673
669
ROM_LOAD ( " 388j13.6a" , 0x0000 , 0x2000 , CRC(c44414da) SHA1(981289f5bdf7dc1348f4ca547ac933ef503b6588) )
674
670
675
671
ROM_REGION ( 0x4000 , " tiles" , 0 )
@@ -691,7 +687,7 @@ ROM_START( tp84 )
691
687
ROM_END
692
688
693
689
ROM_START ( tp84a )
694
- ROM_REGION ( 0x10000 , " cpu1" , 0 )
690
+ ROM_REGION ( 0x10000 , " cpu1" , ROMREGION_ERASE00 )
695
691
ROM_LOAD ( " 388_f04.7j" , 0x8000 , 0x2000 , CRC(605f61c7) SHA1(6848ef35ec7f92cccefb0fb2de42c4b0e9ec476f) )
696
692
ROM_LOAD ( " 388_f05.8j" , 0xa000 , 0x2000 , CRC(e97d5093) SHA1(c76c119574d19d2ac10e6987150744542803ef5b) )
697
693
ROM_LOAD ( " 388_f06.9j" , 0xc000 , 0x2000 , CRC(dbd5333b) SHA1(65dee1fd4c940a5423d57cb55a7f2ad89c59c5c6) )
@@ -700,7 +696,7 @@ ROM_START( tp84a )
700
696
ROM_REGION ( 0x10000 , " sub" , 0 )
701
697
ROM_LOAD ( " 388_f08.10d" , 0xe000 , 0x2000 , CRC(36462ff1) SHA1(118a1b46ee01a583e6cf39af59b073321c76dbff) ) // E08?
702
698
703
- ROM_REGION ( 0x10000 , " audiocpu" , 0 )
699
+ ROM_REGION ( 0x4000 , " audiocpu" , ROMREGION_ERASE00 )
704
700
ROM_LOAD ( " 388j13.6a" , 0x0000 , 0x2000 , CRC(c44414da) SHA1(981289f5bdf7dc1348f4ca547ac933ef503b6588) )
705
701
706
702
ROM_REGION ( 0x4000 , " tiles" , 0 )
@@ -722,15 +718,15 @@ ROM_START( tp84a )
722
718
ROM_END
723
719
724
720
ROM_START ( tp84b )
725
- ROM_REGION ( 0x10000 , " cpu1" , 0 )
721
+ ROM_REGION ( 0x10000 , " cpu1" , ROMREGION_ERASE00 )
726
722
// 0x6000 - 0x7fff space for diagnostic ROM
727
723
ROM_LOAD ( " 388j05.8j" , 0x8000 , 0x4000 , CRC(a59e2fda) SHA1(7d776d5d3fcfbe81d42580cfe93614dc4618a440) )
728
724
ROM_LOAD ( " 388j07.10j" , 0xc000 , 0x4000 , CRC(d25d18e6) SHA1(043f515cc66f6af004be81d6a6b5a92b553107ff) )
729
725
730
726
ROM_REGION ( 0x10000 , " sub" , 0 )
731
727
ROM_LOAD ( " 388j08.10d" , 0xe000 , 0x2000 , CRC(2aea6b42) SHA1(58c3b4852f22a766f440b98904b73c00a31eae01) )
732
728
733
- ROM_REGION ( 0x10000 , " audiocpu" , 0 )
729
+ ROM_REGION ( 0x4000 , " audiocpu" , ROMREGION_ERASE00 )
734
730
ROM_LOAD ( " 388j13.6a" , 0x0000 , 0x2000 , CRC(c44414da) SHA1(981289f5bdf7dc1348f4ca547ac933ef503b6588) )
735
731
736
732
ROM_REGION ( 0x4000 , " tiles" , 0 )
0 commit comments