本文整理汇总了C++中popmessage函数的典型用法代码示例。如果您正苦于以下问题:C++ popmessage函数的具体用法?C++ popmessage怎么用?C++ popmessage使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。
在下文中一共展示了popmessage函数的20个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于我们的系统推荐出更棒的C++代码示例。
示例1: READ8_HANDLER
static READ8_HANDLER( no_key_r )
{
popmessage("CPU #%d PC %08x: keychip read %04x\n",cpu_getactivecpu(),activecpu_get_pc(),offset);
return 0;
}
开发者ID:kleopatra999,项目名称:historic-mame,代码行数:5,代码来源:namcos1.c
示例2: draw_sprites
static void draw_sprites(running_machine *machine, mame_bitmap *bitmap,const rectangle *cliprect,int y_offs)
{
int offs,chain_pos;
int x,y,curx,cury;
int priority=0;
UINT8 col,flipx,flipy,chain;
UINT16 code;
/* According to Raine, word in ioc_ram determines sprite/tile priority... */
priority = (gcpinbal_ioc_ram[0x68/2] & 0x8800) ? 0 : 1;
for (offs = spriteram_size/2-8;offs >= 0;offs -= 8)
{
code = ((spriteram16[offs+5])&0xff) + (((spriteram16[offs+6]) &0xff) << 8);
code &= 0x3fff;
if (!(spriteram16[offs+4] &0x80)) /* active sprite ? */
{
x = ((spriteram16[offs+0]) &0xff) + (((spriteram16[offs+1]) &0xff) << 8);
y = ((spriteram16[offs+2]) &0xff) + (((spriteram16[offs+3]) &0xff) << 8);
/* Treat coords as signed */
if (x & 0x8000) x -= 0x10000;
if (y & 0x8000) y -= 0x10000;
col = ((spriteram16[offs+7]) &0x0f) | 0x60;
chain = (spriteram16[offs+4]) &0x07;
flipy = (spriteram16[offs+4]) &0x10;
flipx = 0;
curx = x;
cury = y;
if (((spriteram16[offs+4]) &0x08) && flipy)
cury += (chain * 16);
for (chain_pos = chain;chain_pos >= 0;chain_pos--)
{
pdrawgfx(bitmap, machine->gfx[0],
code,
col,
flipx, flipy,
curx,cury,
cliprect,TRANSPARENCY_PEN,0,
priority ? 0xfc : 0xf0);
code++;
if ((spriteram16[offs+4]) &0x08) /* Y chain */
{
if (flipy) cury -= 16;
else cury += 16;
}
else /* X chain */
{
curx += 16;
}
}
}
}
#if 0
if (rotate)
{
char buf[80];
sprintf(buf,"sprite rotate offs %04x ?",rotate);
popmessage(buf);
}
#endif
}
开发者ID:broftkd,项目名称:historic-mame,代码行数:69,代码来源:gcpinbal.c
示例3: popmessage
void a2bus_zipdrivebase_device::device_reset()
{
popmessage("Zip Drive partition format unknown, contact MESSdev if you have the software or a drive dump!");
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:4,代码来源:a2zipdrive.c
示例4: sprintf
void excellent_spr_device::gcpinbal_draw_sprites( screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect, gfxdecode_device *gfxdecode, int y_offs, int priority )
{
UINT8 *spriteram = m_ram.get();
int offs, chain_pos;
int x, y, curx, cury;
// int priority = 0;
UINT8 col, flipx, flipy, chain;
UINT16 code;
for (offs = 0x1000 - 8; offs >= 0; offs -= 8)
{
code = ((spriteram[offs + 5]) & 0xff) + (((spriteram[offs + 6]) & 0xff) << 8);
code &= 0x3fff;
if (!(spriteram[offs + 4] &0x80)) /* active sprite ? */
{
x = ((spriteram[offs + 0]) & 0xff) + (((spriteram[offs + 1]) & 0xff) << 8);
y = ((spriteram[offs + 2]) & 0xff) + (((spriteram[offs + 3]) & 0xff) << 8);
/* Treat coords as signed */
if (x & 0x8000) x -= 0x10000;
if (y & 0x8000) y -= 0x10000;
col = ((spriteram[offs + 7]) & 0x0f) | 0x60;
chain = (spriteram[offs + 4]) & 0x07;
flipy = (spriteram[offs + 4]) & 0x10;
flipx = 0;
curx = x;
cury = y;
if (((spriteram[offs + 4]) & 0x08) && flipy)
cury += (chain * 16);
for (chain_pos = chain; chain_pos >= 0; chain_pos--)
{
gfxdecode->gfx(0)->prio_transpen(bitmap,cliprect,
code,
col,
flipx, flipy,
curx,cury,
screen.priority(),
priority ? 0xfc : 0xf0,0);
code++;
if ((spriteram[offs + 4]) & 0x08) /* Y chain */
{
if (flipy) cury -= 16;
else cury += 16;
}
else /* X chain */
{
curx += 16;
}
}
}
}
#if 0
if (rotate)
{
char buf[80];
sprintf(buf, "sprite rotate offs %04x ?", rotate);
popmessage(buf);
}
#endif
}
开发者ID:DragonMinded,项目名称:mame,代码行数:68,代码来源:excellent_spr.cpp
示例5: READ32_HANDLER
static READ32_HANDLER( a_bus_ctrl_r )
{
UINT32 *ROM = (UINT32 *)memory_region(REGION_USER1);
if(a_bus[0] & 0x00010000)//protection calculation is activated
{
if(offset == 3)
{
logerror("A-Bus control protection read at %06x with data = %08x\n",activecpu_get_pc(),a_bus[3]);
#ifdef MAME_DEBUG
popmessage("Prot read at %06x with data = %08x",activecpu_get_pc(),a_bus[3]);
#endif
switch(a_bus[3])
{
case 0x01230000://astrass,char data in test mode PC=60118f2
/*
TODO: the chars that are used are 8x8x4,but we need to convert them to
16x16x4 format.
[01] NULL
[02] NULL
[03] NULL
[04] NULL
[05] NULL
[06] NULL
[07] NULL
[08] NULL
[09] data 1
[10] data 2
[11] data 3
[12] data 4
[13] data 5
[14] data 6
[15] data 7
[16] data 8
2b5 = A (up-left)
2b6 = A (up-right)
2d1 = A (down-left)
2d0 = A (down-right)
2f2 = S (up-left)
2f3 = S (up-right)
311 = S (down-left)
310 = S (down-right)
2f4 = T (up-left)
2f5 = T (up-right)
2b7 = E (up-left) (not 2bc,maybe because the up-left corner of E is equal of B?)
2bd = E (up-right)
*/
internal_counter++;
if(char_offset == 0)
{
if(internal_counter > ((8*0x234)-1))
{
internal_counter = 0;
char_offset = 1;
}
return 0;
}
else
{
if(internal_counter > 8)
{
if(internal_counter > 15)
{
ctrl_index-=8;
internal_counter = 0;
}
ctrl_index++;
return ROM[ctrl_index];
}
else
{
ctrl_index++;
return ROM[ctrl_index];
}
}
case 0x10da0000://ffreveng, boot vectors at $6080000,test mode
ctrl_index++;
if(ctrl_index > 2)
return 0x234;
else
return vector_prot[ctrl_index-1];
case 0x10d70000://ffreveng, boot vectors at $6080000,attract mode
ctrl_index++;
return ROM[ctrl_index];
case 0x2c5b0000://sss
case 0x47f10000:
case 0xfcda0000:
case 0xb5e60000:
case 0x392c0000:
case 0x77c30000:
case 0x8a620000:
ctrl_index++;
return ROM[ctrl_index];
case 0x77770000: {//rsgun
UINT32 val =
((ctrl_index & 0xff)<<24) |
(((ctrl_index+1) & 0xff)<<16) |
//.........这里部分代码省略.........
开发者ID:cdenix,项目名称:ps3-mame-0125,代码行数:101,代码来源:stvprot.c
示例6: nbmj8900_gfxdraw
static void nbmj8900_gfxdraw(running_machine &machine)
{
nbmj8900_state *state = machine.driver_data<nbmj8900_state>();
unsigned char *GFX = state->memregion("gfx")->base();
int x, y;
int dx1, dx2, dy1, dy2;
int startx, starty;
int sizex, sizey;
int skipx, skipy;
int ctrx, ctry;
unsigned char color, color1, color2;
int gfxaddr;
nb1413m3_busyctr = 0;
startx = state->m_blitter_destx + state->m_blitter_sizex;
starty = state->m_blitter_desty + state->m_blitter_sizey;
if (state->m_blitter_direction_x)
{
sizex = state->m_blitter_sizex ^ 0xff;
skipx = 1;
}
else
{
sizex = state->m_blitter_sizex;
skipx = -1;
}
if (state->m_blitter_direction_y)
{
sizey = state->m_blitter_sizey ^ 0xff;
skipy = 1;
}
else
{
sizey = state->m_blitter_sizey;
skipy = -1;
}
gfxaddr = (state->m_gfxrom << 17) + (state->m_blitter_src_addr << 1);
for (y = starty, ctry = sizey; ctry >= 0; y += skipy, ctry--)
{
for (x = startx, ctrx = sizex; ctrx >= 0; x += skipx, ctrx--)
{
if ((gfxaddr > (machine.root_device().memregion("gfx")->bytes() - 1)))
{
#ifdef MAME_DEBUG
popmessage("GFXROM ADDRESS OVER!!");
#endif
gfxaddr &= (machine.root_device().memregion("gfx")->bytes() - 1);
}
color = GFX[gfxaddr++];
// for hanamomo
if ((nb1413m3_type == NB1413M3_HANAMOMO) && ((gfxaddr >= 0x20000) && (gfxaddr < 0x28000)))
{
color |= ((color & 0x0f) << 4);
}
dx1 = (2 * x + 0) & 0x1ff;
dx2 = (2 * x + 1) & 0x1ff;
if (state->m_gfxdraw_mode)
{
// 2 layer type
dy1 = y & 0xff;
dy2 = (y + state->m_scrolly) & 0xff;
}
else
{
// 1 layer type
dy1 = (y + state->m_scrolly) & 0xff;
dy2 = 0;
}
if (!state->m_flipscreen)
{
dx1 ^= 0x1ff;
dx2 ^= 0x1ff;
dy1 ^= 0xff;
dy2 ^= 0xff;
}
if (state->m_blitter_direction_x)
{
// flip
color1 = (color & 0x0f) >> 0;
color2 = (color & 0xf0) >> 4;
}
else
{
// normal
color1 = (color & 0xf0) >> 4;
color2 = (color & 0x0f) >> 0;
}
//.........这里部分代码省略.........
开发者ID:coinhelper,项目名称:jsmess,代码行数:101,代码来源:nbmj8900.c
示例7: pathstr
bool device_image_interface::load_internal(const char *path, bool is_create, int create_format, option_resolution *create_args)
{
UINT32 open_plan[4];
int i;
bool softload = FALSE;
m_from_swlist = FALSE;
// if the path contains no period, we are using softlists, so we won't create an image
astring pathstr(path);
bool filename_has_period = (pathstr.rchr(0, '.') != -1) ? TRUE : FALSE;
/* first unload the image */
unload();
/* clear any possible error messages */
clear_error();
/* we are now loading */
m_is_loading = TRUE;
/* record the filename */
m_err = set_image_filename(path);
if (m_err)
goto done;
/* Check if there's a software list defined for this device and use that if we're not creating an image */
if (!filename_has_period)
{
softload = load_software_part( device().machine().options(), this, path, &m_software_info_ptr, &m_software_part_ptr, &m_full_software_name );
// if we had launched from softlist with a specified part, e.g. "shortname:part"
// we would have recorded the wrong name, so record it again based on software_info
if (m_software_info_ptr && m_software_info_ptr->shortname)
m_err = set_image_filename(m_software_info_ptr->shortname);
m_from_swlist = TRUE;
}
if (is_create || filename_has_period)
{
/* determine open plan */
determine_open_plan(is_create, open_plan);
/* attempt to open the file in various ways */
for (i = 0; !m_file && open_plan[i]; i++)
{
/* open the file */
m_err = load_image_by_path(open_plan[i], path);
if (m_err && (m_err != IMAGE_ERROR_FILENOTFOUND))
goto done;
}
}
/* Copy some image information when we have been loaded through a software list */
if ( m_software_info_ptr )
{
m_longname = m_software_info_ptr->longname;
m_manufacturer = m_software_info_ptr->publisher;
m_year = m_software_info_ptr->year;
//m_playable = m_software_info_ptr->supported;
}
/* did we fail to find the file? */
if (!is_loaded() && !softload)
{
m_err = IMAGE_ERROR_FILENOTFOUND;
goto done;
}
/* call device load or create */
m_create_format = create_format;
m_create_args = create_args;
if (m_init_phase==FALSE) {
m_err = (image_error_t)finish_load();
if (m_err)
goto done;
}
/* success! */
done:
if (m_err!=0) {
if (!m_init_phase)
{
if (device().machine().phase() == MACHINE_PHASE_RUNNING)
popmessage("Error: Unable to %s image '%s': %s\n", is_create ? "create" : "load", path, error());
else
mame_printf_error("Error: Unable to %s image '%s': %s", is_create ? "create" : "load", path, error());
}
clear();
}
else {
/* do we need to reset the CPU? only schedule it if load/create is successful */
if (device().machine().time() > attotime::zero && is_reset_on_load())
device().machine().schedule_hard_reset();
else
{
if (!m_init_phase)
{
if (device().machine().phase() == MACHINE_PHASE_RUNNING)
//.........这里部分代码省略.........
开发者ID:Luke-Nukem,项目名称:mame-144-vector_mod,代码行数:101,代码来源:diimage.c
示例8: popmessage
UINT32 timetrv_state::screen_update_timetrv(screen_device &screen, bitmap_rgb32 &bitmap, const rectangle &cliprect)
{
popmessage("%s%s",reinterpret_cast<char *>(m_led_vram_lo.target()),reinterpret_cast<char *>(m_led_vram_hi.target()));
return 0;
}
开发者ID:coinhelper,项目名称:jsmess,代码行数:5,代码来源:timetrv.c
示例9: show_out
static void show_out(void)
{
#ifdef MAME_DEBUG
popmessage("%02x %02x %02x", out[0], out[1], out[2]);
#endif
}
开发者ID:AltimorTASDK,项目名称:shmupmametgm,代码行数:6,代码来源:igs009.c
示例10: popmessage
UINT32 destiny_state::screen_update_destiny(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
popmessage("%s",m_led_array);
return 0;
}
开发者ID:clobber,项目名称:UME,代码行数:5,代码来源:deshoros.c
示例11: WRITE8_HANDLER
static WRITE8_HANDLER( no_key_w )
{
popmessage("CPU #%d PC %08x: keychip write %04x=%02x\n",cpu_getactivecpu(),activecpu_get_pc(),offset,data);
}
开发者ID:kleopatra999,项目名称:historic-mame,代码行数:4,代码来源:namcos1.c
示例12: machine
uint32_t undrfire_state::screen_update_cbombers(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
address_space &space = machine().dummy_space();
uint8_t layer[5];
uint8_t scclayer[3];
uint16_t priority;
#ifdef MAME_DEBUG
if (machine().input().code_pressed_once (KEYCODE_X))
{
m_dislayer[5] ^= 1;
popmessage("scc text: %01x",m_dislayer[5]);
}
if (machine().input().code_pressed_once (KEYCODE_C))
{
m_dislayer[0] ^= 1;
popmessage("bg0: %01x",m_dislayer[0]);
}
if (machine().input().code_pressed_once (KEYCODE_V))
{
m_dislayer[1] ^= 1;
popmessage("bg1: %01x",m_dislayer[1]);
}
if (machine().input().code_pressed_once (KEYCODE_B))
{
m_dislayer[2] ^= 1;
popmessage("bg2: %01x",m_dislayer[2]);
}
if (machine().input().code_pressed_once (KEYCODE_N))
{
m_dislayer[3] ^= 1;
popmessage("bg3: %01x",m_dislayer[3]);
}
if (machine().input().code_pressed_once (KEYCODE_M))
{
m_dislayer[4] ^= 1;
popmessage("sprites: %01x",m_dislayer[4]);
}
#endif
m_tc0100scn->tilemap_update();
m_tc0480scp->tilemap_update();
priority = m_tc0480scp->get_bg_priority();
layer[0] = (priority & 0xf000) >> 12; /* tells us which bg layer is bottom */
layer[1] = (priority & 0x0f00) >> 8;
layer[2] = (priority & 0x00f0) >> 4;
layer[3] = (priority & 0x000f) >> 0; /* tells us which is top */
layer[4] = 4; /* text layer always over bg layers */
scclayer[0] = m_tc0100scn->bottomlayer();
scclayer[1] = scclayer[0] ^ 1;
scclayer[2] = 2;
screen.priority().fill(0, cliprect);
bitmap.fill(0, cliprect); /* wrong color? */
/* The "SCC" chip seems to be a 6bpp TC0100SCN. It has a
bottom layer usually full of bright garish colors that
vaguely mimic the structure of the layers on top. Seems
pointless - it's always hidden by other layers. Does it
serve some blending pupose ? */
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, scclayer[0], TILEMAP_DRAW_OPAQUE, 0);
m_tc0100scn->tilemap_draw(screen, bitmap, cliprect, scclayer[1], 0, 0);
#ifdef MAME_DEBUG
if (m_dislayer[layer[0]]==0)
#endif
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[0], 0, 1);
#ifdef MAME_DEBUG
if (m_dislayer[layer[1]]==0)
#endif
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[1], 0, 2);
#ifdef MAME_DEBUG
if (m_dislayer[layer[2]]==0)
#endif
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[2], 0, 4);
#ifdef MAME_DEBUG
if (m_dislayer[layer[3]]==0)
#endif
m_tc0480scp->tilemap_draw(screen, bitmap, cliprect, layer[3], 0, 8);
#ifdef MAME_DEBUG
if (m_dislayer[4]==0)
#endif
/* Sprites have variable priority (we kludge this on road levels) */
{
if ((m_tc0480scp->pri_reg_r(space, 0) & 0x3) == 3) /* on road levels kludge sprites up 1 priority */
{
static const int primasks[4] = {0xfff0, 0xff00, 0x0, 0x0};
//.........这里部分代码省略.........
开发者ID:MASHinfo,项目名称:mame,代码行数:101,代码来源:undrfire.cpp
示例13: WRITE16_DEVICE_HANDLER
static WRITE16_DEVICE_HANDLER( sslam_snd_w )
{
if (ACCESSING_BITS_0_7)
{
logerror("%s Writing %04x to Sound CPU\n",cpuexec_describe_context(device->machine),data);
if (data >= 0x40) {
if (data == 0xfe) {
/* This should reset the sound MCU and stop audio playback, but here, it */
/* chops the first coin insert. So let's only stop any playing melodies. */
sslam_play(device, 1, (0x80 | 0x40)); /* Stop playing the melody */
}
else {
logerror("Unknown command (%02x) sent to the Sound controller\n",data);
popmessage("Unknown command (%02x) sent to the Sound controller",data);
}
}
else if (data == 0) {
sslam_bar = 0; /* Complete any current bars then stop sequencing */
sslam_melody = 0;
}
else {
sslam_sound = sslam_snd_cmd[data];
if (sslam_sound == 0xff) {
popmessage("Unmapped sound command %02x on Bank %02x",data,sslam_snd_bank);
}
else if (sslam_sound >= 0x70) {
/* These vocals are in bank 1, but a bug in the actual MCU doesn't set the bank */
// if (sslam_snd_bank != 1)
// okim6295_set_bank_base(device, (1 * 0x40000));
// sslam_snd_bank = 1;
sslam_play(device, 0, sslam_sound);
}
else if (sslam_sound >= 0x69) {
if (sslam_snd_bank != 2)
okim6295_set_bank_base(device, (2 * 0x40000));
sslam_snd_bank = 2;
switch (sslam_sound)
{
case 0x69: sslam_melody = 5; break;
case 0x6b: sslam_melody = 6; break;
case 0x6c: sslam_melody = 7; break;
default: sslam_melody = 0; sslam_bar = 0; break; /* Invalid */
}
sslam_play(device, sslam_melody, sslam_sound);
}
else if (sslam_sound >= 0x65) {
if (sslam_snd_bank != 1)
okim6295_set_bank_base(device, (1 * 0x40000));
sslam_snd_bank = 1;
sslam_melody = 4;
sslam_play(device, sslam_melody, sslam_sound);
}
else if (sslam_sound >= 0x60) {
if (sslam_snd_bank != 0)
okim6295_set_bank_base(device, (0 * 0x40000));
sslam_snd_bank = 0;
switch (sslam_sound)
{
case 0x60: sslam_melody = 1; break;
case 0x63: sslam_melody = 2; break;
case 0x64: sslam_melody = 3; break;
default: sslam_melody = 0; sslam_bar = 0; break; /* Invalid */
}
sslam_play(device, sslam_melody, sslam_sound);
}
else {
sslam_play(device, 0, sslam_sound);
}
}
}
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:72,代码来源:sslam.c
示例14: draw_sprites
/* gcpinbal.c modified */
static void draw_sprites( running_machine &machine, bitmap_t *bitmap, const rectangle *cliprect, int y_offs )
{
aquarium_state *state = machine.driver_data<aquarium_state>();
int offs, chain_pos;
int x, y, curx, cury;
UINT8 col, flipx, flipy, chain;
UINT16 code;
for (offs = 0; offs < state->m_spriteram_size / 2; offs += 8)
{
code = ((state->m_spriteram[offs + 5]) & 0xff) + (((state->m_spriteram[offs + 6]) & 0xff) << 8);
code &= 0x3fff;
if (!(state->m_spriteram[offs + 4] &0x80)) /* active sprite ? */
{
x = ((state->m_spriteram[offs + 0]) &0xff) + (((state->m_spriteram[offs + 1]) & 0xff) << 8);
y = ((state->m_spriteram[offs + 2]) &0xff) + (((state->m_spriteram[offs + 3]) & 0xff) << 8);
/* Treat coords as signed */
if (x & 0x8000) x -= 0x10000;
if (y & 0x8000) y -= 0x10000;
col = ((state->m_spriteram[offs + 7]) & 0x0f);
chain = (state->m_spriteram[offs + 4]) & 0x07;
flipy = (state->m_spriteram[offs + 4]) & 0x10;
flipx = (state->m_spriteram[offs + 4]) & 0x20;
curx = x;
cury = y;
if (((state->m_spriteram[offs + 4]) & 0x08) && flipy)
cury += (chain * 16);
if (!(((state->m_spriteram[offs + 4]) & 0x08)) && flipx)
curx += (chain * 16);
for (chain_pos = chain; chain_pos >= 0; chain_pos--)
{
drawgfx_transpen(bitmap, cliprect,machine.gfx[0],
code,
col,
flipx, flipy,
curx,cury,0);
/* wrap around y */
drawgfx_transpen(bitmap, cliprect,machine.gfx[0],
code,
col,
flipx, flipy,
curx,cury + 256,0);
code++;
if ((state->m_spriteram[offs + 4]) &0x08) /* Y chain */
{
if (flipy)
cury -= 16;
else
cury += 16;
}
else /* X chain */
{
if (flipx)
curx -= 16;
else
curx += 16;
}
}
}
}
#if 0
if (rotate)
{
char buf[80];
sprintf(buf, "sprite rotate offs %04x ?", rotate);
popmessage(buf);
}
#endif
}
开发者ID:rogerjowett,项目名称:ClientServerMAME,代码行数:81,代码来源:aquarium.c
示例15: WRITE8_MEMBER
MACHINE_CONFIG_END
WRITE8_MEMBER(maygay1b_state::m1ab_no_oki_w)
{
popmessage("write to OKI, but no OKI rom");
}
开发者ID:gregdickhudl,项目名称:mame,代码行数:6,代码来源:maygay1b.cpp
示例16: pdrawgfx_transpen
void gcpinbal_state::draw_sprites( bitmap_ind16 &bitmap, const rectangle &cliprect, int y_offs )
{
UINT16 *spriteram = m_spriteram;
int offs, chain_pos;
int x, y, curx, cury;
int priority = 0;
UINT8 col, flipx, flipy, chain;
UINT16 code;
/* According to Raine, word in ioc_ram determines sprite/tile priority... */
priority = (m_ioc_ram[0x68 / 2] & 0x8800) ? 0 : 1;
for (offs = m_spriteram.bytes() / 2 - 8; offs >= 0; offs -= 8)
{
code = ((spriteram[offs + 5]) & 0xff) + (((spriteram[offs + 6]) & 0xff) << 8);
code &= 0x3fff;
if (!(spriteram[offs + 4] &0x80)) /* active sprite ? */
{
x = ((spriteram[offs + 0]) & 0xff) + (((spriteram[offs + 1]) & 0xff) << 8);
y = ((spriteram[offs + 2]) & 0xff) + (((spriteram[offs + 3]) & 0xff) << 8);
/* Treat coords as signed */
if (x & 0x8000) x -= 0x10000;
if (y & 0x8000) y -= 0x10000;
col = ((spriteram[offs + 7]) & 0x0f) | 0x60;
chain = (spriteram[offs + 4]) & 0x07;
flipy = (spriteram[offs + 4]) & 0x10;
flipx = 0;
curx = x;
cury = y;
if (((spriteram[offs + 4]) & 0x08) && flipy)
cury += (chain * 16);
for (chain_pos = chain; chain_pos >= 0; chain_pos--)
{
pdrawgfx_transpen(bitmap, cliprect,machine().gfx[0],
code,
col,
flipx, flipy,
curx,cury,
machine().priority_bitmap,
priority ? 0xfc : 0xf0,0);
code++;
if ((spriteram[offs + 4]) & 0x08) /* Y chain */
{
if (flipy) cury -= 16;
else cury += 16;
}
else /* X chain */
{
curx += 16;
}
}
}
}
#if 0
if (rotate)
{
char buf[80];
sprintf(buf, "sprite rotate offs %04x ?", rotate);
popmessage(buf);
}
#endif
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:70,代码来源:gcpinbal.c
示例17: DRIVER_INIT
/* from machine/wrally.c */
DRIVER_INIT( wrally );
WRITE16_HANDLER( OKIM6295_bankswitch_w );
WRITE16_HANDLER( wrally_coin_counter_w );
WRITE16_HANDLER( wrally_coin_lockout_w );
static ADDRESS_MAP_START( wrally_readmem, ADDRESS_SPACE_PROGRAM, 16 )
AM_RANGE(0x000000, 0x0fffff) AM_READ(MRA16_ROM) /* ROM */
AM_RANGE(0x100000, 0x103fff) AM_READ(MRA16_RAM) /* encrypted Video RAM */
AM_RANGE(0x200000, 0x203fff) AM_READ(MRA16_RAM) /* Palette */
AM_RANGE(0x440000, 0x440fff) AM_READ(MRA16_RAM) /* Sprite RAM */
AM_RANGE(0x700000, 0x700001) AM_READ(input_port_0_word_r)/* DSW #1 & #2 */
AM_RANGE(0x700002, 0x700003) AM_READ(input_port_1_word_r)/* INPUT 1P & 2P, COINSW, STARTSW */
AM_RANGE(0x700004, 0x700005) AM_READ(input_port_2_word_r)/* Wheel */
AM_RANGE(0x700008, 0x700009) AM_READ(input_port_3_word_r)/* TESTSW & SERVICESW */
AM_RANGE(0x70000e, 0x70000f) AM_READ(OKIM6295_status_0_lsb_r)/* OKI6295 status register */
AM_RANGE(0xfe0000, 0xfeffff) AM_READ(MRA16_RAM) /* Work RAM (partially shared with DS5002FP) */
ADDRESS_MAP_END
static WRITE16_HANDLER( unknown_w )
{
popmessage("write %04x to %04x", data, offset*2 + 0x6a);
}
开发者ID:broftkd,项目名称:mess-cvs,代码行数:25,代码来源:wrally.c
示例18: popmessage
UINT32 gcpinbal_state::screen_update_gcpinbal(screen_device &screen, bitmap_ind16 &bitmap, const rectangle &cliprect)
{
int i;
UINT16 tile_sets = 0;
UINT8 layer[3];
#ifdef MAME_DEBUG
if (machine().input().code_pressed_once(KEYCODE_V))
{
m_dislayer[0] ^= 1;
popmessage("bg0: %01x", m_dislayer[0]);
}
if (machine().input().code_pressed_once(KEYCODE_B))
{
m_dislayer[1] ^= 1;
popmessage("bg1: %01x", m_dislayer[1]);
}
if (machine().input().code_pressed_once(KEYCODE_N))
{
m_dislayer[2] ^= 1;
popmessage("fg: %01x", m_dislayer[2]);
}
#endif
m_scrollx[0] = m_ioc_ram[0x14 / 2];
m_scrolly[0] = m_ioc_ram[0x16 / 2];
m_scrollx[1] = m_ioc_ram[0x18 / 2];
m_scrolly[1] = m_ioc_ram[0x1a / 2];
m_scrollx[2] = m_ioc_ram[0x1c / 2];
m_scrolly[2] = m_ioc_ram[0x1e / 2];
tile_sets = m_ioc_ram[0x88 / 2];
m_bg0_gfxset = (tile_sets & 0x400) ? 0x1000 : 0;
m_bg1_gfxset = (tile_sets & 0x800) ? 0x1000 : 0;
for (i = 0; i < 3; i++)
{
m_tilemap[i]->set_scrollx(0, m_scrollx[i]);
m_tilemap[i]->set_scrolly(0, m_scrolly[i]);
}
machine().priority_bitmap.fill(0, cliprect);
bitmap.fill(0, cliprect);
layer[0] = 0;
layer[1] = 1;
layer[2] = 2;
#ifdef MAME_DEBUG
if (m_dislayer[layer[0]] == 0)
#endif
m_tilemap[layer[0]]->draw(bitmap, cliprect, TILEMAP_DRAW_OPAQUE, 1);
#ifdef MAME_DEBUG
if (m_dislayer[layer[1]] == 0)
#endif
m_tilemap[layer[1]]->draw(bitmap, cliprect, 0, 2);
#ifdef MAME_DEBUG
if (m_dislayer[layer[2]] == 0)
#endif
m_tilemap[layer[2]]->draw(bitmap, cliprect, 0, 4);
draw_sprites(bitmap, cliprect, 16);
#if 0
{
// char buf[80];
sprintf(buf,"bg0_gfx: %04x bg1_gfx: %04x ", m_bg0_gfxset, m_bg1_gfxset);
popmessage(buf);
}
#endif
return 0;
}
开发者ID:Ilgrim,项目名称:MAMEHub,代码行数:79,代码来源:gcpinbal.c
示例19: show_out
static void show_out(cabaret_state *state)
{
#ifdef MAME_DEBUG
popmessage("%02x %02x %02x", state->m_out[0], state->m_out[1], state->m_out[2]);
#endif
}
开发者ID:cdenix,项目名称:psmame,代码行数:6,代码来源:cabaret.c
示例20: draw_sprites
static void draw_sprites(running_machine *machine, bitmap_t *bitmap, const rectangle *cliprect )
{
int i, offs;
for (offs = spriteram_size - 0x20;offs >= 0;offs -= 0x20)
{
i = 0;
while (i < 0x20 && spriteram[offs + i] != 0)
i += 4;
while (i > 0)
{
i -= 4;
if (spriteram[offs + i] & 0x80)
{
int color = spriteram[offs + i + 2] & 0x0f;
int sx = spriteram[offs + i + 3];
int sy = offs / 4 + (spriteram[offs + i] & 0x07);
switch ((spriteram[offs + i] & 0x18) >> 3)
{
case 3: /* 24x24 */
{
int code = ((spriteram[offs + i + 1] & 0xf0) >> 4) + ((gfxbank & 1) << 4);
drawgfx_transpen(bitmap,cliprect,machine->gfx[3],
code,
color,
0,0,
sx,sy - 16,0);
/* wraparound */
drawgfx_transpen(bitmap,cliprect,machine->gfx[3],
code,
color,
0,0,
sx - 256,sy - 16,0);
break;
}
case 2: /* 16x16 */
if (spriteram[offs + i] & 0x20) /* zero hour spaceships */
{
int code = ((spriteram[offs + i + 1] & 0xf8) >> 3) + ((gfxbank & 1) << 5);
int bank = (spriteram[offs + i + 1] & 0x02) >> 1;
drawgfx_transpen(bitmap,cliprect,machine->gfx[4+bank],
code,
color,
0,0,
sx,sy - 16,0);
}
else
{
int code = ((spriteram[offs + i + 1] & 0xf0) >> 4) + ((gfxbank & 1) << 4);
drawgfx_transpen(bitmap,cliprect,machine->gfx[2],
code,
color,
0,0,
sx,sy - 16,0);
}
break;
case 1: /* 8x8 */
drawgfx_transpen(bitmap,cliprect,machine->gfx[1],
spriteram[offs + i + 1],// + 4 * (spriteram[offs + i + 2] & 0x10),
color,
0,0,
sx,sy - 16,0);
break;
case 0:
popmessage("unknown sprite size 0");
break;
}
}
开发者ID:Paulodx,项目名称:sdl-mame-wii,代码行数:78,代码来源:redclash.c
注:本文中的popmessage函数示例由纯净天空整理自Github/MSDocs等源码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。 |
请发表评论