mirror of
https://github.com/holub/mame
synced 2025-04-25 17:56:43 +03:00
small PALETTE_INIT cleanup (nw)
This commit is contained in:
parent
ed28212ed1
commit
a06e29cadb
@ -78,9 +78,6 @@ INPUT_PORTS_EXTERN(mc6847_artifacting);
|
||||
// MC6847 CORE
|
||||
//**************************************************************************
|
||||
|
||||
PALETTE_INIT( mc6847 );
|
||||
PALETTE_INIT( mc6847_bw );
|
||||
|
||||
// base class so that the GIME emulation can access mc6847 stuff
|
||||
class mc6847_friend_device : public device_t
|
||||
{
|
||||
|
@ -3581,15 +3581,6 @@ static const scsp_interface scsp2_interface =
|
||||
};
|
||||
|
||||
|
||||
PALETTE_INIT( RRRRR_GGGGG_BBBBB_double )
|
||||
{
|
||||
int i;
|
||||
|
||||
for (i = 0; i < 0x10000; i++)
|
||||
palette_set_color(machine, i, MAKE_RGB( pal5bit((i >> 10)&0x1f), pal5bit(((i >> 5))&0x1f), pal5bit((i >> 0)&0x1f)));
|
||||
}
|
||||
|
||||
|
||||
#define MAIN_CLOCK XTAL_28_63636MHz
|
||||
|
||||
static MACHINE_CONFIG_START( coolridr, coolridr_state )
|
||||
|
@ -80,7 +80,6 @@ Bprom dump by f205v
|
||||
#include "emu.h"
|
||||
#include "cpu/z80/z80.h"
|
||||
#include "sound/ay8910.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
class stuntair_state : public driver_device
|
||||
{
|
||||
@ -128,6 +127,7 @@ public:
|
||||
virtual void video_start();
|
||||
void draw_sprites(bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
UINT32 screen_update_stuntair(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect);
|
||||
DECLARE_PALETTE_INIT(stuntair);
|
||||
};
|
||||
|
||||
|
||||
@ -138,10 +138,10 @@ public:
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
PALETTE_INIT( stuntair )
|
||||
PALETTE_INIT_MEMBER(stuntair_state, stuntair)
|
||||
{
|
||||
/* need resistor weights etc. */
|
||||
const UINT8 *color_prom = machine.root_device().memregion("proms")->base();
|
||||
const UINT8 *color_prom = machine().root_device().memregion("proms")->base();
|
||||
|
||||
for (int i = 0; i < 0x100; i++)
|
||||
{
|
||||
@ -151,12 +151,12 @@ PALETTE_INIT( stuntair )
|
||||
int g = (data&0x38)>>3;
|
||||
int r = (data&0x07)>>0;
|
||||
|
||||
palette_set_color(machine,i,MAKE_RGB(r<<5,g<<5,b<<6));
|
||||
palette_set_color(machine(),i,MAKE_RGB(r<<5,g<<5,b<<6));
|
||||
}
|
||||
|
||||
// just set the FG layer to black and white
|
||||
palette_set_color(machine,0x100,MAKE_RGB(0x00,0x00,0x00));
|
||||
palette_set_color(machine,0x101,MAKE_RGB(0xff,0xff,0xff));
|
||||
palette_set_color(machine(),0x100,MAKE_RGB(0x00,0x00,0x00));
|
||||
palette_set_color(machine(),0x101,MAKE_RGB(0xff,0xff,0xff));
|
||||
}
|
||||
|
||||
|
||||
@ -541,7 +541,7 @@ static MACHINE_CONFIG_START( stuntair, stuntair_state )
|
||||
MCFG_GFXDECODE(stuntair)
|
||||
MCFG_PALETTE_LENGTH(0x100+2)
|
||||
|
||||
MCFG_PALETTE_INIT(stuntair)
|
||||
MCFG_PALETTE_INIT_OVERRIDE(stuntair_state, stuntair)
|
||||
|
||||
/* sound hardware */
|
||||
MCFG_SPEAKER_STANDARD_MONO("mono") // stereo?
|
||||
|
@ -197,12 +197,6 @@ static const res_net_info radarscp_grid_net_info =
|
||||
}
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
PALETTE_INIT
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
PALETTE_INIT_MEMBER(dkong_state,dkong2b)
|
||||
{
|
||||
const UINT8 *color_prom = memregion("proms")->base();
|
||||
|
@ -38,12 +38,6 @@ static const res_net_info popper_net_info =
|
||||
}
|
||||
};
|
||||
|
||||
/***************************************************************************
|
||||
*
|
||||
* PALETTE_INIT
|
||||
*
|
||||
***************************************************************************/
|
||||
|
||||
void popper_state::palette_init()
|
||||
{
|
||||
const UINT8 *color_prom = memregion("proms")->base();
|
||||
|
@ -612,9 +612,6 @@ static const rs232_port_interface rs232_intf =
|
||||
// MACHINE INITIALIZATION
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// PALETTE_INIT( bw2 )
|
||||
//-------------------------------------------------
|
||||
|
||||
void bw2_state::palette_init()
|
||||
{
|
||||
|
@ -772,10 +772,6 @@ static const rs232_port_interface rs232_intf =
|
||||
// VIDEO
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// PALETTE_INIT( hx20 )
|
||||
//-------------------------------------------------
|
||||
|
||||
void hx20_state::palette_init()
|
||||
{
|
||||
palette_set_color_rgb(machine(), 0, 0xa5, 0xad, 0xa5);
|
||||
|
@ -16,7 +16,6 @@
|
||||
#include "sound/dac.h"
|
||||
#include "debugger.h"
|
||||
#include "rendlay.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
#define MC68328_TAG "dragonball"
|
||||
|
||||
@ -57,6 +56,7 @@ public:
|
||||
DECLARE_READ16_MEMBER(palm_spim_in);
|
||||
DECLARE_WRITE8_MEMBER(palm_dac_transition);
|
||||
DECLARE_WRITE_LINE_MEMBER(palm_spim_exchange);
|
||||
DECLARE_PALETTE_INIT(palm);
|
||||
|
||||
required_ioport m_io_penx;
|
||||
required_ioport m_io_peny;
|
||||
@ -153,6 +153,13 @@ void palm_state::machine_reset()
|
||||
m_maincpu->reset();
|
||||
}
|
||||
|
||||
/* THIS IS PRETTY MUCH TOTALLY WRONG AND DOESN'T REFLECT THE MC68328'S INTERNAL FUNCTIONALITY AT ALL! */
|
||||
PALETTE_INIT_MEMBER(palm_state, palm)
|
||||
{
|
||||
palette_set_color_rgb(machine(), 0, 0x7b, 0x8c, 0x5a);
|
||||
palette_set_color_rgb(machine(), 1, 0x00, 0x00, 0x00);
|
||||
}
|
||||
|
||||
|
||||
/***************************************************************************
|
||||
ADDRESS MAPS
|
||||
@ -178,12 +185,6 @@ WRITE8_MEMBER(palm_state::palm_dac_transition)
|
||||
MACHINE DRIVERS
|
||||
***************************************************************************/
|
||||
|
||||
/* THIS IS PRETTY MUCH TOTALLY WRONG AND DOESN'T REFLECT THE MC68328'S INTERNAL FUNCTIONALITY AT ALL! */
|
||||
PALETTE_INIT( palm )
|
||||
{
|
||||
palette_set_color_rgb(machine, 0, 0x7b, 0x8c, 0x5a);
|
||||
palette_set_color_rgb(machine, 1, 0x00, 0x00, 0x00);
|
||||
}
|
||||
|
||||
static MC68328_INTERFACE(palm_dragonball_iface)
|
||||
{
|
||||
@ -234,7 +235,7 @@ static MACHINE_CONFIG_START( palm, palm_state )
|
||||
MCFG_SCREEN_VISIBLE_AREA( 0, 159, 0, 219 )
|
||||
MCFG_SCREEN_UPDATE_DEVICE(MC68328_TAG, mc68328_device, screen_update)
|
||||
MCFG_PALETTE_LENGTH( 2 )
|
||||
MCFG_PALETTE_INIT( palm )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(palm_state, palm)
|
||||
MCFG_DEFAULT_LAYOUT(layout_lcd)
|
||||
|
||||
/* audio hardware */
|
||||
|
@ -668,10 +668,6 @@ INPUT_PORTS_END
|
||||
// VIDEO
|
||||
//**************************************************************************
|
||||
|
||||
//-------------------------------------------------
|
||||
// PALETTE_INIT( portfolio )
|
||||
//-------------------------------------------------
|
||||
|
||||
void portfolio_state::palette_init()
|
||||
{
|
||||
palette_set_color(machine(), 0, MAKE_RGB(138, 146, 148));
|
||||
|
@ -682,10 +682,6 @@ INPUT_PORTS_END
|
||||
VIDEO
|
||||
***************************************************************************/
|
||||
|
||||
/*-------------------------------------------------
|
||||
PALETTE_INIT( px8 )
|
||||
-------------------------------------------------*/
|
||||
|
||||
void px8_state::palette_init()
|
||||
{
|
||||
palette_set_color_rgb(machine(), 0, 0xa5, 0xad, 0xa5);
|
||||
|
@ -76,7 +76,6 @@
|
||||
#include "imagedev/serial.h"
|
||||
#include "formats/basicdsk.h"
|
||||
#include "machine/ram.h"
|
||||
#include "drivlgcy.h"
|
||||
|
||||
|
||||
/**************************** common *******************************/
|
||||
@ -639,7 +638,7 @@ static MACHINE_CONFIG_START( to7, thomson_state )
|
||||
MCFG_SCREEN_VBLANK_DRIVER( thomson_state, thom_vblank )
|
||||
|
||||
MCFG_PALETTE_LENGTH ( 4097 ) /* 12-bit color + transparency */
|
||||
MCFG_PALETTE_INIT ( thom )
|
||||
MCFG_PALETTE_INIT_OVERRIDE(thomson_state, thom)
|
||||
MCFG_VIDEO_START_OVERRIDE( thomson_state, thom )
|
||||
MCFG_DEFAULT_LAYOUT( layout_thomson )
|
||||
|
||||
|
@ -303,6 +303,7 @@ public:
|
||||
DECLARE_READ8_MEMBER( to9_floppy_r );
|
||||
DECLARE_WRITE8_MEMBER( to9_floppy_w );
|
||||
void thomson_index_callback(device_t *device, int state);
|
||||
DECLARE_PALETTE_INIT(thom);
|
||||
|
||||
protected:
|
||||
required_device<cpu_device> m_maincpu;
|
||||
@ -603,8 +604,6 @@ extern const mc6846_interface to9p_timer;
|
||||
|
||||
/***************************** commons *****************************/
|
||||
|
||||
extern PALETTE_INIT ( thom );
|
||||
|
||||
|
||||
/* video modes */
|
||||
#define THOM_VMODE_TO770 0
|
||||
|
@ -1081,7 +1081,7 @@ VIDEO_START_MEMBER( thomson_state, thom )
|
||||
|
||||
|
||||
|
||||
PALETTE_INIT ( thom )
|
||||
PALETTE_INIT_MEMBER(thomson_state, thom)
|
||||
{
|
||||
double gamma = 0.6f;
|
||||
unsigned i;
|
||||
@ -1094,7 +1094,7 @@ PALETTE_INIT ( thom )
|
||||
UINT8 g = 255. * pow( ((i>> 4) & 15) / 15., gamma );
|
||||
UINT8 b = 255. * pow( ((i >> 8) & 15) / 15., gamma );
|
||||
/* UINT8 alpha = i & 0x1000 ? 0 : 255; TODO: transparency */
|
||||
palette_set_color_rgb(machine, i, r, g, b );
|
||||
palette_set_color_rgb(machine(), i, r, g, b );
|
||||
}
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user