mirror of
https://github.com/holub/mame
synced 2025-05-23 14:19:01 +03:00
Hi mamedev,
More deprecat.h cleanup in the core, notably changing the apis for poly_alloc. I also made cpu_get_index_slow fatalerror on failure since no one is checking the return value. deprecat.h -= 14, Machine -= ~55 ~aa
This commit is contained in:
parent
5630547540
commit
4f266b6da4
@ -1,7 +1,6 @@
|
||||
/* LSI Logic LSI53C810A PCI to SCSI I/O Processor */
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "53c810.h"
|
||||
|
||||
#define DMA_MAX_ICOUNT 512 /* Maximum number of DMA Scripts opcodes to run */
|
||||
@ -46,8 +45,9 @@ static struct {
|
||||
void (* dma_callback)(UINT32, UINT32, int, int);
|
||||
} lsi810;
|
||||
|
||||
static void (* dma_opcode[256])(void);
|
||||
|
||||
typedef void (*opcode_handler)(running_machine *machine);
|
||||
#define OPCODE_HANDLER(name) void name(running_machine *machine)
|
||||
static opcode_handler dma_opcode[256];
|
||||
|
||||
INLINE UINT32 FETCH(void)
|
||||
{
|
||||
@ -67,12 +67,12 @@ static UINT32 sign_extend24(UINT32 val)
|
||||
}
|
||||
#endif
|
||||
|
||||
static void dmaop_invalid(void)
|
||||
static OPCODE_HANDLER( dmaop_invalid )
|
||||
{
|
||||
fatalerror("LSI53C810: Invalid SCRIPTS DMA opcode %08X at %08X", lsi810.dcmd, lsi810.dsp);
|
||||
}
|
||||
|
||||
static void dmaop_move_memory(void)
|
||||
static OPCODE_HANDLER( dmaop_move_memory )
|
||||
{
|
||||
UINT32 src = FETCH();
|
||||
UINT32 dst = FETCH();
|
||||
@ -84,7 +84,7 @@ static void dmaop_move_memory(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_interrupt(void)
|
||||
static OPCODE_HANDLER( dmaop_interrupt )
|
||||
{
|
||||
if(lsi810.dcmd & 0x100000) {
|
||||
fatalerror("LSI53C810: INTFLY opcode not implemented");
|
||||
@ -95,13 +95,13 @@ static void dmaop_interrupt(void)
|
||||
lsi810.dstat |= 0x4; /* SIR (SCRIPTS Interrupt Instruction Received) */
|
||||
|
||||
if(intf->irq_callback != NULL) {
|
||||
intf->irq_callback(Machine, 1);
|
||||
intf->irq_callback(machine, 1);
|
||||
}
|
||||
lsi810.dma_icount = 0;
|
||||
lsi810.halted = 1;
|
||||
}
|
||||
|
||||
static void dmaop_block_move(void)
|
||||
static OPCODE_HANDLER( dmaop_block_move )
|
||||
{
|
||||
UINT32 address;
|
||||
UINT32 count;
|
||||
@ -145,7 +145,7 @@ static void dmaop_block_move(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_select(void)
|
||||
static OPCODE_HANDLER( dmaop_select )
|
||||
{
|
||||
UINT32 operand;
|
||||
|
||||
@ -170,7 +170,7 @@ static void dmaop_select(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_wait_disconnect(void)
|
||||
static OPCODE_HANDLER( dmaop_wait_disconnect )
|
||||
{
|
||||
UINT32 operand;
|
||||
|
||||
@ -188,7 +188,7 @@ static void dmaop_wait_disconnect(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_wait_reselect(void)
|
||||
static OPCODE_HANDLER( dmaop_wait_reselect )
|
||||
{
|
||||
UINT32 operand;
|
||||
|
||||
@ -206,7 +206,7 @@ static void dmaop_wait_reselect(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_set(void)
|
||||
static OPCODE_HANDLER( dmaop_set )
|
||||
{
|
||||
UINT32 operand;
|
||||
|
||||
@ -235,7 +235,7 @@ static void dmaop_set(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_clear(void)
|
||||
static OPCODE_HANDLER( dmaop_clear )
|
||||
{
|
||||
UINT32 operand;
|
||||
|
||||
@ -264,17 +264,17 @@ static void dmaop_clear(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_move_from_sfbr(void)
|
||||
static OPCODE_HANDLER( dmaop_move_from_sfbr )
|
||||
{
|
||||
fatalerror("LSI53C810: dmaop_move_from_sfbr not implemented in target mode");
|
||||
}
|
||||
|
||||
static void dmaop_move_to_sfbr(void)
|
||||
static OPCODE_HANDLER( dmaop_move_to_sfbr )
|
||||
{
|
||||
fatalerror("LSI53C810: dmaop_move_to_sfbr not implemented");
|
||||
}
|
||||
|
||||
static void dmaop_read_modify_write(void)
|
||||
static OPCODE_HANDLER( dmaop_read_modify_write )
|
||||
{
|
||||
fatalerror("LSI53C810: dmaop_read_modify_write not implemented");
|
||||
}
|
||||
@ -366,7 +366,7 @@ static UINT32 scripts_get_jump_dest(void)
|
||||
return dest;
|
||||
}
|
||||
|
||||
static void dmaop_jump(void)
|
||||
static OPCODE_HANDLER( dmaop_jump )
|
||||
{
|
||||
if (scripts_compute_branch())
|
||||
{
|
||||
@ -378,7 +378,7 @@ static void dmaop_jump(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_call(void)
|
||||
static OPCODE_HANDLER( dmaop_call )
|
||||
{
|
||||
if (scripts_compute_branch())
|
||||
{
|
||||
@ -394,7 +394,7 @@ static void dmaop_call(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_return(void)
|
||||
static OPCODE_HANDLER( dmaop_return )
|
||||
{
|
||||
// is this correct? return only happens if the condition is true?
|
||||
if (scripts_compute_branch())
|
||||
@ -408,19 +408,19 @@ static void dmaop_return(void)
|
||||
}
|
||||
}
|
||||
|
||||
static void dmaop_store(void)
|
||||
static OPCODE_HANDLER( dmaop_store )
|
||||
{
|
||||
fatalerror("LSI53C810: dmaop_store not implemented");
|
||||
}
|
||||
|
||||
static void dmaop_load(void)
|
||||
static OPCODE_HANDLER( dmaop_load )
|
||||
{
|
||||
fatalerror("LSI53C810: dmaop_load not implemented");
|
||||
}
|
||||
|
||||
|
||||
|
||||
static void dma_exec(void)
|
||||
static void dma_exec(running_machine *machine)
|
||||
{
|
||||
lsi810.dma_icount = DMA_MAX_ICOUNT;
|
||||
|
||||
@ -438,7 +438,7 @@ static void dma_exec(void)
|
||||
lsi810.dcmd = FETCH();
|
||||
|
||||
op = (lsi810.dcmd >> 24) & 0xff;
|
||||
dma_opcode[op]();
|
||||
dma_opcode[op](machine);
|
||||
|
||||
lsi810.dma_icount--;
|
||||
}
|
||||
@ -593,7 +593,7 @@ WRITE8_HANDLER( lsi53c810_reg_w )
|
||||
lsi810.dsp |= data << 24;
|
||||
lsi810.halted = 0;
|
||||
if((lsi810.dmode & 0x1) == 0 && !lsi810.halted) {
|
||||
dma_exec();
|
||||
dma_exec(space->machine);
|
||||
}
|
||||
break;
|
||||
case 0x34: /* SCRATCH A */
|
||||
@ -616,7 +616,7 @@ WRITE8_HANDLER( lsi53c810_reg_w )
|
||||
int op;
|
||||
lsi810.dcmd = FETCH();
|
||||
op = (lsi810.dcmd >> 24) & 0xff;
|
||||
dma_opcode[op]();
|
||||
dma_opcode[op](space->machine);
|
||||
|
||||
lsi810.istat |= 0x3; /* DMA interrupt pending */
|
||||
lsi810.dstat |= 0x8; /* SSI (Single Step Interrupt) */
|
||||
@ -626,7 +626,7 @@ WRITE8_HANDLER( lsi53c810_reg_w )
|
||||
}
|
||||
else if(lsi810.dcntl & 0x04 && !lsi810.halted) /* manual start DMA */
|
||||
{
|
||||
dma_exec();
|
||||
dma_exec(space->machine);
|
||||
}
|
||||
break;
|
||||
case 0x40: /* SIEN0 */
|
||||
@ -656,7 +656,7 @@ WRITE8_HANDLER( lsi53c810_reg_w )
|
||||
}
|
||||
}
|
||||
|
||||
static void add_opcode(UINT8 op, UINT8 mask, void (* handler)(void))
|
||||
static void add_opcode(UINT8 op, UINT8 mask, opcode_handler handler)
|
||||
{
|
||||
int i;
|
||||
for(i=0; i < 256; i++) {
|
||||
@ -666,7 +666,7 @@ static void add_opcode(UINT8 op, UINT8 mask, void (* handler)(void))
|
||||
}
|
||||
}
|
||||
|
||||
extern void lsi53c810_init(const struct LSI53C810interface *interface)
|
||||
void lsi53c810_init(const struct LSI53C810interface *interface)
|
||||
{
|
||||
int i;
|
||||
|
||||
@ -705,7 +705,7 @@ extern void lsi53c810_init(const struct LSI53C810interface *interface)
|
||||
}
|
||||
}
|
||||
|
||||
extern void lsi53c810_exit(const struct LSI53C810interface *interface)
|
||||
void lsi53c810_exit(const struct LSI53C810interface *interface)
|
||||
{
|
||||
int i;
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/adc083x.h"
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
@ -28,7 +27,7 @@ INLINE void ATTR_PRINTF(3,4) verboselog( running_machine *machine, int n_level,
|
||||
struct adc083x_chip
|
||||
{
|
||||
int type;
|
||||
double (*input_callback)(int input);
|
||||
double (*input_callback)(running_machine *machine, int input);
|
||||
INT32 CS;
|
||||
INT32 CLK;
|
||||
INT32 DI;
|
||||
@ -56,7 +55,7 @@ struct adc083x_chip
|
||||
|
||||
static struct adc083x_chip adc083x[ MAX_ADC083X_CHIPS ];
|
||||
|
||||
void adc083x_init( running_machine *machine, int chip, int type, double (*input_callback)(int input) )
|
||||
void adc083x_init( running_machine *machine, int chip, int type, double (*input_callback)(running_machine *machine, int input) )
|
||||
{
|
||||
struct adc083x_chip *c;
|
||||
|
||||
@ -122,9 +121,8 @@ void adc083x_init( running_machine *machine, int chip, int type, double (*input_
|
||||
state_save_register_item( machine, "adc083x", NULL, chip, c->output );
|
||||
}
|
||||
|
||||
void adc083x_cs_write( int chip, int cs )
|
||||
void adc083x_cs_write( running_machine *machine, int chip, int cs )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct adc083x_chip *c;
|
||||
|
||||
if( chip >= MAX_ADC083X_CHIPS )
|
||||
@ -169,7 +167,7 @@ void adc083x_cs_write( int chip, int cs )
|
||||
c->CS = cs;
|
||||
}
|
||||
|
||||
static int adc083x_conversion( int chip )
|
||||
static int adc083x_conversion( running_machine *machine, int chip )
|
||||
{
|
||||
struct adc083x_chip *c = &adc083x[ chip ];
|
||||
int result;
|
||||
@ -177,8 +175,8 @@ static int adc083x_conversion( int chip )
|
||||
int negative_channel = ADC083X_AGND;
|
||||
double positive = 0;
|
||||
double negative = 0;
|
||||
double gnd = c->input_callback( ADC083X_AGND );
|
||||
double vref = c->input_callback( ADC083X_VREF );
|
||||
double gnd = c->input_callback( machine, ADC083X_AGND );
|
||||
double vref = c->input_callback( machine, ADC083X_VREF );
|
||||
|
||||
switch( c->type )
|
||||
{
|
||||
@ -223,11 +221,11 @@ static int adc083x_conversion( int chip )
|
||||
|
||||
if( positive_channel != ADC083X_AGND )
|
||||
{
|
||||
positive = c->input_callback( positive_channel ) - gnd;
|
||||
positive = c->input_callback( machine, positive_channel ) - gnd;
|
||||
}
|
||||
if( negative_channel != ADC083X_AGND )
|
||||
{
|
||||
negative = c->input_callback( negative_channel ) - gnd;
|
||||
negative = c->input_callback( machine, negative_channel ) - gnd;
|
||||
}
|
||||
|
||||
result = (int)( ( ( positive - negative ) * 255 ) / vref );
|
||||
@ -243,9 +241,8 @@ static int adc083x_conversion( int chip )
|
||||
return result;
|
||||
}
|
||||
|
||||
void adc083x_clk_write( int chip, int clk )
|
||||
void adc083x_clk_write( running_machine *machine, int chip, int clk )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct adc083x_chip *c;
|
||||
|
||||
if( chip >= MAX_ADC083X_CHIPS )
|
||||
@ -343,7 +340,7 @@ void adc083x_clk_write( int chip, int clk )
|
||||
{
|
||||
case STATE_MUX_SETTLE:
|
||||
verboselog( machine, 1, "adc083x %d mux settle\n", chip );
|
||||
c->output = adc083x_conversion( chip );
|
||||
c->output = adc083x_conversion( machine, chip );
|
||||
c->state = STATE_OUTPUT_MSB_FIRST;
|
||||
c->bit = 7;
|
||||
if( c->type == ADC0834 || c->type == ADC0838 )
|
||||
@ -388,9 +385,8 @@ void adc083x_clk_write( int chip, int clk )
|
||||
c->CLK = clk;
|
||||
}
|
||||
|
||||
void adc083x_di_write( int chip, int di )
|
||||
void adc083x_di_write( running_machine *machine, int chip, int di )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct adc083x_chip *c;
|
||||
|
||||
if( chip >= MAX_ADC083X_CHIPS )
|
||||
@ -409,9 +405,8 @@ void adc083x_di_write( int chip, int di )
|
||||
c->DI = di;
|
||||
}
|
||||
|
||||
void adc083x_se_write( int chip, int se )
|
||||
void adc083x_se_write( running_machine *machine, int chip, int se )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct adc083x_chip *c;
|
||||
|
||||
if( chip >= MAX_ADC083X_CHIPS )
|
||||
@ -430,9 +425,8 @@ void adc083x_se_write( int chip, int se )
|
||||
c->SE = se;
|
||||
}
|
||||
|
||||
int adc083x_sars_read( int chip )
|
||||
int adc083x_sars_read( running_machine *machine, int chip )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct adc083x_chip *c;
|
||||
|
||||
if( chip >= MAX_ADC083X_CHIPS )
|
||||
@ -447,9 +441,8 @@ int adc083x_sars_read( int chip )
|
||||
return c->SARS;
|
||||
}
|
||||
|
||||
int adc083x_do_read( int chip )
|
||||
int adc083x_do_read( running_machine *machine, int chip )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct adc083x_chip *c;
|
||||
|
||||
if( chip >= MAX_ADC083X_CHIPS )
|
||||
|
@ -27,12 +27,12 @@
|
||||
#define ADC0834 ( 2 )
|
||||
#define ADC0838 ( 3 )
|
||||
|
||||
void adc083x_init( running_machine *machine, int chip, int type, double (*input_callback)( int input ) );
|
||||
extern void adc083x_cs_write( int chip, int cs );
|
||||
extern void adc083x_clk_write( int chip, int clk );
|
||||
extern void adc083x_di_write( int chip, int di );
|
||||
extern void adc083x_se_write( int chip, int se );
|
||||
extern int adc083x_sars_read( int chip );
|
||||
extern int adc083x_do_read( int chip );
|
||||
void adc083x_init( running_machine *machine, int chip, int type, double (*input_callback)( running_machine *machine, int input ) );
|
||||
extern void adc083x_cs_write( running_machine *machine, int chip, int cs );
|
||||
extern void adc083x_clk_write( running_machine *machine, int chip, int clk );
|
||||
extern void adc083x_di_write( running_machine *machine, int chip, int di );
|
||||
extern void adc083x_se_write( running_machine *machine, int chip, int se );
|
||||
extern int adc083x_sars_read( running_machine *machine, int chip );
|
||||
extern int adc083x_do_read( running_machine *machine, int chip );
|
||||
|
||||
#endif
|
||||
|
@ -8,7 +8,6 @@
|
||||
|
||||
#include <stdarg.h>
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "state.h"
|
||||
#include "machine/ds2401.h"
|
||||
|
||||
@ -160,9 +159,8 @@ void ds2401_init( running_machine *machine, int which, const UINT8 *data )
|
||||
c->reset_timer = timer_alloc(machine, ds2401_reset , NULL);
|
||||
}
|
||||
|
||||
void ds2401_write( int which, int data )
|
||||
void ds2401_write( running_machine *machine, int which, int data )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct ds2401_chip *c = &ds2401[ which ];
|
||||
|
||||
verboselog( machine, 1, "ds2401_write( %d, %d )\n", which, data );
|
||||
@ -214,11 +212,11 @@ void ds2401_write( int which, int data )
|
||||
c->rx = data;
|
||||
}
|
||||
|
||||
int ds2401_read( int which )
|
||||
int ds2401_read( running_machine *machine, int which )
|
||||
{
|
||||
struct ds2401_chip *c = &ds2401[ which ];
|
||||
|
||||
verboselog( Machine, 2, "ds2401_read( %d ) %d\n", which, c->tx & c->rx );
|
||||
verboselog( machine, 2, "ds2401_read( %d ) %d\n", which, c->tx & c->rx );
|
||||
return c->tx & c->rx;
|
||||
}
|
||||
|
||||
|
@ -12,7 +12,7 @@
|
||||
#define DS2401_MAXCHIP ( 3 )
|
||||
|
||||
extern void ds2401_init( running_machine *machine, int which, const UINT8 *data );
|
||||
extern void ds2401_write( int which, int data );
|
||||
extern int ds2401_read( int which );
|
||||
extern void ds2401_write( running_machine *machine, int which, int data );
|
||||
extern int ds2401_read( running_machine *machine, int which );
|
||||
|
||||
#endif
|
||||
|
@ -21,7 +21,6 @@ Up to 4096 bytes can be addressed.
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/i2cmem.h"
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
@ -147,9 +146,8 @@ static int data_offset( struct i2cmem_chip *c )
|
||||
return ( ( ( c->devsel << 7 ) & 0xff00 ) | ( c->byteaddr & 0xff ) ) & ( c->data_size - 1 );
|
||||
}
|
||||
|
||||
void i2cmem_write( int chip, int line, int data )
|
||||
void i2cmem_write( running_machine *machine, int chip, int line, int data )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct i2cmem_chip *c;
|
||||
|
||||
if( chip >= I2CMEM_MAXCHIP )
|
||||
@ -382,9 +380,8 @@ void i2cmem_write( int chip, int line, int data )
|
||||
}
|
||||
}
|
||||
|
||||
int i2cmem_read( int chip, int line )
|
||||
int i2cmem_read( running_machine *machine, int chip, int line )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct i2cmem_chip *c;
|
||||
|
||||
if( chip >= I2CMEM_MAXCHIP )
|
||||
|
@ -20,8 +20,8 @@ I2C Memory
|
||||
#define I2CMEM_SLAVE_ADDRESS_ALT ( 0xb0 )
|
||||
|
||||
extern void i2cmem_init( running_machine *machine, int chip, int slave_address, int page_size, int data_size, unsigned char *data );
|
||||
extern void i2cmem_write( int chip, int line, int data );
|
||||
extern int i2cmem_read( int chip, int line );
|
||||
extern void i2cmem_write( running_machine *machine, int chip, int line, int data );
|
||||
extern int i2cmem_read( running_machine *machine, int chip, int line );
|
||||
extern NVRAM_HANDLER( i2cmem_0 );
|
||||
|
||||
#endif
|
||||
|
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "state.h"
|
||||
#include "wd33c93.h"
|
||||
|
||||
@ -170,7 +169,8 @@ static const struct WD33C93interface *intf;
|
||||
#define SRCID_ER 0x80
|
||||
|
||||
/* command handler definition */
|
||||
typedef void (*cmd_handler)(void);
|
||||
typedef void (*cmd_handler)(running_machine *machine);
|
||||
#define CMD_HANDLER(name) void name(running_machine *machine)
|
||||
|
||||
#define TEMP_INPUT_LEN 65536
|
||||
#define FIFO_SIZE 12
|
||||
@ -292,15 +292,15 @@ static void wd33c93_complete_cmd( UINT8 status )
|
||||
}
|
||||
|
||||
/* command handlers */
|
||||
static void wd33c93_invalid_cmd( void )
|
||||
static CMD_HANDLER( wd33c93_invalid_cmd )
|
||||
{
|
||||
logerror( "%s:Unknown/Unimplemented SCSI controller command: %02x\n", cpuexec_describe_context(Machine), scsi_data.regs[WD_COMMAND] );
|
||||
logerror( "%s:Unknown/Unimplemented SCSI controller command: %02x\n", cpuexec_describe_context(machine), scsi_data.regs[WD_COMMAND] );
|
||||
|
||||
/* complete the command */
|
||||
wd33c93_complete_cmd( CSR_INVALID );
|
||||
}
|
||||
|
||||
static void wd33c93_reset_cmd( void )
|
||||
static CMD_HANDLER( wd33c93_reset_cmd )
|
||||
{
|
||||
int advanced = 0;
|
||||
|
||||
@ -317,19 +317,19 @@ static void wd33c93_reset_cmd( void )
|
||||
wd33c93_complete_cmd(advanced ? CSR_RESET_AF : CSR_RESET);
|
||||
}
|
||||
|
||||
static void wd33c93_abort_cmd( void )
|
||||
static CMD_HANDLER( wd33c93_abort_cmd )
|
||||
{
|
||||
/* complete the command */
|
||||
wd33c93_complete_cmd(CSR_ABORT);
|
||||
}
|
||||
|
||||
static void wd33c93_disconnect_cmd( void )
|
||||
static CMD_HANDLER( wd33c93_disconnect_cmd )
|
||||
{
|
||||
/* complete the command */
|
||||
scsi_data.regs[WD_AUXILIARY_STATUS] &= ~(ASR_CIP | ASR_BSY);
|
||||
}
|
||||
|
||||
static void wd33c93_select_cmd( void )
|
||||
static CMD_HANDLER( wd33c93_select_cmd )
|
||||
{
|
||||
UINT8 unit = wd33c93_getunit();
|
||||
UINT8 newstatus;
|
||||
@ -353,7 +353,7 @@ static void wd33c93_select_cmd( void )
|
||||
}
|
||||
|
||||
/* queue up a service request out in the future */
|
||||
timer_set( Machine, ATTOTIME_IN_USEC(50), NULL, 0, wd33c93_service_request );
|
||||
timer_set( machine, ATTOTIME_IN_USEC(50), NULL, 0, wd33c93_service_request );
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -365,7 +365,7 @@ static void wd33c93_select_cmd( void )
|
||||
wd33c93_complete_cmd(newstatus);
|
||||
}
|
||||
|
||||
static void wd33c93_selectxfer_cmd( void )
|
||||
static CMD_HANDLER( wd33c93_selectxfer_cmd )
|
||||
{
|
||||
UINT8 unit = wd33c93_getunit();
|
||||
UINT8 newstatus;
|
||||
@ -425,7 +425,7 @@ static void wd33c93_selectxfer_cmd( void )
|
||||
scsi_data.busphase = PHS_MESS_IN;
|
||||
|
||||
/* queue up a service request out in the future */
|
||||
timer_set( Machine, ATTOTIME_IN_MSEC(50), NULL, 0, wd33c93_service_request );
|
||||
timer_set( machine, ATTOTIME_IN_MSEC(50), NULL, 0, wd33c93_service_request );
|
||||
}
|
||||
}
|
||||
else
|
||||
@ -440,7 +440,7 @@ static void wd33c93_selectxfer_cmd( void )
|
||||
wd33c93_complete_cmd(newstatus);
|
||||
}
|
||||
|
||||
static void wd33c93_negate_ack( void )
|
||||
static CMD_HANDLER( wd33c93_negate_ack )
|
||||
{
|
||||
logerror( "WD33C93: ACK Negated\n" );
|
||||
|
||||
@ -448,14 +448,14 @@ static void wd33c93_negate_ack( void )
|
||||
scsi_data.regs[WD_AUXILIARY_STATUS] &= ~(ASR_CIP | ASR_BSY);
|
||||
}
|
||||
|
||||
static void wd33c93_xferinfo_cmd( void )
|
||||
static CMD_HANDLER( wd33c93_xferinfo_cmd )
|
||||
{
|
||||
/* make the buffer available right away */
|
||||
scsi_data.regs[WD_AUXILIARY_STATUS] |= ASR_DBR;
|
||||
scsi_data.regs[WD_AUXILIARY_STATUS] |= ASR_CIP;
|
||||
|
||||
/* the command will be completed once the data is transferred */
|
||||
timer_set( Machine, ATTOTIME_IN_MSEC(1), NULL, 0, wd33c93_deassert_cip );
|
||||
timer_set( machine, ATTOTIME_IN_MSEC(1), NULL, 0, wd33c93_deassert_cip );
|
||||
}
|
||||
|
||||
/* Command handlers */
|
||||
@ -498,7 +498,7 @@ static const cmd_handler wd33c93_cmds[0x22] =
|
||||
};
|
||||
|
||||
/* Handle pending commands */
|
||||
static void wd33c93_command( void )
|
||||
static void wd33c93_command( running_machine *machine )
|
||||
{
|
||||
/* get the command */
|
||||
UINT8 cmd = scsi_data.regs[WD_COMMAND];
|
||||
@ -506,12 +506,12 @@ static void wd33c93_command( void )
|
||||
/* check if its within valid bounds */
|
||||
if ( (cmd & 0x7F) > WD_CMD_TRANSFER_PAD )
|
||||
{
|
||||
wd33c93_invalid_cmd();
|
||||
wd33c93_invalid_cmd(machine);
|
||||
return;
|
||||
}
|
||||
|
||||
/* call the command handler */
|
||||
(*wd33c93_cmds[cmd & 0x7F])();
|
||||
(*wd33c93_cmds[cmd & 0x7F])(machine);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER(wd33c93_w)
|
||||
@ -541,7 +541,7 @@ WRITE8_HANDLER(wd33c93_w)
|
||||
scsi_data.regs[WD_AUXILIARY_STATUS] |= ASR_CIP;
|
||||
|
||||
/* process the command */
|
||||
wd33c93_command();
|
||||
wd33c93_command(space->machine);
|
||||
}
|
||||
else if ( scsi_data.sasr == WD_CDB_1 )
|
||||
{
|
||||
|
@ -12,7 +12,6 @@
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/x76f041.h"
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
@ -166,9 +165,8 @@ void x76f041_init( running_machine *machine, int chip, UINT8 *data )
|
||||
state_save_register_item_pointer( machine, "x76f041", NULL, chip, c->data, SIZE_DATA );
|
||||
}
|
||||
|
||||
void x76f041_cs_write( int chip, int cs )
|
||||
void x76f041_cs_write( running_machine *machine, int chip, int cs )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f041_chip *c;
|
||||
|
||||
if( chip >= X76F041_MAXCHIP )
|
||||
@ -198,9 +196,8 @@ void x76f041_cs_write( int chip, int cs )
|
||||
c->cs = cs;
|
||||
}
|
||||
|
||||
void x76f041_rst_write( int chip, int rst )
|
||||
void x76f041_rst_write( running_machine *machine, int chip, int rst )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f041_chip *c;
|
||||
|
||||
if( chip >= X76F041_MAXCHIP )
|
||||
@ -285,9 +282,8 @@ static void x76f041_password_ok( struct x76f041_chip *c )
|
||||
}
|
||||
}
|
||||
|
||||
static void x76f041_load_address( int chip )
|
||||
static void x76f041_load_address( running_machine *machine, int chip )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
/* todo: handle other bcr bits */
|
||||
struct x76f041_chip *c = &x76f041[ chip ];
|
||||
int bcr;
|
||||
@ -340,9 +336,8 @@ static int x76f041_data_offset( struct x76f041_chip *c )
|
||||
return ( block_offset & 0x180 ) | ( ( block_offset + c->byte ) & 0x7f );
|
||||
}
|
||||
|
||||
void x76f041_scl_write( int chip, int scl )
|
||||
void x76f041_scl_write( running_machine *machine, int chip, int scl )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f041_chip *c;
|
||||
|
||||
if( chip >= X76F041_MAXCHIP )
|
||||
@ -411,7 +406,7 @@ void x76f041_scl_write( int chip, int scl )
|
||||
c->state = STATE_LOAD_ADDRESS;
|
||||
break;
|
||||
case STATE_LOAD_ADDRESS:
|
||||
x76f041_load_address( chip );
|
||||
x76f041_load_address( machine, chip );
|
||||
break;
|
||||
case STATE_LOAD_PASSWORD:
|
||||
verboselog( machine, 1, "x76f041(%d) -> password: %02x\n", chip, c->shift );
|
||||
@ -512,9 +507,8 @@ void x76f041_scl_write( int chip, int scl )
|
||||
c->scl = scl;
|
||||
}
|
||||
|
||||
void x76f041_sda_write( int chip, int sda )
|
||||
void x76f041_sda_write( running_machine *machine, int chip, int sda )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f041_chip *c;
|
||||
|
||||
if( chip >= X76F041_MAXCHIP )
|
||||
@ -567,9 +561,8 @@ void x76f041_sda_write( int chip, int sda )
|
||||
c->sdaw = sda;
|
||||
}
|
||||
|
||||
int x76f041_sda_read( int chip )
|
||||
int x76f041_sda_read( running_machine *machine, int chip )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f041_chip *c;
|
||||
|
||||
if( chip >= X76F041_MAXCHIP )
|
||||
@ -589,7 +582,7 @@ int x76f041_sda_read( int chip )
|
||||
return c->sdar;
|
||||
}
|
||||
|
||||
static void nvram_handler_x76f041( int chip, running_machine *machine, mame_file *file, int read_or_write )
|
||||
static void nvram_handler_x76f041( running_machine *machine, mame_file *file, int read_or_write, int chip )
|
||||
{
|
||||
struct x76f041_chip *c;
|
||||
|
||||
@ -619,5 +612,5 @@ static void nvram_handler_x76f041( int chip, running_machine *machine, mame_file
|
||||
}
|
||||
}
|
||||
|
||||
NVRAM_HANDLER( x76f041_0 ) { nvram_handler_x76f041( 0, machine, file, read_or_write ); }
|
||||
NVRAM_HANDLER( x76f041_1 ) { nvram_handler_x76f041( 1, machine, file, read_or_write ); }
|
||||
NVRAM_HANDLER( x76f041_0 ) { nvram_handler_x76f041( machine, file, read_or_write, 0 ); }
|
||||
NVRAM_HANDLER( x76f041_1 ) { nvram_handler_x76f041( machine, file, read_or_write, 1 ); }
|
||||
|
@ -10,11 +10,11 @@
|
||||
#define X76F041_MAXCHIP ( 2 )
|
||||
|
||||
extern void x76f041_init( running_machine *machine, int chip, UINT8 *data );
|
||||
extern void x76f041_cs_write( int chip, int cs );
|
||||
extern void x76f041_rst_write( int chip, int rst );
|
||||
extern void x76f041_scl_write( int chip, int scl );
|
||||
extern void x76f041_sda_write( int chip, int sda );
|
||||
extern int x76f041_sda_read( int chip );
|
||||
extern void x76f041_cs_write( running_machine *machine, int chip, int cs );
|
||||
extern void x76f041_rst_write( running_machine *machine, int chip, int rst );
|
||||
extern void x76f041_scl_write( running_machine *machine, int chip, int scl );
|
||||
extern void x76f041_sda_write( running_machine *machine, int chip, int sda );
|
||||
extern int x76f041_sda_read( running_machine *machine, int chip );
|
||||
extern NVRAM_HANDLER( x76f041_0 );
|
||||
extern NVRAM_HANDLER( x76f041_1 );
|
||||
|
||||
|
@ -10,7 +10,6 @@
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/x76f100.h"
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
@ -127,9 +126,8 @@ void x76f100_init( running_machine *machine, int chip, UINT8 *data )
|
||||
state_save_register_item_pointer( machine, "x76f100", NULL, chip, c->data, SIZE_DATA );
|
||||
}
|
||||
|
||||
void x76f100_cs_write( int chip, int cs )
|
||||
void x76f100_cs_write( running_machine *machine, int chip, int cs )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f100_chip *c;
|
||||
|
||||
if( chip >= X76F100_MAXCHIP )
|
||||
@ -159,9 +157,8 @@ void x76f100_cs_write( int chip, int cs )
|
||||
c->cs = cs;
|
||||
}
|
||||
|
||||
void x76f100_rst_write( int chip, int rst )
|
||||
void x76f100_rst_write( running_machine *machine, int chip, int rst )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f100_chip *c;
|
||||
|
||||
if( chip >= X76F100_MAXCHIP )
|
||||
@ -219,9 +216,8 @@ static int x76f100_data_offset( struct x76f100_chip *c )
|
||||
return ( block_offset * SIZE_WRITE_BUFFER ) + c->byte;
|
||||
}
|
||||
|
||||
void x76f100_scl_write( int chip, int scl )
|
||||
void x76f100_scl_write( running_machine *machine, int chip, int scl )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f100_chip *c;
|
||||
|
||||
if( chip >= X76F100_MAXCHIP )
|
||||
@ -385,9 +381,8 @@ void x76f100_scl_write( int chip, int scl )
|
||||
c->scl = scl;
|
||||
}
|
||||
|
||||
void x76f100_sda_write( int chip, int sda )
|
||||
void x76f100_sda_write( running_machine *machine, int chip, int sda )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f100_chip *c;
|
||||
|
||||
if( chip >= X76F100_MAXCHIP )
|
||||
@ -444,9 +439,8 @@ void x76f100_sda_write( int chip, int sda )
|
||||
c->sdaw = sda;
|
||||
}
|
||||
|
||||
int x76f100_sda_read( int chip )
|
||||
int x76f100_sda_read( running_machine *machine, int chip )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct x76f100_chip *c;
|
||||
|
||||
if( chip >= X76F100_MAXCHIP )
|
||||
@ -466,7 +460,7 @@ int x76f100_sda_read( int chip )
|
||||
return c->sdar;
|
||||
}
|
||||
|
||||
static void nvram_handler_x76f100( int chip, running_machine *machine, mame_file *file, int read_or_write )
|
||||
static void nvram_handler_x76f100( running_machine *machine, mame_file *file, int read_or_write, int chip )
|
||||
{
|
||||
struct x76f100_chip *c;
|
||||
|
||||
@ -492,5 +486,5 @@ static void nvram_handler_x76f100( int chip, running_machine *machine, mame_file
|
||||
}
|
||||
}
|
||||
|
||||
NVRAM_HANDLER( x76f100_0 ) { nvram_handler_x76f100( 0, machine, file, read_or_write ); }
|
||||
NVRAM_HANDLER( x76f100_1 ) { nvram_handler_x76f100( 1, machine, file, read_or_write ); }
|
||||
NVRAM_HANDLER( x76f100_0 ) { nvram_handler_x76f100( machine, file, read_or_write, 0 ); }
|
||||
NVRAM_HANDLER( x76f100_1 ) { nvram_handler_x76f100( machine, file, read_or_write, 1 ); }
|
||||
|
@ -10,11 +10,11 @@
|
||||
#define X76F100_MAXCHIP ( 2 )
|
||||
|
||||
extern void x76f100_init( running_machine *machine, int chip, UINT8 *data );
|
||||
extern void x76f100_cs_write( int chip, int cs );
|
||||
extern void x76f100_rst_write( int chip, int rst );
|
||||
extern void x76f100_scl_write( int chip, int scl );
|
||||
extern void x76f100_sda_write( int chip, int sda );
|
||||
extern int x76f100_sda_read( int chip );
|
||||
extern void x76f100_cs_write( running_machine *machine, int chip, int cs );
|
||||
extern void x76f100_rst_write( running_machine *machine, int chip, int rst );
|
||||
extern void x76f100_scl_write( running_machine *machine, int chip, int scl );
|
||||
extern void x76f100_sda_write( running_machine *machine, int chip, int sda );
|
||||
extern int x76f100_sda_read( running_machine *machine, int chip );
|
||||
extern NVRAM_HANDLER( x76f100_0 );
|
||||
extern NVRAM_HANDLER( x76f100_1 );
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
***************************************************************************/
|
||||
|
||||
#include "poly.h"
|
||||
#include "deprecat.h"
|
||||
#include "eminline.h"
|
||||
#include "mame.h"
|
||||
#include "state.h"
|
||||
@ -329,7 +328,7 @@ INLINE polygon_info *allocate_polygon(poly_manager *poly, int miny, int maxy)
|
||||
manager
|
||||
-------------------------------------------------*/
|
||||
|
||||
poly_manager *poly_alloc(int max_polys, size_t extra_data_size, UINT8 flags)
|
||||
poly_manager *poly_alloc(running_machine *machine, int max_polys, size_t extra_data_size, UINT8 flags)
|
||||
{
|
||||
poly_manager *poly;
|
||||
|
||||
@ -361,7 +360,7 @@ poly_manager *poly_alloc(int max_polys, size_t extra_data_size, UINT8 flags)
|
||||
poly->queue = osd_work_queue_alloc(WORK_QUEUE_FLAG_MULTI | WORK_QUEUE_FLAG_HIGH_FREQ);
|
||||
|
||||
/* request a pre-save callback for synchronization */
|
||||
state_save_register_presave(Machine, poly_state_presave, poly);
|
||||
state_save_register_presave(machine, poly_state_presave, poly);
|
||||
return poly;
|
||||
}
|
||||
|
||||
|
@ -102,7 +102,7 @@ typedef void (*poly_draw_scanline_func)(void *dest, INT32 scanline, const poly_e
|
||||
/* ----- initialization/teardown ----- */
|
||||
|
||||
/* allocate a new poly manager that can render triangles */
|
||||
poly_manager *poly_alloc(int max_polys, size_t extra_data_size, UINT8 flags);
|
||||
poly_manager *poly_alloc(running_machine *machine, int max_polys, size_t extra_data_size, UINT8 flags);
|
||||
|
||||
/* free a poly manager */
|
||||
void poly_free(poly_manager *poly);
|
||||
|
@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "v9938.h"
|
||||
|
||||
#define VERBOSE 0
|
||||
@ -94,13 +93,13 @@ static const char *const v9938_modes[] = {
|
||||
"GRAPHIC 4", "GRAPHIC 5", "GRAPHIC 6", "GRAPHIC 7", "TEXT 2",
|
||||
"UNKNOWN" };
|
||||
|
||||
static void v9938_register_write (int reg, int data);
|
||||
static void v9938_register_write (running_machine *machine, int reg, int data);
|
||||
static void v9938_update_command (void);
|
||||
static void v9938_cpu_to_vdp (UINT8 V);
|
||||
static UINT8 v9938_command_unit_w (UINT8 Op);
|
||||
static UINT8 v9938_vdp_to_cpu (void);
|
||||
static void v9938_set_mode (void);
|
||||
static void v9938_refresh_line (bitmap_t *bmp, int line);
|
||||
static void v9938_refresh_line (running_machine *machine, bitmap_t *bmp, int line);
|
||||
|
||||
/***************************************************************************
|
||||
|
||||
@ -435,14 +434,14 @@ READ8_HANDLER (v9938_1_vram_r)
|
||||
return v9938_vram_r();
|
||||
}
|
||||
|
||||
static void v9938_command_w(UINT8 data)
|
||||
static void v9938_command_w(running_machine *machine, UINT8 data)
|
||||
{
|
||||
if (vdp->cmd_write_first)
|
||||
{
|
||||
if (data & 0x80)
|
||||
{
|
||||
if (!(data & 0x40))
|
||||
v9938_register_write (data & 0x3f, vdp->cmd_write);
|
||||
v9938_register_write (machine, data & 0x3f, vdp->cmd_write);
|
||||
}
|
||||
else
|
||||
{
|
||||
@ -463,13 +462,13 @@ static void v9938_command_w(UINT8 data)
|
||||
WRITE8_HANDLER (v9938_0_command_w)
|
||||
{
|
||||
vdp = &vdps[0];
|
||||
v9938_command_w(data);
|
||||
v9938_command_w(space->machine, data);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER (v9938_1_command_w)
|
||||
{
|
||||
vdp = &vdps[1];
|
||||
v9938_command_w(data);
|
||||
v9938_command_w(space->machine, data);
|
||||
}
|
||||
|
||||
/***************************************************************************
|
||||
@ -582,7 +581,7 @@ void v9938_reset (int which)
|
||||
vdp->scanline = 0;
|
||||
}
|
||||
|
||||
static void v9938_check_int (void)
|
||||
static void v9938_check_int (running_machine *machine)
|
||||
{
|
||||
UINT8 n;
|
||||
|
||||
@ -605,7 +604,7 @@ static void v9938_check_int (void)
|
||||
** called; because of this Mr. Ghost, Xevious and SD Snatcher don't
|
||||
** run. As a patch it's called every scanline
|
||||
*/
|
||||
vdp->INTCallback (Machine, n);
|
||||
vdp->INTCallback (machine, n);
|
||||
}
|
||||
|
||||
void v9938_set_sprite_limit (int which, int i)
|
||||
@ -634,13 +633,13 @@ void v9938_set_resolution (int which, int i)
|
||||
|
||||
***************************************************************************/
|
||||
|
||||
static void v9938_register_w(UINT8 data)
|
||||
static void v9938_register_w(running_machine *machine, UINT8 data)
|
||||
{
|
||||
int reg;
|
||||
|
||||
reg = vdp->contReg[17] & 0x3f;
|
||||
if (reg != 17)
|
||||
v9938_register_write (reg, data); /* true ? */
|
||||
v9938_register_write (machine, reg, data); /* true ? */
|
||||
|
||||
if (!(vdp->contReg[17] & 0x80))
|
||||
vdp->contReg[17] = (vdp->contReg[17] + 1) & 0x3f;
|
||||
@ -649,16 +648,16 @@ static void v9938_register_w(UINT8 data)
|
||||
WRITE8_HANDLER (v9938_0_register_w)
|
||||
{
|
||||
vdp = &vdps[0];
|
||||
v9938_register_w(data);
|
||||
v9938_register_w(space->machine, data);
|
||||
}
|
||||
|
||||
WRITE8_HANDLER (v9938_1_register_w)
|
||||
{
|
||||
vdp = &vdps[1];
|
||||
v9938_register_w(data);
|
||||
v9938_register_w(space->machine, data);
|
||||
}
|
||||
|
||||
static void v9938_register_write (int reg, int data)
|
||||
static void v9938_register_write (running_machine *machine, int reg, int data)
|
||||
{
|
||||
static UINT8 const reg_mask[] =
|
||||
{
|
||||
@ -689,7 +688,7 @@ static void v9938_register_write (int reg, int data)
|
||||
case 1:
|
||||
vdp->contReg[reg] = data;
|
||||
v9938_set_mode ();
|
||||
v9938_check_int ();
|
||||
v9938_check_int (machine);
|
||||
LOG(("V9938: mode = %s\n", v9938_modes[vdp->mode]));
|
||||
break;
|
||||
|
||||
@ -812,7 +811,7 @@ static void v9938_register_write (int reg, int data)
|
||||
}
|
||||
|
||||
LOG(("V9938: Read %02x from S#%d\n", ret, reg));
|
||||
v9938_check_int ();
|
||||
v9938_check_int (machine);
|
||||
|
||||
return ret;
|
||||
}
|
||||
@ -1212,9 +1211,9 @@ static void v9938_set_mode (void)
|
||||
vdp->mode = i;
|
||||
}
|
||||
|
||||
static void v9938_refresh_16 (bitmap_t *bmp, int line)
|
||||
static void v9938_refresh_16 (running_machine *machine, bitmap_t *bmp, int line)
|
||||
{
|
||||
const pen_t *pens = Machine->pens;
|
||||
const pen_t *pens = machine->pens;
|
||||
int i, double_lines;
|
||||
UINT8 col[256];
|
||||
UINT16 *ln, *ln2 = NULL;
|
||||
@ -1272,7 +1271,7 @@ static void v9938_refresh_16 (bitmap_t *bmp, int line)
|
||||
memcpy (ln2, ln, (512 + 32) * 2);
|
||||
}
|
||||
|
||||
static void v9938_refresh_line (bitmap_t *bmp, int line)
|
||||
static void v9938_refresh_line (running_machine *machine, bitmap_t *bmp, int line)
|
||||
{
|
||||
int ind16, ind256;
|
||||
|
||||
@ -1285,7 +1284,7 @@ static void v9938_refresh_line (bitmap_t *bmp, int line)
|
||||
vdp->pal_ind256[0] = vdp->pal_ind256[vdp->contReg[7]];
|
||||
}
|
||||
|
||||
v9938_refresh_16 (bmp, line);
|
||||
v9938_refresh_16 (machine, bmp, line);
|
||||
|
||||
if ( !(vdp->contReg[8] & 0x20) && (vdp->mode != V9938_MODE_GRAPHIC5) )
|
||||
{
|
||||
@ -1459,7 +1458,7 @@ static void v9938_interrupt_start_vblank (void)
|
||||
vdp->size_now = -1;
|
||||
}
|
||||
|
||||
int v9938_interrupt (int which)
|
||||
int v9938_interrupt (running_machine *machine, int which)
|
||||
{
|
||||
int scanline, max, pal, scanline_start;
|
||||
|
||||
@ -1492,7 +1491,7 @@ int v9938_interrupt (int which)
|
||||
else
|
||||
if ( !(vdp->contReg[0] & 0x10) ) vdp->statReg[1] &= 0xfe;
|
||||
|
||||
v9938_check_int ();
|
||||
v9938_check_int (machine);
|
||||
|
||||
/* check for start of vblank */
|
||||
if ((pal && (vdp->scanline == 310)) ||
|
||||
@ -1504,7 +1503,7 @@ int v9938_interrupt (int which)
|
||||
{
|
||||
scanline = (vdp->scanline - scanline_start) & 255;
|
||||
|
||||
v9938_refresh_line (vdp->bitmap, scanline);
|
||||
v9938_refresh_line (machine, vdp->bitmap, scanline);
|
||||
}
|
||||
|
||||
max = (vdp->contReg[9] & 2) ? 313 : 262;
|
||||
|
@ -16,7 +16,7 @@
|
||||
|
||||
void v9938_init (running_machine *machine, int which, const device_config *screen, bitmap_t *bitmap, int model, int vram_size, void (*callback)(running_machine *, int) );
|
||||
void v9938_reset (int which);
|
||||
int v9938_interrupt (int which);
|
||||
int v9938_interrupt (running_machine *machine, int which);
|
||||
void v9938_set_sprite_limit (int which, int);
|
||||
void v9938_set_resolution (int which, int);
|
||||
int v9938_get_transpen(int which);
|
||||
|
@ -4470,7 +4470,7 @@ static DEVICE_START( voodoo )
|
||||
v->pci.stall_callback = config->stall;
|
||||
|
||||
/* create a multiprocessor work queue */
|
||||
v->poly = poly_alloc(64, sizeof(poly_extra_data), 0);
|
||||
v->poly = poly_alloc(device->machine, 64, sizeof(poly_extra_data), 0);
|
||||
v->thread_stats = auto_malloc(sizeof(v->thread_stats[0]) * WORK_MAX_THREADS);
|
||||
|
||||
/* create a table of precomputed 1/n and log2(n) values */
|
||||
|
@ -242,7 +242,7 @@ static MACHINE_RESET( gaelco3d2 )
|
||||
|
||||
static INTERRUPT_GEN( vblank_gen )
|
||||
{
|
||||
gaelco3d_render();
|
||||
gaelco3d_render(device->machine->primary_screen);
|
||||
cpu_set_input_line(device, 2, ASSERT_LINE);
|
||||
}
|
||||
|
||||
|
@ -224,7 +224,6 @@ Hang Pilot (uses an unknown but similar video board) 12W
|
||||
#include "cpu/sharc/sharc.h"
|
||||
#include "machine/konppc.h"
|
||||
#include "machine/konamiic.h"
|
||||
#include "machine/adc083x.h"
|
||||
#include "sound/rf5c400.h"
|
||||
#include "video/voodoo.h"
|
||||
#include "video/gticlub.h"
|
||||
|
@ -847,24 +847,25 @@ static WRITE32_HANDLER( sound020_w )
|
||||
|
||||
static READ32_HANDLER( adc0834_r )
|
||||
{
|
||||
return adc083x_do_read( 0 ) << 24;
|
||||
return adc083x_do_read( space->machine, 0 ) << 24;
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( adc0834_w )
|
||||
{
|
||||
adc083x_clk_write( 0, ( data >> 24 ) & 1 );
|
||||
adc083x_di_write( 0, ( data >> 25 ) & 1 );
|
||||
adc083x_cs_write( 0, ( data >> 26 ) & 1 );
|
||||
running_machine *machine = space->machine;
|
||||
adc083x_clk_write( machine, 0, ( data >> 24 ) & 1 );
|
||||
adc083x_di_write( machine, 0, ( data >> 25 ) & 1 );
|
||||
adc083x_cs_write( machine, 0, ( data >> 26 ) & 1 );
|
||||
}
|
||||
|
||||
static double adc0834_callback( int input )
|
||||
static double adc0834_callback( running_machine *machine, int input )
|
||||
{
|
||||
switch( input )
|
||||
{
|
||||
case ADC083X_CH0:
|
||||
return ( (double)5 * input_port_read(Machine, "AN0" ) ) / 255; // steer
|
||||
return ( (double)5 * input_port_read(machine, "AN0" ) ) / 255; // steer
|
||||
case ADC083X_CH1:
|
||||
return ( (double)5 * input_port_read(Machine, "AN1" ) ) / 255; // gas
|
||||
return ( (double)5 * input_port_read(machine, "AN1" ) ) / 255; // gas
|
||||
case ADC083X_VREF:
|
||||
return 5;
|
||||
}
|
||||
|
@ -289,37 +289,38 @@ static READ32_HANDLER( mb89371_r )
|
||||
|
||||
static READ32_HANDLER( jamma_r )
|
||||
{
|
||||
running_machine *machine = space->machine;
|
||||
UINT32 data = 0;
|
||||
|
||||
switch (offset)
|
||||
{
|
||||
case 0:
|
||||
data = input_port_read(space->machine, "IN0");
|
||||
data = input_port_read(machine, "IN0");
|
||||
break;
|
||||
case 1:
|
||||
{
|
||||
data = input_port_read(space->machine, "IN1");
|
||||
data = input_port_read(machine, "IN1");
|
||||
data |= 0x000000c0;
|
||||
|
||||
if( has_ds2401[ security_cart_number ] )
|
||||
{
|
||||
data |= ds2401_read( security_cart_number ) << 14;
|
||||
data |= ds2401_read( machine, security_cart_number ) << 14;
|
||||
}
|
||||
|
||||
data |= adc083x_do_read( 0 ) << 16;
|
||||
data |= adc083x_do_read( machine, 0 ) << 16;
|
||||
|
||||
switch( chiptype[ security_cart_number ] )
|
||||
{
|
||||
case 1:
|
||||
data |= x76f041_sda_read( security_cart_number ) << 18;
|
||||
data |= x76f041_sda_read( machine, security_cart_number ) << 18;
|
||||
break;
|
||||
|
||||
case 2:
|
||||
data |= x76f100_sda_read( security_cart_number ) << 18;
|
||||
data |= x76f100_sda_read( machine, security_cart_number ) << 18;
|
||||
break;
|
||||
|
||||
case 3:
|
||||
data |= zs01_sda_read( security_cart_number ) << 18;
|
||||
data |= zs01_sda_read( machine, security_cart_number ) << 18;
|
||||
break;
|
||||
}
|
||||
|
||||
@ -334,33 +335,34 @@ static READ32_HANDLER( jamma_r )
|
||||
break;
|
||||
}
|
||||
case 2:
|
||||
data = input_port_read(space->machine, "IN2");
|
||||
data = input_port_read(machine, "IN2");
|
||||
break;
|
||||
case 3:
|
||||
data = input_port_read(space->machine, "IN3");
|
||||
data = input_port_read(machine, "IN3");
|
||||
break;
|
||||
}
|
||||
|
||||
verboselog( space->machine, 2, "jamma_r( %08x, %08x ) %08x\n", offset, mem_mask, data );
|
||||
verboselog( machine, 2, "jamma_r( %08x, %08x ) %08x\n", offset, mem_mask, data );
|
||||
|
||||
return data;
|
||||
}
|
||||
|
||||
static WRITE32_HANDLER( jamma_w )
|
||||
{
|
||||
verboselog( space->machine, 2, "jamma_w( %08x, %08x, %08x )\n", offset, mem_mask, data );
|
||||
running_machine *machine = space->machine;
|
||||
verboselog( machine, 2, "jamma_w( %08x, %08x, %08x )\n", offset, mem_mask, data );
|
||||
|
||||
switch( offset )
|
||||
{
|
||||
case 0:
|
||||
adc083x_cs_write( 0, ( data >> 1 ) & 1 );
|
||||
adc083x_clk_write( 0, ( data >> 2 ) & 1 );
|
||||
adc083x_di_write( 0, ( data >> 0 ) & 1 );
|
||||
adc083x_se_write( 0, 0 );
|
||||
adc083x_cs_write( machine, 0, ( data >> 1 ) & 1 );
|
||||
adc083x_clk_write( machine, 0, ( data >> 2 ) & 1 );
|
||||
adc083x_di_write( machine, 0, ( data >> 0 ) & 1 );
|
||||
adc083x_se_write( machine, 0, 0 );
|
||||
break;
|
||||
|
||||
default:
|
||||
verboselog( space->machine, 0, "jamma_w: unhandled offset %08x %08x %08x\n", offset, mem_mask, data );
|
||||
verboselog( machine, 0, "jamma_w: unhandled offset %08x %08x %08x\n", offset, mem_mask, data );
|
||||
break;
|
||||
}
|
||||
}
|
||||
@ -386,7 +388,7 @@ static WRITE32_HANDLER( control_w )
|
||||
switch( chiptype[ security_cart_number ] )
|
||||
{
|
||||
case 3:
|
||||
zs01_sda_write( security_cart_number, !( ( control >> 6 ) & 1 ) ); /* 0x40 */
|
||||
zs01_sda_write( space->machine, security_cart_number, !( ( control >> 6 ) & 1 ) ); /* 0x40 */
|
||||
break;
|
||||
}
|
||||
|
||||
@ -975,12 +977,13 @@ static void cdrom_dma_write( UINT32 n_address, INT32 n_size )
|
||||
}
|
||||
|
||||
static UINT32 m_n_security_control;
|
||||
static void (*security_bit7_write)( int data );
|
||||
static void (*security_bit6_write)( int data );
|
||||
static void (*security_bit5_write)( int data );
|
||||
static void (*security_bit7_write)( running_machine *machine, int data );
|
||||
static void (*security_bit6_write)( running_machine *machine, int data );
|
||||
static void (*security_bit5_write)( running_machine *machine, int data );
|
||||
|
||||
static WRITE32_HANDLER( security_w )
|
||||
{
|
||||
running_machine *machine = space->machine;
|
||||
COMBINE_DATA( &m_n_security_control );
|
||||
|
||||
verboselog( space->machine, 2, "security_w( %08x, %08x, %08x )\n", offset, mem_mask, data );
|
||||
@ -990,44 +993,44 @@ static WRITE32_HANDLER( security_w )
|
||||
switch( chiptype[ security_cart_number ] )
|
||||
{
|
||||
case 1:
|
||||
x76f041_sda_write( security_cart_number, ( data >> 0 ) & 1 );
|
||||
x76f041_scl_write( security_cart_number, ( data >> 1 ) & 1 );
|
||||
x76f041_cs_write( security_cart_number, ( data >> 2 ) & 1 );
|
||||
x76f041_rst_write( security_cart_number, ( data >> 3 ) & 1 );
|
||||
x76f041_sda_write( machine, security_cart_number, ( data >> 0 ) & 1 );
|
||||
x76f041_scl_write( machine, security_cart_number, ( data >> 1 ) & 1 );
|
||||
x76f041_cs_write( machine, security_cart_number, ( data >> 2 ) & 1 );
|
||||
x76f041_rst_write( machine, security_cart_number, ( data >> 3 ) & 1 );
|
||||
break;
|
||||
|
||||
case 2:
|
||||
x76f100_sda_write( security_cart_number, ( data >> 0 ) & 1 );
|
||||
x76f100_scl_write( security_cart_number, ( data >> 1 ) & 1 );
|
||||
x76f100_cs_write( security_cart_number, ( data >> 2 ) & 1 );
|
||||
x76f100_rst_write( security_cart_number, ( data >> 3 ) & 1 );
|
||||
x76f100_sda_write( machine, security_cart_number, ( data >> 0 ) & 1 );
|
||||
x76f100_scl_write( machine, security_cart_number, ( data >> 1 ) & 1 );
|
||||
x76f100_cs_write( machine, security_cart_number, ( data >> 2 ) & 1 );
|
||||
x76f100_rst_write( machine, security_cart_number, ( data >> 3 ) & 1 );
|
||||
break;
|
||||
|
||||
case 3:
|
||||
zs01_scl_write( security_cart_number, ( data >> 1 ) & 1 );
|
||||
zs01_cs_write( security_cart_number, ( data >> 2 ) & 1 );
|
||||
zs01_rst_write( security_cart_number, ( data >> 3 ) & 1 );
|
||||
zs01_scl_write( machine, security_cart_number, ( data >> 1 ) & 1 );
|
||||
zs01_cs_write( machine, security_cart_number, ( data >> 2 ) & 1 );
|
||||
zs01_rst_write( machine, security_cart_number, ( data >> 3 ) & 1 );
|
||||
break;
|
||||
}
|
||||
|
||||
if( has_ds2401[ security_cart_number ] )
|
||||
{
|
||||
ds2401_write( security_cart_number, !( ( data >> 4 ) & 1 ) );
|
||||
ds2401_write( machine, security_cart_number, !( ( data >> 4 ) & 1 ) );
|
||||
}
|
||||
|
||||
if( security_bit5_write != NULL )
|
||||
{
|
||||
security_bit5_write( ( data >> 5 ) & 1 );
|
||||
security_bit5_write( machine, ( data >> 5 ) & 1 );
|
||||
}
|
||||
|
||||
if( security_bit6_write != NULL )
|
||||
{
|
||||
security_bit6_write( ( data >> 6 ) & 1 );
|
||||
security_bit6_write( machine, ( data >> 6 ) & 1 );
|
||||
}
|
||||
|
||||
if( security_bit7_write != NULL )
|
||||
{
|
||||
security_bit7_write( ( data >> 7 ) & 1 );
|
||||
security_bit7_write( machine, ( data >> 7 ) & 1 );
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -1378,18 +1381,18 @@ static void flash_init( running_machine *machine )
|
||||
state_save_register_global(machine, control );
|
||||
}
|
||||
|
||||
static double analogue_inputs_callback( int input )
|
||||
static double analogue_inputs_callback( running_machine *machine, int input )
|
||||
{
|
||||
switch( input )
|
||||
{
|
||||
case ADC083X_CH0:
|
||||
return (double) ( input_port_read_safe(Machine, "analog0", 0 ) * 5 ) / 255;
|
||||
return (double) ( input_port_read_safe(machine, "analog0", 0 ) * 5 ) / 255;
|
||||
case ADC083X_CH1:
|
||||
return (double) ( input_port_read_safe(Machine, "analog1", 0 ) * 5 ) / 255;
|
||||
return (double) ( input_port_read_safe(machine, "analog1", 0 ) * 5 ) / 255;
|
||||
case ADC083X_CH2:
|
||||
return (double) ( input_port_read_safe(Machine, "analog2", 0 ) * 5 ) / 255;
|
||||
return (double) ( input_port_read_safe(machine, "analog2", 0 ) * 5 ) / 255;
|
||||
case ADC083X_CH3:
|
||||
return (double) ( input_port_read_safe(Machine, "analog3", 0 ) * 5 ) / 255;
|
||||
return (double) ( input_port_read_safe(machine, "analog3", 0 ) * 5 ) / 255;
|
||||
case ADC083X_AGND:
|
||||
return 0;
|
||||
case ADC083X_VREF:
|
||||
@ -1448,7 +1451,7 @@ static void security_cart_init( running_machine *machine, int cart, const char *
|
||||
break;
|
||||
|
||||
case 0x1014:
|
||||
zs01_init( cart, eeprom_rom, NULL, NULL, ds2401_rom );
|
||||
zs01_init( machine, cart, eeprom_rom, NULL, NULL, ds2401_rom );
|
||||
chiptype[ cart ] = 3;
|
||||
|
||||
switch( cart )
|
||||
@ -2120,7 +2123,7 @@ static READ32_HANDLER( gx894pwbba_r )
|
||||
case 0x3b:
|
||||
if( ACCESSING_BITS_16_31 )
|
||||
{
|
||||
data |= ds2401_read( 2 ) << 28;
|
||||
data |= ds2401_read( space->machine, 2 ) << 28;
|
||||
}
|
||||
break;
|
||||
case 0x3d:
|
||||
@ -2258,7 +2261,7 @@ static WRITE32_HANDLER( gx894pwbba_w )
|
||||
case 0x3b:
|
||||
if( ACCESSING_BITS_16_31 )
|
||||
{
|
||||
ds2401_write( 2, !( ( data >> 28 ) & 1 ) );
|
||||
ds2401_write( space->machine, 2, !( ( data >> 28 ) & 1 ) );
|
||||
}
|
||||
break;
|
||||
case 0x3e:
|
||||
@ -2649,12 +2652,12 @@ static int salarymc_lamp_shift;
|
||||
static int salarymc_lamp_data;
|
||||
static int salarymc_lamp_clk;
|
||||
|
||||
static void salarymc_lamp_data_write( int data )
|
||||
static void salarymc_lamp_data_write( running_machine *machine, int data )
|
||||
{
|
||||
salarymc_lamp_data = data;
|
||||
}
|
||||
|
||||
static void salarymc_lamp_rst_write( int data )
|
||||
static void salarymc_lamp_rst_write( running_machine *machine, int data )
|
||||
{
|
||||
if( data )
|
||||
{
|
||||
@ -2663,7 +2666,7 @@ static void salarymc_lamp_rst_write( int data )
|
||||
}
|
||||
}
|
||||
|
||||
static void salarymc_lamp_clk_write( int data )
|
||||
static void salarymc_lamp_clk_write( running_machine *machine, int data )
|
||||
{
|
||||
if( salarymc_lamp_clk != data )
|
||||
{
|
||||
@ -2683,7 +2686,7 @@ static void salarymc_lamp_clk_write( int data )
|
||||
{
|
||||
if( ( salarymc_lamp_shift & ~0xe38 ) != 0 )
|
||||
{
|
||||
verboselog( Machine, 0, "unknown bits in salarymc_lamp_shift %08x\n", salarymc_lamp_shift & ~0xe38 );
|
||||
verboselog( machine, 0, "unknown bits in salarymc_lamp_shift %08x\n", salarymc_lamp_shift & ~0xe38 );
|
||||
}
|
||||
|
||||
output_set_value( "player 1 red", ( salarymc_lamp_shift >> 11 ) & 1 );
|
||||
|
@ -281,11 +281,11 @@ static INTERRUPT_GEN( meritm_interrupt )
|
||||
{
|
||||
v9938_set_sprite_limit(0, 0);
|
||||
v9938_set_resolution(0, RENDER_HIGH);
|
||||
v9938_interrupt(0);
|
||||
v9938_interrupt(device->machine, 0);
|
||||
|
||||
v9938_set_sprite_limit(1, 0);
|
||||
v9938_set_resolution(1, RENDER_HIGH);
|
||||
v9938_interrupt(1);
|
||||
v9938_interrupt(device->machine, 1);
|
||||
}
|
||||
|
||||
static void meritm_vdp0_interrupt(running_machine *machine, int i)
|
||||
@ -376,20 +376,20 @@ static VIDEO_UPDATE( meritm )
|
||||
static int meritm_bank;
|
||||
static int meritm_psd_a15;
|
||||
|
||||
static void meritm_crt250_switch_banks( void )
|
||||
static void meritm_crt250_switch_banks( running_machine *machine )
|
||||
{
|
||||
int rombank = (meritm_bank & 0x07) ^ 0x07;
|
||||
|
||||
//logerror( "CRT250: Switching banks: rom = %0x (bank = %x)\n", rombank, meritm_bank );
|
||||
memory_set_bank(Machine, 1, rombank );
|
||||
memory_set_bank(machine, 1, rombank );
|
||||
};
|
||||
|
||||
static WRITE8_HANDLER(meritm_crt250_bank_w)
|
||||
{
|
||||
meritm_crt250_switch_banks();
|
||||
meritm_crt250_switch_banks(space->machine);
|
||||
};
|
||||
|
||||
static void meritm_switch_banks( void )
|
||||
static void meritm_switch_banks( running_machine *machine )
|
||||
{
|
||||
int rambank = (meritm_psd_a15 >> 2) & 0x3;
|
||||
int rombank = (((meritm_bank >> 3) & 0x3) << 5) |
|
||||
@ -398,21 +398,21 @@ static void meritm_switch_banks( void )
|
||||
(meritm_psd_a15 & 0x1);
|
||||
|
||||
//logerror( "Switching banks: rom = %0x (bank = %x), ram = %0x\n", rombank, meritm_bank, rambank);
|
||||
memory_set_bank(Machine, 1, rombank );
|
||||
memory_set_bank(Machine, 2, rombank | 0x01);
|
||||
memory_set_bank(Machine, 3, rambank);
|
||||
memory_set_bank(machine, 1, rombank );
|
||||
memory_set_bank(machine, 2, rombank | 0x01);
|
||||
memory_set_bank(machine, 3, rambank);
|
||||
};
|
||||
|
||||
static WRITE8_HANDLER(meritm_psd_a15_w)
|
||||
{
|
||||
meritm_psd_a15 = data;
|
||||
//logerror( "Writing PSD_A15 with %02x at PC=%04X\n", data, cpu_get_pc(space->cpu) );
|
||||
meritm_switch_banks();
|
||||
meritm_switch_banks(space->machine);
|
||||
};
|
||||
|
||||
static WRITE8_HANDLER(meritm_bank_w)
|
||||
{
|
||||
meritm_switch_banks();
|
||||
meritm_switch_banks(space->machine);
|
||||
};
|
||||
|
||||
/*************************************
|
||||
@ -849,7 +849,7 @@ static MACHINE_START(meritm_crt250)
|
||||
{
|
||||
memory_configure_bank(machine, 1, 0, 8, memory_region(machine, "main"), 0x10000);
|
||||
meritm_bank = 0xff;
|
||||
meritm_crt250_switch_banks();
|
||||
meritm_crt250_switch_banks(machine);
|
||||
MACHINE_START_CALL(merit_common);
|
||||
state_save_register_global(machine, meritm_bank);
|
||||
|
||||
@ -870,7 +870,7 @@ static MACHINE_START(meritm_crt260)
|
||||
memory_configure_bank(machine, 3, 0, 4, meritm_ram, 0x2000);
|
||||
meritm_bank = 0xff;
|
||||
meritm_psd_a15 = 0;
|
||||
meritm_switch_banks();
|
||||
meritm_switch_banks(machine);
|
||||
MACHINE_START_CALL(merit_common);
|
||||
pc16552d_init(machine, 0, UART_CLK, NULL, pc16650d_tx_callback);
|
||||
microtouch_init(machine, meritm_microtouch_tx_callback, meritm_touch_coord_transform);
|
||||
|
@ -426,9 +426,9 @@ static WRITE8_HANDLER( peplus_output_bank_c_w )
|
||||
|
||||
static WRITE8_HANDLER(i2c_nvram_w)
|
||||
{
|
||||
i2cmem_write(0, I2CMEM_SCL, BIT(data, 2));
|
||||
i2cmem_write(space->machine, 0, I2CMEM_SCL, BIT(data, 2));
|
||||
sda_dir = BIT(data, 1);
|
||||
i2cmem_write(0, I2CMEM_SDA, BIT(data, 0));
|
||||
i2cmem_write(space->machine, 0, I2CMEM_SDA, BIT(data, 0));
|
||||
}
|
||||
|
||||
|
||||
@ -518,7 +518,7 @@ static READ8_HANDLER( peplus_input_bank_a_r )
|
||||
UINT8 sda = 0;
|
||||
if(!sda_dir)
|
||||
{
|
||||
sda = i2cmem_read(0, I2CMEM_SDA);
|
||||
sda = i2cmem_read(space->machine, 0, I2CMEM_SDA);
|
||||
}
|
||||
|
||||
if ((input_port_read_safe(space->machine, "SENSOR",0x00) & 0x01) == 0x01 && coin_state == 0) {
|
||||
|
@ -212,7 +212,7 @@ static INTERRUPT_GEN( sangho_interrupt )
|
||||
{
|
||||
v9938_set_sprite_limit(0, 0);
|
||||
v9938_set_resolution(0, 2);
|
||||
v9938_interrupt(0);
|
||||
v9938_interrupt(device->machine, 0);
|
||||
}
|
||||
|
||||
|
||||
|
@ -441,7 +441,7 @@ static MACHINE_RESET(sfkick)
|
||||
|
||||
static INTERRUPT_GEN( sfkick_interrupt )
|
||||
{
|
||||
v9938_interrupt(0);
|
||||
v9938_interrupt(device->machine, 0);
|
||||
}
|
||||
static void irqhandler(running_machine *machine, int irq)
|
||||
{
|
||||
|
@ -174,7 +174,6 @@ Check gticlub.c for details on the bottom board.
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "cpu/powerpc/ppc.h"
|
||||
#include "cpu/sharc/sharc.h"
|
||||
#include "sound/k054539.h"
|
||||
@ -299,7 +298,7 @@ static VIDEO_UPDATE( zr107 )
|
||||
|
||||
static CUSTOM_INPUT( adcdo_r )
|
||||
{
|
||||
return adc083x_do_read(0);
|
||||
return adc083x_do_read(field->port->machine, 0);
|
||||
}
|
||||
|
||||
static READ8_HANDLER( sysreg_r )
|
||||
@ -323,7 +322,7 @@ static READ8_HANDLER( sysreg_r )
|
||||
0x20 = SARS (A/D busy flag)
|
||||
0x10 = EEPDO (EEPROM DO)
|
||||
*/
|
||||
r = (adc083x_sars_read(0) << 5) | (eeprom_read_bit() << 4);
|
||||
r = (adc083x_sars_read(space->machine, 0) << 5) | (eeprom_read_bit() << 4);
|
||||
break;
|
||||
|
||||
case 5: /* Parallel data port */
|
||||
@ -382,9 +381,9 @@ static WRITE8_HANDLER( sysreg_w )
|
||||
if (data & 0x40) /* CG Board 0 IRQ Ack */
|
||||
cpu_set_input_line(space->machine->cpu[0], INPUT_LINE_IRQ0, CLEAR_LINE);
|
||||
set_cgboard_id((data >> 4) & 3);
|
||||
adc083x_cs_write(0, (data >> 2) & 1);
|
||||
adc083x_di_write(0, (data >> 1) & 1);
|
||||
adc083x_clk_write(0, (data >> 0) & 1);
|
||||
adc083x_cs_write(space->machine, 0, (data >> 2) & 1);
|
||||
adc083x_di_write(space->machine, 0, (data >> 1) & 1);
|
||||
adc083x_clk_write(space->machine, 0, (data >> 0) & 1);
|
||||
mame_printf_debug("System register 1 = %02X\n", data);
|
||||
break;
|
||||
|
||||
@ -399,16 +398,16 @@ static WRITE8_HANDLER( sysreg_w )
|
||||
}
|
||||
}
|
||||
|
||||
static double adc0838_callback(int input)
|
||||
static double adc0838_callback(running_machine *machine, int input)
|
||||
{
|
||||
switch (input)
|
||||
{
|
||||
case ADC083X_CH0:
|
||||
return (double)(5 * input_port_read(Machine, "ANALOG1")) / 255.0;
|
||||
return (double)(5 * input_port_read(machine, "ANALOG1")) / 255.0;
|
||||
case ADC083X_CH1:
|
||||
return (double)(5 * input_port_read(Machine, "ANALOG2")) / 255.0;
|
||||
return (double)(5 * input_port_read(machine, "ANALOG2")) / 255.0;
|
||||
case ADC083X_CH2:
|
||||
return (double)(5 * input_port_read(Machine, "ANALOG3")) / 255.0;
|
||||
return (double)(5 * input_port_read(machine, "ANALOG3")) / 255.0;
|
||||
case ADC083X_CH3:
|
||||
return 0;
|
||||
case ADC083X_COM:
|
||||
|
@ -14,7 +14,7 @@ extern UINT8 *gaelco3d_texmask;
|
||||
extern offs_t gaelco3d_texture_size;
|
||||
extern offs_t gaelco3d_texmask_size;
|
||||
|
||||
void gaelco3d_render(void);
|
||||
void gaelco3d_render(const device_config *screen);
|
||||
WRITE32_HANDLER( gaelco3d_render_w );
|
||||
|
||||
WRITE16_HANDLER( gaelco3d_paletteram_w );
|
||||
|
@ -1,5 +1,4 @@
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "includes/amiga.h"
|
||||
#include "cdrom.h"
|
||||
#include "coreutil.h"
|
||||
@ -160,18 +159,18 @@ void amiga_akiko_init(running_machine* machine)
|
||||
}
|
||||
}
|
||||
|
||||
static void akiko_nvram_write(UINT32 data)
|
||||
static void akiko_nvram_write(running_machine *machine, UINT32 data)
|
||||
{
|
||||
akiko.i2c_scl_out = BIT(data,31);
|
||||
akiko.i2c_sda_out = BIT(data,30);
|
||||
akiko.i2c_scl_dir = BIT(data,15);
|
||||
akiko.i2c_sda_dir = BIT(data,14);
|
||||
|
||||
i2cmem_write( 0, I2CMEM_SCL, akiko.i2c_scl_out );
|
||||
i2cmem_write( 0, I2CMEM_SDA, akiko.i2c_sda_out );
|
||||
i2cmem_write( machine, 0, I2CMEM_SCL, akiko.i2c_scl_out );
|
||||
i2cmem_write( machine, 0, I2CMEM_SDA, akiko.i2c_sda_out );
|
||||
}
|
||||
|
||||
static UINT32 akiko_nvram_read(void)
|
||||
static UINT32 akiko_nvram_read(running_machine *machine)
|
||||
{
|
||||
UINT32 v = 0;
|
||||
|
||||
@ -190,7 +189,7 @@ static UINT32 akiko_nvram_read(void)
|
||||
}
|
||||
else
|
||||
{
|
||||
v |= i2cmem_read( 0, I2CMEM_SDA ) << 30;
|
||||
v |= i2cmem_read( machine, 0, I2CMEM_SDA ) << 30;
|
||||
}
|
||||
|
||||
v |= akiko.i2c_scl_dir << 15;
|
||||
@ -350,14 +349,14 @@ static UINT8 akiko_cdda_getstatus( UINT32 *lba )
|
||||
return 0x15; /* no audio status */
|
||||
}
|
||||
|
||||
static void akiko_set_cd_status( UINT32 status )
|
||||
static void akiko_set_cd_status( running_machine *machine, UINT32 status )
|
||||
{
|
||||
akiko.cdrom_status[0] |= status;
|
||||
|
||||
if ( akiko.cdrom_status[0] & akiko.cdrom_status[1] )
|
||||
{
|
||||
if (LOG_AKIKO_CD) logerror( "Akiko CD IRQ\n" );
|
||||
amiga_custom_w(cpu_get_address_space(Machine->cpu[0], ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | INTENA_PORTS, 0xffff);
|
||||
amiga_custom_w(cpu_get_address_space(machine->cpu[0], ADDRESS_SPACE_PROGRAM), REG_INTREQ, 0x8000 | INTENA_PORTS, 0xffff);
|
||||
}
|
||||
}
|
||||
|
||||
@ -373,7 +372,7 @@ static TIMER_CALLBACK(akiko_frame_proc)
|
||||
|
||||
if ( s == 0x11 )
|
||||
{
|
||||
akiko_set_cd_status( 0x80000000 ); /* subcode ready */
|
||||
akiko_set_cd_status( machine, 0x80000000 ); /* subcode ready */
|
||||
}
|
||||
|
||||
timer_adjust_oneshot( akiko.frame_timer, ATTOTIME_IN_HZ( 75 ), 0 );
|
||||
@ -477,7 +476,7 @@ static TIMER_CALLBACK(akiko_dma_proc)
|
||||
}
|
||||
|
||||
if ( akiko.cdrom_readreqmask == 0 )
|
||||
akiko_set_cd_status(0x04000000);
|
||||
akiko_set_cd_status(machine, 0x04000000);
|
||||
else
|
||||
timer_adjust_oneshot( akiko.dma_timer, ATTOTIME_IN_USEC( CD_SECTOR_TIME / akiko.cdrom_speed ), 0 );
|
||||
}
|
||||
@ -522,7 +521,7 @@ static void akiko_setup_response( const address_space *space, int len, UINT8 *r1
|
||||
|
||||
akiko.cdrom_cmd_resp = (akiko.cdrom_cmd_resp+len) & 0xff;
|
||||
|
||||
akiko_set_cd_status( 0x10000000 ); /* new data available */
|
||||
akiko_set_cd_status( space->machine, 0x10000000 ); /* new data available */
|
||||
}
|
||||
|
||||
static TIMER_CALLBACK( akiko_cd_delayed_cmd )
|
||||
@ -796,7 +795,7 @@ READ32_HANDLER(amiga_akiko32_r)
|
||||
return retval;
|
||||
|
||||
case 0x30/4: /* NVRAM */
|
||||
return akiko_nvram_read();
|
||||
return akiko_nvram_read(space->machine);
|
||||
|
||||
case 0x38/4: /* C2P */
|
||||
return akiko_c2p_read();
|
||||
@ -871,7 +870,7 @@ WRITE32_HANDLER(amiga_akiko32_w)
|
||||
break;
|
||||
|
||||
case 0x30/4:
|
||||
akiko_nvram_write(data);
|
||||
akiko_nvram_write(space->machine, data);
|
||||
break;
|
||||
|
||||
case 0x38/4:
|
||||
|
@ -224,7 +224,7 @@ READ64_DEVICE_HANDLER( naomibd_r )
|
||||
{
|
||||
UINT64 ret;
|
||||
|
||||
ret = x76f100_sda_read( 0 ) << 15;
|
||||
ret = x76f100_sda_read( device->machine, 0 ) << 15;
|
||||
|
||||
return ret << 32;
|
||||
}
|
||||
@ -273,11 +273,13 @@ WRITE64_DEVICE_HANDLER( naomibd_w )
|
||||
}
|
||||
else if ((offset == 15) && ACCESSING_BITS_0_15)
|
||||
{
|
||||
running_machine *machine = device->machine;
|
||||
|
||||
// NAOMI_BOARDID_WRITE
|
||||
x76f100_cs_write(0, (data >> 2) & 1 );
|
||||
x76f100_rst_write(0, (data >> 3) & 1 );
|
||||
x76f100_scl_write(0, (data >> 1) & 1 );
|
||||
x76f100_sda_write(0, (data >> 0) & 1 );
|
||||
x76f100_cs_write(machine, 0, (data >> 2) & 1 );
|
||||
x76f100_rst_write(machine, 0, (data >> 3) & 1 );
|
||||
x76f100_scl_write(machine, 0, (data >> 1) & 1 );
|
||||
x76f100_sda_write(machine, 0, (data >> 0) & 1 );
|
||||
}
|
||||
else if ((offset == 2) && ACCESSING_BITS_32_63)
|
||||
{
|
||||
|
@ -8,7 +8,6 @@
|
||||
*/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "machine/zs01.h"
|
||||
|
||||
#define VERBOSE_LEVEL ( 0 )
|
||||
@ -67,9 +66,8 @@ static struct zs01_chip zs01[ ZS01_MAXCHIP ];
|
||||
#define STATE_LOAD_COMMAND ( 2 )
|
||||
#define STATE_READ_DATA ( 3 )
|
||||
|
||||
void zs01_init( int chip, UINT8 *data, zs01_write_handler write, zs01_read_handler read, UINT8 *ds2401 )
|
||||
void zs01_init( running_machine *machine, int chip, UINT8 *data, zs01_write_handler write, zs01_read_handler read, UINT8 *ds2401 )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
int offset;
|
||||
struct zs01_chip *c;
|
||||
|
||||
@ -134,9 +132,8 @@ void zs01_init( int chip, UINT8 *data, zs01_write_handler write, zs01_read_handl
|
||||
state_save_register_item_pointer( machine, "zs01", NULL, chip, c->data_key, SIZE_DATA );
|
||||
}
|
||||
|
||||
void zs01_rst_write( int chip, int rst )
|
||||
void zs01_rst_write( running_machine *machine, int chip, int rst )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct zs01_chip *c;
|
||||
|
||||
if( chip >= ZS01_MAXCHIP )
|
||||
@ -161,9 +158,8 @@ void zs01_rst_write( int chip, int rst )
|
||||
c->rst = rst;
|
||||
}
|
||||
|
||||
void zs01_cs_write( int chip, int cs )
|
||||
void zs01_cs_write( running_machine *machine, int chip, int cs )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct zs01_chip *c;
|
||||
|
||||
if( chip >= ZS01_MAXCHIP )
|
||||
@ -391,9 +387,8 @@ static int zs01_data_offset( struct zs01_chip *c )
|
||||
return block * SIZE_DATA_BUFFER;
|
||||
}
|
||||
|
||||
void zs01_scl_write( int chip, int scl )
|
||||
void zs01_scl_write( running_machine *machine, int chip, int scl )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct zs01_chip *c;
|
||||
|
||||
if( chip >= ZS01_MAXCHIP )
|
||||
@ -601,9 +596,8 @@ void zs01_scl_write( int chip, int scl )
|
||||
c->scl = scl;
|
||||
}
|
||||
|
||||
void zs01_sda_write( int chip, int sda )
|
||||
void zs01_sda_write( running_machine *machine, int chip, int sda )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct zs01_chip *c;
|
||||
|
||||
if( chip >= ZS01_MAXCHIP )
|
||||
@ -649,9 +643,8 @@ void zs01_sda_write( int chip, int sda )
|
||||
c->sdaw = sda;
|
||||
}
|
||||
|
||||
int zs01_sda_read( int chip )
|
||||
int zs01_sda_read( running_machine *machine, int chip )
|
||||
{
|
||||
running_machine *machine = Machine;
|
||||
struct zs01_chip *c;
|
||||
|
||||
if( chip >= ZS01_MAXCHIP )
|
||||
|
@ -9,15 +9,15 @@
|
||||
|
||||
#define ZS01_MAXCHIP ( 2 )
|
||||
|
||||
typedef void (*zs01_write_handler)( int pin, int value );
|
||||
typedef int (*zs01_read_handler)( int pin );
|
||||
typedef void (*zs01_write_handler)( running_machine *machine, int pin, int value );
|
||||
typedef int (*zs01_read_handler)( running_machine *machine, int pin );
|
||||
|
||||
extern void zs01_init( int chip, UINT8 *data, zs01_write_handler write, zs01_read_handler read, UINT8 *ds2401 );
|
||||
extern void zs01_cs_write( int chip, int cs );
|
||||
extern void zs01_rst_write( int chip, int rst );
|
||||
extern void zs01_scl_write( int chip, int scl );
|
||||
extern void zs01_sda_write( int chip, int sda );
|
||||
extern int zs01_sda_read( int chip );
|
||||
extern void zs01_init( running_machine *machine, int chip, UINT8 *data, zs01_write_handler write, zs01_read_handler read, UINT8 *ds2401 );
|
||||
extern void zs01_cs_write( running_machine *machine, int chip, int cs );
|
||||
extern void zs01_rst_write( running_machine *machine, int chip, int rst );
|
||||
extern void zs01_scl_write( running_machine *machine, int chip, int scl );
|
||||
extern void zs01_sda_write( running_machine *machine, int chip, int sda );
|
||||
extern int zs01_sda_read( running_machine *machine, int chip );
|
||||
extern NVRAM_HANDLER( zs01_0 );
|
||||
extern NVRAM_HANDLER( zs01_1 );
|
||||
|
||||
|
@ -7,7 +7,6 @@
|
||||
**************************************************************************/
|
||||
|
||||
#include "driver.h"
|
||||
#include "deprecat.h"
|
||||
#include "eminline.h"
|
||||
#include "gaelco3d.h"
|
||||
#include "cpu/tms32031/tms32031.h"
|
||||
@ -77,7 +76,7 @@ VIDEO_START( gaelco3d )
|
||||
{
|
||||
int width, height;
|
||||
|
||||
poly = poly_alloc(2000, sizeof(poly_extra_data), 0);
|
||||
poly = poly_alloc(machine, 2000, sizeof(poly_extra_data), 0);
|
||||
add_exit_callback(machine, gaelco3d_exit);
|
||||
|
||||
screenbits = video_screen_auto_bitmap_alloc(machine->primary_screen);
|
||||
@ -373,15 +372,15 @@ static void render_alphablend(void *destbase, INT32 scanline, const poly_extent
|
||||
*
|
||||
*************************************/
|
||||
|
||||
void gaelco3d_render(void)
|
||||
void gaelco3d_render(const device_config *screen)
|
||||
{
|
||||
/* wait for any queued stuff to complete */
|
||||
poly_wait(poly, "Time to render");
|
||||
|
||||
#if DISPLAY_STATS
|
||||
{
|
||||
int scan = video_screen_get_vpos(machine->primary_screen);
|
||||
popmessage("Polys = %4d Timeleft = %3d", polygons, (lastscan < scan) ? (scan - lastscan) : (scan + (lastscan - video_screen_get_visible_area(Machine->primary_screen)->max_y)));
|
||||
int scan = video_screen_get_vpos(screen);
|
||||
popmessage("Polys = %4d Timeleft = %3d", polygons, (lastscan < scan) ? (scan - lastscan) : (scan + (lastscan - video_screen_get_visible_area(screen)->max_y)));
|
||||
}
|
||||
#endif
|
||||
|
||||
|
@ -53,7 +53,7 @@ VIDEO_START( galastrm )
|
||||
tmpbitmaps = video_screen_auto_bitmap_alloc(machine->primary_screen);
|
||||
polybitmap = video_screen_auto_bitmap_alloc(machine->primary_screen);
|
||||
|
||||
poly = poly_alloc(16, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
poly = poly_alloc(machine, 16, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
add_exit_callback(machine, galastrm_exit);
|
||||
}
|
||||
|
||||
|
@ -222,7 +222,7 @@ void K001005_init(running_machine *machine)
|
||||
|
||||
K001005_3d_fifo = auto_malloc(0x10000 * sizeof(UINT32));
|
||||
|
||||
poly = poly_alloc(4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
poly = poly_alloc(machine, 4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
add_exit_callback(machine, K001005_exit);
|
||||
|
||||
for (i=0; i < 128; i++)
|
||||
|
@ -77,7 +77,7 @@ static void midvunit_exit(running_machine *machine)
|
||||
VIDEO_START( midvunit )
|
||||
{
|
||||
scanline_timer = timer_alloc(machine, scanline_timer_cb, NULL);
|
||||
poly = poly_alloc(4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
poly = poly_alloc(machine, 4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
add_exit_callback(machine, midvunit_exit);
|
||||
|
||||
state_save_register_global_array(machine, video_regs);
|
||||
|
@ -255,7 +255,7 @@ VIDEO_START( midzeus )
|
||||
palette_set_color_rgb(machine, i, pal5bit(i >> 10), pal5bit(i >> 5), pal5bit(i >> 0));
|
||||
|
||||
/* initialize polygon engine */
|
||||
poly = poly_alloc(10000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
poly = poly_alloc(machine, 10000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
|
||||
/* we need to cleanup on exit */
|
||||
add_exit_callback(machine, exit_handler);
|
||||
|
@ -268,7 +268,7 @@ VIDEO_START( midzeus2 )
|
||||
waveram[1] = auto_malloc(WAVERAM1_WIDTH * WAVERAM1_HEIGHT * 12);
|
||||
|
||||
/* initialize polygon engine */
|
||||
poly = poly_alloc(10000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
poly = poly_alloc(machine, 10000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
|
||||
/* we need to cleanup on exit */
|
||||
add_exit_callback(machine, exit_handler);
|
||||
|
@ -2703,7 +2703,7 @@ VIDEO_START(model2)
|
||||
sys24_tile_vh_start(machine, 0x3fff);
|
||||
sys24_bitmap = bitmap_alloc(width, height+4, BITMAP_FORMAT_INDEXED16);
|
||||
|
||||
poly = poly_alloc(4000, sizeof(poly_extra_data), 0);
|
||||
poly = poly_alloc(machine, 4000, sizeof(poly_extra_data), 0);
|
||||
add_exit_callback(machine, model2_exit);
|
||||
|
||||
/* initialize the geometry engine */
|
||||
|
@ -166,7 +166,7 @@ VIDEO_START( model3 )
|
||||
{
|
||||
int width, height;
|
||||
|
||||
poly = poly_alloc(4000, sizeof(poly_extra_data), 0);
|
||||
poly = poly_alloc(machine, 4000, sizeof(poly_extra_data), 0);
|
||||
add_exit_callback(machine, model3_exit);
|
||||
|
||||
width = video_screen_get_width(machine->primary_screen);
|
||||
|
@ -174,7 +174,7 @@ Clamp256( int v )
|
||||
} /* Clamp256 */
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
static void Dump( FILE *f, unsigned addr1, unsigned addr2, const char *name );
|
||||
static void Dump( const address_space *space, FILE *f, unsigned addr1, unsigned addr2, const char *name );
|
||||
#endif
|
||||
|
||||
static struct
|
||||
@ -608,7 +608,7 @@ mydrawgfxzoom(
|
||||
} /* mydrawgfxzoom */
|
||||
|
||||
static void
|
||||
ApplyGamma( bitmap_t *bitmap )
|
||||
ApplyGamma( running_machine *machine, bitmap_t *bitmap )
|
||||
{
|
||||
int x,y;
|
||||
if( mbSuperSystem22 )
|
||||
@ -636,7 +636,7 @@ ApplyGamma( bitmap_t *bitmap )
|
||||
}
|
||||
else
|
||||
{ /* system 22 */
|
||||
const UINT8 *rlut = 0x000+(const UINT8 *)memory_region(Machine, "user1");
|
||||
const UINT8 *rlut = 0x000+(const UINT8 *)memory_region(machine, "user1");
|
||||
const UINT8 *glut = 0x100+rlut;
|
||||
const UINT8 *blut = 0x200+rlut;
|
||||
for( y=0; y<bitmap->height; y++ )
|
||||
@ -2246,9 +2246,9 @@ static VIDEO_START( common )
|
||||
mpPolyH = mpPolyM + mPtRomSize;
|
||||
|
||||
#ifdef RENDER_AS_QUADS
|
||||
poly = poly_alloc(4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
poly = poly_alloc(machine, 4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
#else
|
||||
poly = poly_alloc(4000, sizeof(poly_extra_data), 0);
|
||||
poly = poly_alloc(machine, 4000, sizeof(poly_extra_data), 0);
|
||||
#endif
|
||||
add_reset_callback(machine, namcos22_reset);
|
||||
add_exit_callback(machine, namcos22_exit);
|
||||
@ -2275,14 +2275,14 @@ VIDEO_UPDATE( namcos22s )
|
||||
UINT32 bgColor;
|
||||
UpdateVideoMixer();
|
||||
bgColor = (mixer.rBackColor<<16)|(mixer.gBackColor<<8)|mixer.bBackColor;
|
||||
bitmap_fill( bitmap, cliprect , bgColor);
|
||||
UpdatePaletteS(screen->machine);
|
||||
DrawCharacterLayer(screen->machine, bitmap, cliprect );
|
||||
bitmap_fill( bitmap, cliprect , bgColor);
|
||||
UpdatePaletteS(screen->machine);
|
||||
DrawCharacterLayer(screen->machine, bitmap, cliprect );
|
||||
DrawPolygons( bitmap );
|
||||
DrawSprites( bitmap, cliprect );
|
||||
RenderScene(screen->machine, bitmap );
|
||||
DrawSprites( bitmap, cliprect );
|
||||
RenderScene(screen->machine, bitmap );
|
||||
DrawTranslucentCharacters( bitmap, cliprect );
|
||||
ApplyGamma( bitmap );
|
||||
ApplyGamma( screen->machine, bitmap );
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if( input_code_pressed(KEYCODE_D) )
|
||||
@ -2290,6 +2290,8 @@ VIDEO_UPDATE( namcos22s )
|
||||
FILE *f = fopen( "dump.txt", "wb" );
|
||||
if( f )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(screen->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
{
|
||||
int i,bank;
|
||||
for( bank=0; bank<4; bank++ )
|
||||
@ -2303,16 +2305,16 @@ VIDEO_UPDATE( namcos22s )
|
||||
}
|
||||
}
|
||||
|
||||
Dump(f,0x810000, 0x81000f, "cz attr" );
|
||||
Dump(f,0x820000, 0x8202ff, "unk_ac" );
|
||||
Dump(f,0x824000, 0x8243ff, "gamma");
|
||||
Dump(f,0x828000, 0x83ffff, "palette" );
|
||||
Dump(f,0x8a0000, 0x8a000f, "tilemap_attr");
|
||||
Dump(f,0x880000, 0x89ffff, "cgram/textram");
|
||||
Dump(f,0x900000, 0x90ffff, "vics_data");
|
||||
Dump(f,0x940000, 0x94007f, "vics_control");
|
||||
Dump(f,0x980000, 0x9affff, "sprite374" );
|
||||
Dump(f,0xc00000, 0xc1ffff, "polygonram");
|
||||
Dump(space, f,0x810000, 0x81000f, "cz attr" );
|
||||
Dump(space, f,0x820000, 0x8202ff, "unk_ac" );
|
||||
Dump(space, f,0x824000, 0x8243ff, "gamma");
|
||||
Dump(space, f,0x828000, 0x83ffff, "palette" );
|
||||
Dump(space, f,0x8a0000, 0x8a000f, "tilemap_attr");
|
||||
Dump(space, f,0x880000, 0x89ffff, "cgram/textram");
|
||||
Dump(space, f,0x900000, 0x90ffff, "vics_data");
|
||||
Dump(space, f,0x940000, 0x94007f, "vics_control");
|
||||
Dump(space, f,0x980000, 0x9affff, "sprite374" );
|
||||
Dump(space, f,0xc00000, 0xc1ffff, "polygonram");
|
||||
fclose( f );
|
||||
}
|
||||
while( input_code_pressed(KEYCODE_D) ){}
|
||||
@ -2324,13 +2326,13 @@ VIDEO_UPDATE( namcos22s )
|
||||
VIDEO_UPDATE( namcos22 )
|
||||
{
|
||||
UpdateVideoMixer();
|
||||
bitmap_fill( bitmap, cliprect , get_black_pen(screen->machine));
|
||||
bitmap_fill( bitmap, cliprect , get_black_pen(screen->machine));
|
||||
UpdatePalette(screen->machine);
|
||||
DrawCharacterLayer(screen->machine, bitmap, cliprect );
|
||||
DrawPolygons( bitmap );
|
||||
RenderScene(screen->machine, bitmap);
|
||||
DrawPolygons( bitmap );
|
||||
RenderScene(screen->machine, bitmap);
|
||||
DrawTranslucentCharacters( bitmap, cliprect );
|
||||
ApplyGamma( bitmap );
|
||||
ApplyGamma( screen->machine, bitmap );
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
if( input_code_pressed(KEYCODE_D) )
|
||||
@ -2338,12 +2340,13 @@ VIDEO_UPDATE( namcos22 )
|
||||
FILE *f = fopen( "dump.txt", "wb" );
|
||||
if( f )
|
||||
{
|
||||
// Dump(f,0x90000000, 0x90000003, "led?" );
|
||||
// Dump(f,0x90010000, 0x90017fff, "cz_ram");
|
||||
// Dump(f,0x900a0000, 0x900a000f, "tilemap_attr");
|
||||
Dump(f,0x90020000, 0x90027fff, "gamma");
|
||||
// 0x90020000, 0x90027fff
|
||||
// Dump(f,0x70000000, 0x7001ffff, "polygonram");
|
||||
const address_space *space = cpu_get_address_space(screen->machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
|
||||
// Dump(space, f,0x90000000, 0x90000003, "led?" );
|
||||
// Dump(space, f,0x90010000, 0x90017fff, "cz_ram");
|
||||
// Dump(space, f,0x900a0000, 0x900a000f, "tilemap_attr");
|
||||
Dump(space, f,0x90020000, 0x90027fff, "gamma");
|
||||
// Dump(space, f,0x70000000, 0x7001ffff, "polygonram");
|
||||
fclose( f );
|
||||
}
|
||||
while( input_code_pressed(KEYCODE_D) ){}
|
||||
@ -2409,9 +2412,8 @@ WRITE16_HANDLER( namcos22_dspram16_w )
|
||||
|
||||
#ifdef MAME_DEBUG
|
||||
static void
|
||||
Dump( FILE *f, unsigned addr1, unsigned addr2, const char *name )
|
||||
Dump( const address_space *space, FILE *f, unsigned addr1, unsigned addr2, const char *name )
|
||||
{
|
||||
const address_space *space = cpu_get_address_space(Machine->cpu[0], ADDRESS_SPACE_PROGRAM);
|
||||
unsigned addr;
|
||||
fprintf( f, "%s:\n", name );
|
||||
for( addr=addr1; addr<=addr2; addr+=16 )
|
||||
|
@ -198,7 +198,7 @@ VIDEO_START( taitojc )
|
||||
|
||||
taitojc_char_dirty = 1;
|
||||
|
||||
poly = poly_alloc(4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
poly = poly_alloc(machine, 4000, sizeof(poly_extra_data), POLYFLAG_ALLOW_QUADS);
|
||||
add_exit_callback(machine, taitojc_exit);
|
||||
|
||||
/* find first empty slot to decode gfx */
|
||||
|
Loading…
Reference in New Issue
Block a user