summaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
author David Haywood <mamehaze@users.noreply.github.com>2016-04-28 17:25:02 +0100
committer David Haywood <mamehaze@users.noreply.github.com>2016-04-28 17:25:02 +0100
commitc38ba69bde128947a18e00c61b96e64646e9292e (patch)
tree24bf9cb60e069db4876d528d03f7805bcc5f5021
parent19ed9384a61f5a559b9d55e9a1667e9549bf660c (diff)
changes based on PCB observations (nw)
-rw-r--r--src/mame/drivers/crgolf.cpp48
-rw-r--r--src/mame/includes/crgolf.h10
-rw-r--r--src/mame/video/crgolf.cpp45
3 files changed, 49 insertions, 54 deletions
diff --git a/src/mame/drivers/crgolf.cpp b/src/mame/drivers/crgolf.cpp
index d4d5b18f3d4..ad0c73d2404 100644
--- a/src/mame/drivers/crgolf.cpp
+++ b/src/mame/drivers/crgolf.cpp
@@ -77,7 +77,6 @@
next to rom M-GF_A10.12K
the box must contain at least a Z80
- possibly other sound hardware??
****************************************************************************
@@ -478,9 +477,18 @@ static MACHINE_CONFIG_START( crgolf, crgolf_state )
MCFG_ADDRESS_MAP_BANK_ADDRBUS_WIDTH(16)
MCFG_ADDRESS_MAP_BANK_STRIDE(0x8000) /* technically 0x6000, but powers of 2 makes the memory map / address masking cleaner. */
+ MCFG_SCREEN_PALETTE("palette")
+ MCFG_PALETTE_ADD("palette", 0x20)
+ MCFG_PALETTE_INIT_OWNER(crgolf_state, crgolf)
/* video hardware */
- MCFG_FRAGMENT_ADD(crgolf_video)
+ MCFG_SCREEN_ADD("screen", RASTER)
+ MCFG_SCREEN_SIZE(256, 256)
+ MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 247)
+ MCFG_SCREEN_REFRESH_RATE(60)
+ MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
+ MCFG_SCREEN_UPDATE_DRIVER(crgolf_state, screen_update_crgolf)
+ MCFG_SCREEN_PALETTE("palette")
/* sound hardware */
MCFG_SPEAKER_STANDARD_MONO("mono")
@@ -498,7 +506,7 @@ static MACHINE_CONFIG_DERIVED( crgolfhi, crgolf )
MACHINE_CONFIG_END
-static MACHINE_CONFIG_DERIVED( mastrglf, crgolf )
+static MACHINE_CONFIG_DERIVED( mastrglf, crgolfhi )
/* basic machine hardware */
MCFG_CPU_MODIFY("maincpu")
@@ -511,6 +519,12 @@ static MACHINE_CONFIG_DERIVED( mastrglf, crgolf )
MCFG_CPU_IO_MAP(mastrglf_subio)
MCFG_CPU_VBLANK_INT_DRIVER("screen", crgolf_state, irq0_line_hold)
+ MCFG_DEVICE_REMOVE("palette")
+
+ MCFG_PALETTE_ADD("palette", 0x100)
+ MCFG_PALETTE_INIT_OWNER(crgolf_state, mastrglf)
+
+
MACHINE_CONFIG_END
@@ -692,21 +706,25 @@ ROM_START( mastrglf )
ROM_REGION( 0x10000, "maincpu", 0 )
ROM_LOAD( "M-GF_A1.4A.27128", 0x00000, 0x04000, CRC(55b89e8f) SHA1(2860fd3f8e4241dc25bb9a14e8967cdcaf769432) )
- ROM_REGION( 0x40000, "maindata", 0 )
- ROM_LOAD( "M-GF_A2.5A.27256", 0x00000, 0x08000, CRC(98aa20d8) SHA1(64007c4706f8e2e3b57c4a8467b37d44e8be9a01) )
- ROM_LOAD( "M-GF_A3.7A.27256", 0x08000, 0x08000, CRC(3f62b979) SHA1(90cc784230f6ed7fd3dd943e0808f0c3d722806a) )
- ROM_LOAD( "M-GF_A4.8A.27256", 0x10000, 0x08000, CRC(08a470d1) SHA1(4dabff8fc915406b1d4f7936d925378eec0df915) )
- ROM_LOAD( "M-GF_A5.10A.27256", 0x18000, 0x08000, CRC(4397c8a0) SHA1(deb9de1cf7ce6ddc69addf18ff5bf2f25ed11602) )
- ROM_LOAD( "M-GF_A6.12A.27256", 0x20000, 0x08000, CRC(b1fccecf) SHA1(8fb5e40f34596d9faa73255afc2c2635e9008954) )
- ROM_LOAD( "M-GF_A7.13A.27256", 0x28000, 0x08000, CRC(06075e41) SHA1(3426f4ede8449288519e25bc8a1d679bb5137279) )
- ROM_LOAD( "M-GF_A8.15A.27256", 0x30000, 0x08000, CRC(9ea9183b) SHA1(55f54575cd662b6194f69532baa25c9b2272760f) )
- ROM_LOAD( "M-GF_A9.16A.27256", 0x38000, 0x08000, CRC(61ab715f) SHA1(6b9cccaa83a9a9e44a46bae796e2f9eaa9f9c951) )
-
+ ROM_REGION( 0x30000, "maindata", 0 ) // 24 (0x18) * 0x2000 banks
+ ROM_LOAD( "M-GF_A2.5A.27256.ROM5", 0x00000, 0x08000, CRC(98aa20d8) SHA1(64007c4706f8e2e3b57c4a8467b37d44e8be9a01) )
+ ROM_LOAD( "M-GF_A3.7A.27256.ROM4", 0x08000, 0x08000, CRC(3f62b979) SHA1(90cc784230f6ed7fd3dd943e0808f0c3d722806a) )
+ ROM_LOAD( "M-GF_A4.8A.27256.ROM3", 0x10000, 0x08000, CRC(08a470d1) SHA1(4dabff8fc915406b1d4f7936d925378eec0df915) )
+ ROM_LOAD( "M-GF_A5.10A.27256.ROM2", 0x18000, 0x08000, CRC(4397c8a0) SHA1(deb9de1cf7ce6ddc69addf18ff5bf2f25ed11602) )
+ ROM_LOAD( "M-GF_A6.12A.27256.ROM1", 0x20000, 0x08000, CRC(b1fccecf) SHA1(8fb5e40f34596d9faa73255afc2c2635e9008954) )
+ ROM_LOAD( "M-GF_A7.13A.27256.ROM0", 0x28000, 0x08000, CRC(06075e41) SHA1(3426f4ede8449288519e25bc8a1d679bb5137279) )
+
ROM_REGION( 0x10000, "audiocpu", 0 ) // next to large module
ROM_LOAD( "M-GF_A10.12K.27256", 0x00000, 0x08000, CRC(d145b144) SHA1(52370d56106f0280c52266b5a727493a3396a8e3) )
- ROM_REGION( 0x0020, "proms", 0 ) // temp, for the video code, need to verify if this PCB has a PROM
- ROM_LOAD( "pr5877.1s", 0x0000, 0x0020, BAD_DUMP CRC(f880b95d) SHA1(5ad0ee39e2b9befaf3895ec635d5865b7b1e562b) )
+ ROM_REGION( 0x10000, "adpcm", 0 ) // MSM5205 samples
+ ROM_LOAD( "M-GF_A8.15A.27256", 0x00000, 0x08000, CRC(9ea9183b) SHA1(55f54575cd662b6194f69532baa25c9b2272760f) )
+ ROM_LOAD( "M-GF_A9.16A.27256", 0x08000, 0x08000, CRC(61ab715f) SHA1(6b9cccaa83a9a9e44a46bae796e2f9eaa9f9c951) )
+
+ ROM_REGION( 0x0300, "proms", 0 )
+ ROM_LOAD( "tbp24s10n.1", 0x0000, 0x0100, NO_DUMP )
+ ROM_LOAD( "tbp24s10n.2", 0x0100, 0x0100, NO_DUMP )
+ ROM_LOAD( "tbp24s10n.2", 0x0200, 0x0100, NO_DUMP )
ROM_END
diff --git a/src/mame/includes/crgolf.h b/src/mame/includes/crgolf.h
index 675acc8b00b..50b6c53d290 100644
--- a/src/mame/includes/crgolf.h
+++ b/src/mame/includes/crgolf.h
@@ -26,7 +26,9 @@ public:
m_vrambank(*this, "vrambank"),
m_maincpu(*this, "maincpu"),
m_audiocpu(*this, "audiocpu"),
- m_msm(*this, "msm"){ }
+ m_msm(*this, "msm"),
+ m_palette(*this, "palette")
+ { }
@@ -51,6 +53,7 @@ public:
required_device<cpu_device> m_maincpu;
required_device<cpu_device> m_audiocpu;
optional_device<msm5205_device> m_msm;
+ required_device<palette_device> m_palette;
DECLARE_WRITE8_MEMBER(rom_bank_select_w);
DECLARE_READ8_MEMBER(switch_input_r);
DECLARE_READ8_MEMBER(analog_input_r);
@@ -65,8 +68,9 @@ public:
DECLARE_DRIVER_INIT(crgolfhi);
virtual void machine_start() override;
virtual void machine_reset() override;
- DECLARE_VIDEO_START(crgolf);
- UINT32 screen_update_crgolf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect);
+ DECLARE_PALETTE_INIT(crgolf);
+ DECLARE_PALETTE_INIT(mastrglf);
+ UINT32 screen_update_crgolf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
TIMER_CALLBACK_MEMBER(main_to_sound_callback);
TIMER_CALLBACK_MEMBER(sound_to_main_callback);
void get_pens( pen_t *pens );
diff --git a/src/mame/video/crgolf.cpp b/src/mame/video/crgolf.cpp
index e85bd28173d..bc25f42b074 100644
--- a/src/mame/video/crgolf.cpp
+++ b/src/mame/video/crgolf.cpp
@@ -15,13 +15,15 @@
+
+
/*************************************
*
- * Palette handling
+ * Video startup
*
*************************************/
-void crgolf_state::get_pens( pen_t *pens )
+PALETTE_INIT_MEMBER(crgolf_state, crgolf)
{
offs_t offs;
const UINT8 *prom = memregion("proms")->base();
@@ -49,23 +51,14 @@ void crgolf_state::get_pens( pen_t *pens )
bit1 = (data >> 7) & 0x01;
b = 0x4f * bit0 + 0xa8 * bit1;
- pens[offs] = rgb_t(r, g, b);
+ m_palette->set_pen_color(offs, r, g, b);
}
}
-
-
-/*************************************
- *
- * Video startup
- *
- *************************************/
-
-VIDEO_START_MEMBER(crgolf_state,crgolf)
+PALETTE_INIT_MEMBER(crgolf_state, mastrglf)
{
-}
-
+}
/*************************************
*
@@ -73,14 +66,11 @@ VIDEO_START_MEMBER(crgolf_state,crgolf)
*
*************************************/
-UINT32 crgolf_state::screen_update_crgolf(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
+UINT32 crgolf_state::screen_update_crgolf(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int flip = *m_screen_flip & 1;
offs_t offs;
- pen_t pens[NUM_PENS];
-
- get_pens(pens);
/* for each byte in the video RAM */
for (offs = 0; offs < VIDEORAM_SIZE / 3; offs++)
@@ -126,7 +116,7 @@ UINT32 crgolf_state::screen_update_crgolf(screen_device &screen, bitmap_rgb32 &b
if (*m_color_select)
color = color | 0x10;
- bitmap.pix32(y, x) = pens[color];
+ bitmap.pix16(y, x) = color;
/* next pixel */
data_a0 = data_a0 << 1;
@@ -146,20 +136,3 @@ UINT32 crgolf_state::screen_update_crgolf(screen_device &screen, bitmap_rgb32 &b
return 0;
}
-
-/*************************************
- *
- * Machine driver
- *
- *************************************/
-
-MACHINE_CONFIG_FRAGMENT( crgolf_video )
-
- MCFG_VIDEO_START_OVERRIDE(crgolf_state,crgolf)
- MCFG_SCREEN_ADD("screen", RASTER)
- MCFG_SCREEN_SIZE(256, 256)
- MCFG_SCREEN_VISIBLE_AREA(0, 255, 8, 247)
- MCFG_SCREEN_REFRESH_RATE(60)
- MCFG_SCREEN_VBLANK_TIME(ATTOSECONDS_IN_USEC(2500) /* not accurate */)
- MCFG_SCREEN_UPDATE_DRIVER(crgolf_state, screen_update_crgolf)
-MACHINE_CONFIG_END