Skip to content

Commit

Permalink
Spacing and version bump.
Browse files Browse the repository at this point in the history
  • Loading branch information
aaronsgiles committed May 5, 2008
1 parent ad5e3bb commit 692a5e4
Show file tree
Hide file tree
Showing 9 changed files with 61 additions and 64 deletions.
8 changes: 4 additions & 4 deletions src/emu/cpu/x86emit.h
Original file line number Diff line number Diff line change
Expand Up @@ -1705,7 +1705,7 @@ INLINE void emit_xchg_r8_r8(x86code **emitptr, UINT8 dreg, UINT8 sreg)
else if (sreg == REG_EAX)
emit_op_reg(emitptr, OP_NOP | (dreg & 7), OP_32BIT, dreg);
else
emit_op_modrm_reg(emitptr, OP_XCHG_Eb_Gb, OP_32BIT, dreg, sreg);
emit_op_modrm_reg(emitptr, OP_XCHG_Eb_Gb, OP_32BIT, dreg, sreg);
}


Expand Down Expand Up @@ -1742,7 +1742,7 @@ INLINE void emit_xchg_r16_r16(x86code **emitptr, UINT8 dreg, UINT8 sreg)
else if (sreg == REG_EAX)
emit_op_reg(emitptr, OP_NOP | (dreg & 7), OP_16BIT, dreg);
else
emit_op_modrm_reg(emitptr, OP_XCHG_Ev_Gv, OP_16BIT, dreg, sreg);
emit_op_modrm_reg(emitptr, OP_XCHG_Ev_Gv, OP_16BIT, dreg, sreg);
}


Expand Down Expand Up @@ -1783,7 +1783,7 @@ INLINE void emit_xchg_r32_r32(x86code **emitptr, UINT8 dreg, UINT8 sreg)
else if (sreg == REG_EAX)
emit_op_reg(emitptr, OP_NOP | (dreg & 7), OP_32BIT, dreg);
else
emit_op_modrm_reg(emitptr, OP_XCHG_Ev_Gv, OP_32BIT, dreg, sreg);
emit_op_modrm_reg(emitptr, OP_XCHG_Ev_Gv, OP_32BIT, dreg, sreg);
}


Expand Down Expand Up @@ -1838,7 +1838,7 @@ INLINE void emit_xchg_r64_r64(x86code **emitptr, UINT8 dreg, UINT8 sreg)
else if (sreg == REG_EAX)
emit_op_reg(emitptr, OP_NOP | (dreg & 7), OP_64BIT, dreg);
else
emit_op_modrm_reg(emitptr, OP_XCHG_Ev_Gv, OP_64BIT, dreg, sreg);
emit_op_modrm_reg(emitptr, OP_XCHG_Ev_Gv, OP_64BIT, dreg, sreg);
}

#endif
Expand Down
54 changes: 27 additions & 27 deletions src/emu/sound/ay8910.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,34 +66,34 @@ where used to calibrate channel mixing for the YM2149. This was done using
a least square approach using a fixed RL of 1K Ohm.
For the AY measurements cited in e.g. openmsx as "Hacker Kay" for a single
channel were taken. These were normalized to 0 ... 65535 and consequently
channel were taken. These were normalized to 0 ... 65535 and consequently
adapted to an offset of 0.2V and a VPP of 1.3V. These measurements are in
line e.g. with the formula used by pcmenc for the volume: vol(i) = exp(i/2-7.5).
The following is documentation from the code moved here and amended to reflect
the changes done:
Careful studies of the chip output prove that the chip counts up from 0
until the counter becomes greater or equal to the period. This is an
important difference when the program is rapidly changing the period to
modulate the sound. This is worthwhile noting, since the datasheets
until the counter becomes greater or equal to the period. This is an
important difference when the program is rapidly changing the period to
modulate the sound. This is worthwhile noting, since the datasheets
say, that the chip counts down.
Also, note that period = 0 is the same as period = 1. This is mentioned
in the YM2203 data sheets. However, this does NOT apply to the Envelope
period. In that case, period = 0 is half as period = 1.
Envelope shapes:
C AtAlH
0 0 x x \___
0 1 x x /___
1 0 0 0 \\\\
1 0 0 1 \___
1 0 1 0 \/\/
1 0 1 1 \```
1 1 0 0 ////
1 1 0 1 /```
1 1 1 0 /\/\
1 1 1 1 /___
C AtAlH
0 0 x x \___
0 1 x x /___
1 0 0 0 \\\\
1 0 0 1 \___
1 0 1 0 \/\/
1 0 1 1 \```
1 1 0 0 ////
1 1 0 1 /```
1 1 1 0 /\/\
1 1 1 1 /___
The envelope counter on the AY-3-8910 has 16 steps. On the YM2149 it
has twice the steps, happening twice as fast.
Expand Down Expand Up @@ -191,7 +191,7 @@ struct _ay8910_context

/*************************************
*
* Static
* Static
*
*************************************/

Expand Down Expand Up @@ -263,7 +263,7 @@ static const ay_ym_param ay8910_param =

/*************************************
*
* Inline
* Inline
*
*************************************/

Expand Down Expand Up @@ -380,7 +380,7 @@ INLINE UINT16 mix_3D(ay8910_context *psg)

/*************************************
*
* Static functions
* Static functions
*
*************************************/

Expand Down Expand Up @@ -547,7 +547,7 @@ static void ay8910_update(void *param,stream_sample_t **inputs, stream_sample_t
if (psg->holding == 0)
{
psg->count_env++;
if (psg->count_env >= ENVELOPE_PERIOD(psg) * psg->step )
if (psg->count_env >= ENVELOPE_PERIOD(psg) * psg->step )
{
psg->count_env = 0;
psg->env_step--;
Expand Down Expand Up @@ -620,9 +620,9 @@ static void build_mixer_table(ay8910_context *psg)
build_single_table(psg->intf->res_load[chan], psg->par_env, normalize, psg->env_table[chan], 0);
}
/*
* The previous implementation added all three channels up instead of averaging them.
* The factor of 3 will force the same levels if normalizing is used.
*/
* The previous implementation added all three channels up instead of averaging them.
* The factor of 3 will force the same levels if normalizing is used.
*/
build_3D_table(psg->intf->res_load[0], psg->par, psg->par_env, normalize, 3, psg->zero_is_off, psg->vol3d_table);
}

Expand Down Expand Up @@ -651,8 +651,8 @@ static void ay8910_statesave(ay8910_context *psg, int sndindex)

/*************************************
*
* Public functions
*
* Public functions
*
* used by e.g. YM2203, YM2210 ...
*
*************************************/
Expand Down Expand Up @@ -813,7 +813,7 @@ int ay8910_read_ym(void *chip)
/*************************************
*
* Sound Interface
*
*
*************************************/

static void *ay8910_start(int sndindex, int clock, const void *config)
Expand Down Expand Up @@ -948,7 +948,7 @@ void ymz294_get_info(void *token, UINT32 state, sndinfo *info)
/*************************************
*
* Read/Write Handlers
*
*
*************************************/

READ8_HANDLER( AY8910_read_port_0_r ) { return ay8910_read_ym(sndti_token(SOUND_AY8910, 0)); }
Expand Down
2 changes: 1 addition & 1 deletion src/mame/drivers/dynax.c
Original file line number Diff line number Diff line change
Expand Up @@ -3846,7 +3846,7 @@ static MACHINE_DRIVER_START( yarunara )
MDRV_SCREEN_MODIFY("main")
MDRV_SCREEN_FORMAT(BITMAP_FORMAT_INDEXED16)
MDRV_SCREEN_VISIBLE_AREA(0, 336-1, 8, 256-1-8-1)

/* devices */
MDRV_DEVICE_ADD("rtc", MSM6242)
MACHINE_DRIVER_END
Expand Down
3 changes: 0 additions & 3 deletions src/mame/drivers/flower.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@
fix sound
improve interrupts
sprite flipping is incorrect for one of the enemies so its probably wrong
screenshots look like the game has sprite zooming
http://emustatus.rainemu.com/games/flower.htm
FLOWER CHIP PLACEMENT
Expand Down
2 changes: 1 addition & 1 deletion src/mame/drivers/galaxian.c
Original file line number Diff line number Diff line change
Expand Up @@ -2068,7 +2068,7 @@ MACHINE_DRIVER_END

static MACHINE_DRIVER_START( anteater )
MDRV_IMPORT_FROM(scobra)

/* quiet down the sounds */
MDRV_SOUND_MODIFY("konami")
MDRV_SOUND_ROUTE(ALL_OUTPUTS, "mono", 0.1)
Expand Down
6 changes: 3 additions & 3 deletions src/mame/drivers/m90.c
Original file line number Diff line number Diff line change
Expand Up @@ -663,7 +663,7 @@ static MACHINE_DRIVER_START( m90 )
MDRV_CPU_VBLANK_INT("main", m90_interrupt)

MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */
/* audio CPU */
/* audio CPU */
MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
MDRV_CPU_IO_MAP(sound_readport,sound_writeport)
MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128) /* clocked by V1? (Vigilante) */
Expand Down Expand Up @@ -746,7 +746,7 @@ static MACHINE_DRIVER_START( bombrman )
MDRV_CPU_VBLANK_INT("main", m90_interrupt)

MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */
/* audio CPU */
/* audio CPU */
MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
MDRV_CPU_IO_MAP(sound_readport,sound_writeport)
MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128) /* clocked by V1? (Vigilante) */
Expand Down Expand Up @@ -792,7 +792,7 @@ static MACHINE_DRIVER_START( bbmanw )
MDRV_CPU_VBLANK_INT("main", m90_interrupt)

MDRV_CPU_ADD(Z80, XTAL_3_579545MHz) /* verified on pcb */
/* audio CPU */
/* audio CPU */
MDRV_CPU_PROGRAM_MAP(sound_readmem,sound_writemem)
MDRV_CPU_IO_MAP(bbmanw_sound_readport,bbmanw_sound_writeport)
MDRV_CPU_VBLANK_INT_HACK(nmi_line_pulse,128) /* clocked by V1? (Vigilante) */
Expand Down
2 changes: 1 addition & 1 deletion src/mame/machine/seicop.c
Original file line number Diff line number Diff line change
Expand Up @@ -1647,7 +1647,7 @@ WRITE16_HANDLER( denjinmk_mcu_w )

//case (0x05a/2): { /* brightness?? */ break; }
case (0x070/2): { denjinmk_setgfxbank(cop_mcu_ram[offset]); break; }

case (0x21c/2): { legionna_layer_disable = cop_mcu_ram[offset]; break; }

case (0x220/2): { legionna_scrollram16[0] = cop_mcu_ram[offset]; break; }
Expand Down
46 changes: 23 additions & 23 deletions src/mame/video/legionna.c
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,10 @@ VIDEO_START( cupsoc )
+1 xx...... ........ Priority? (1=high?)
+1 ..xxxxxx xxxxxxxx Tile number
+2 ----xxxx xxxxxxxx X coordinate (signed)
+3 b------- -------- more tile banking used by Denjin Makai
+3 b------- -------- more tile banking used by Denjin Makai
+3 ----xxxx xxxxxxxx Y coordinate (signed)
*************************************************************************/
Expand All @@ -251,25 +251,25 @@ static void draw_sprites(running_machine *machine, bitmap_t *bitmap,const rectan
sprite &= 0x3fff;
if(data & 0x0040) sprite |= 0x4000;//tile banking,used in Denjin Makai
if(spriteram16[offs+3] & 0x8000) sprite |= 0x8000;//tile banking?,used in Denjin Makai

y = spriteram16[offs+3];
x = spriteram16[offs+2];

/* heated barrel hardware seems to need 0x1ff with 0x100 sign bit for sprite warp,
this doesn't work on denjin makai as the visible area is larger */
this doesn't work on denjin makai as the visible area is larger */
/*
x&=0x1ff;
y&=0xfff;
if (x&0x100) x-=0x200;
if (y&0x800) y-=0x1000;
*/
x&=0x1ff;
y&=0xfff;
if (x&0x100) x-=0x200;
if (y&0x800) y-=0x1000;
*/

x&=0xfff;
y&=0xfff;

if (x&0x800) x-=0x1000;
if (y&0x800) y-=0x1000;
if (y&0x800) y-=0x1000;

color = (data &0x3f) + 0x40;
fx = (data &0x4000) >> 14;
Expand Down Expand Up @@ -377,29 +377,29 @@ VIDEO_UPDATE( godzilla )
tilemap_set_scrolly( foreground_layer, 0, legionna_scrollram16[5] );

fillbitmap(bitmap,0x0200,cliprect);

if (!(legionna_layer_disable&0x0001))
{
tilemap_draw(bitmap,cliprect,background_layer,0,0);
}
}

draw_sprites(screen->machine,bitmap,cliprect,2);

if (!(legionna_layer_disable&0x0002))
{
tilemap_draw(bitmap,cliprect,midground_layer,0,0);
}

draw_sprites(screen->machine,bitmap,cliprect,1);

if (!(legionna_layer_disable&0x0004))
{
tilemap_draw(bitmap,cliprect,foreground_layer,0,0);
tilemap_draw(bitmap,cliprect,foreground_layer,0,0);
}

draw_sprites(screen->machine,bitmap,cliprect,0);
draw_sprites(screen->machine,bitmap,cliprect,3);

if (!(legionna_layer_disable&0x0008))
{
tilemap_draw(bitmap,cliprect,text_layer,0,0);
Expand Down
2 changes: 1 addition & 1 deletion src/version.c
Original file line number Diff line number Diff line change
Expand Up @@ -9,4 +9,4 @@
***************************************************************************/

const char build_version[] = "0.124u5 ("__DATE__")";
const char build_version[] = "0.125 ("__DATE__")";

0 comments on commit 692a5e4

Please sign in to comment.