Previous 15994 Revisions Next

r3725 Sunday 30th November, 2008 at 16:14:43 UTC by Nathan Woods
Some deprecat.h removal
[src/mess/devices]z80bin.c z80bin.h
[src/mess/drivers]einstein.c enterp.c exidy.c
[src/mess/includes]svi318.h
[src/mess/machine]svi318.c sym1.c

src/mess/includes/svi318.h
r3724r3725
4343WRITE8_HANDLER( svi318_psg_port_b_w );
4444READ8_HANDLER( svi318_psg_port_a_r );
4545
46int svi318_cassette_present(int id);
46int svi318_cassette_present(running_machine *machine, int id);
4747
4848DEVICE_IMAGE_LOAD( svi318_floppy );
4949
src/mess/machine/svi318.c
r3724r3725
1919#include "formats/svi_cas.h"
2020#include "sound/dac.h"
2121#include "sound/ay8910.h"
22#include "deprecat.h"
2322
2423enum {
2524   SVI_INTERNAL   = 0,
r3724r3725
168167
169168   if (cassette_input(device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" )) > 0.0038)
170169      data |= 0x80;
171   if (!svi318_cassette_present(0))
170   if (!svi318_cassette_present(device->machine, 0))
172171      data |= 0x40;
173172   data |= input_port_read(device->machine, "BUTTONS") & 0x30;
174173
r3724r3725
224223   dac_signed_data_w (0, val);
225224
226225   /* cassette motor on/off */
227   if (svi318_cassette_present(0))
226   if (svi318_cassette_present(device->machine, 0))
228227   {
229228      cassette_change_state(
230229         device_list_find_by_tag( device->machine->config->devicelist, CASSETTE, "cassette" ),
r3724r3725
808807
809808/* Cassette */
810809
811int svi318_cassette_present(int id)
810int svi318_cassette_present(running_machine *machine, int id)
812811{
813   const device_config *img = device_list_find_by_tag( Machine->config->devicelist, CASSETTE, "cassette" );
812   const device_config *img = device_list_find_by_tag( machine->config->devicelist, CASSETTE, "cassette" );
814813
815814   if ( img == NULL )
816815      return FALSE;
src/mess/machine/sym1.c
r3724r3725
1919#include "machine/6532riot.h"
2020#include "machine/74145.h"
2121#include "sound/speaker.h"
22#include "deprecat.h"
2322
2423#define LED_REFRESH_DELAY  ATTOTIME_IN_USEC(70)
2524
r3724r3725
196195 */
197196static WRITE8_HANDLER( sym1_via2_a_w )
198197{
198   const address_space *cpu0space = cpu_get_address_space( space->machine->cpu[0], ADDRESS_SPACE_PROGRAM );
199
199200   logerror("SYM1 VIA2 W 0x%02x\n", data);
200201
201   memory_install_write8_handler(cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0xa600, 0xa67f, 0, 0,
202   memory_install_write8_handler(cpu0space, 0xa600, 0xa67f, 0, 0,
202203      ((input_port_read(space->machine, "WP") & 0x01) && !(data & 0x01)) ? SMH_NOP : SMH_BANK5);
203204
204   memory_install_write8_handler(cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0x0400, 0x07ff, 0, 0,
205   memory_install_write8_handler(cpu0space, 0x0400, 0x07ff, 0, 0,
205206      ((input_port_read(space->machine, "WP") & 0x02) && !(data & 0x02)) ? SMH_NOP : SMH_BANK2);
206207
207   memory_install_write8_handler(cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0x0800, 0x0bff, 0, 0,
208   memory_install_write8_handler(cpu0space, 0x0800, 0x0bff, 0, 0,
208209      ((input_port_read(space->machine, "WP") & 0x04) && !(data & 0x04)) ? SMH_NOP : SMH_BANK3);
209210
210   memory_install_write8_handler(cpu_get_address_space( Machine->cpu[0], ADDRESS_SPACE_PROGRAM ), 0x0c00, 0x0fff, 0, 0,
211   memory_install_write8_handler(cpu0space, 0x0c00, 0x0fff, 0, 0,
211212      ((input_port_read(space->machine, "WP") & 0x08) && !(data & 0x08)) ? SMH_NOP : SMH_BANK4);
212213}
213214
src/mess/devices/z80bin.c
r3724r3725
1010#include "driver.h"
1111#include "z80bin.h"
1212#include "snapquik.h"
13#include "deprecat.h"
1413
1514
1615
r3724r3725
8584         image_seterror(image, IMAGE_ERROR_INVALIDIMAGE, message);
8685         return INIT_FAIL;
8786      }
88      memory_write_byte(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), j, data);
87      memory_write_byte(cputag_get_address_space(image->machine,"main",ADDRESS_SPACE_PROGRAM), j, data);
8988   }
9089
9190   return INIT_PASS;
r3724r3725
118117      /* start program */
119118      if (config->execute != NULL)
120119      {
121         (*config->execute)(start_addr, end_addr, exec_addr, autorun);
120         (*config->execute)(image->machine, start_addr, end_addr, exec_addr, autorun);
122121      }
123122      else
124123      {
125124         if (autorun)
126            cpu_set_reg(cputag_get_cpu(Machine, "main"), REG_PC, exec_addr);   
125            cpu_set_reg(cputag_get_cpu(image->machine, "main"), REG_PC, exec_addr);   
127126      }
128127   }
129128
src/mess/devices/z80bin.h
r3724r3725
2121#define Z80BIN   DEVICE_GET_INFO_NAME(z80bin)
2222
2323#define Z80BIN_EXECUTE_NAME(name)   z80bin_execute_##name
24#define Z80BIN_EXECUTE(name)      void Z80BIN_EXECUTE_NAME(name)(UINT16 start_address, UINT16 end_address, UINT16 execute_address, int autorun)
24#define Z80BIN_EXECUTE(name)      void Z80BIN_EXECUTE_NAME(name)(running_machine *machine, UINT16 start_address, UINT16 end_address, UINT16 execute_address, int autorun)
2525
2626#define z80bin_execute_default      NULL
2727
r3724r3725
3131    TYPE DEFINITIONS
3232***************************************************************************/
3333
34typedef void (*z80bin_execute_func)(UINT16 start_address, UINT16 end_address, UINT16 execute_address, int autorun);
34typedef void (*z80bin_execute_func)(running_machine *machine, UINT16 start_address, UINT16 end_address, UINT16 execute_address, int autorun);
3535
3636typedef struct _z80bin_config z80bin_config;
3737struct _z80bin_config
src/mess/drivers/exidy.c
r3724r3725
148148#include "devices/z80bin.h"
149149#include "sound/speaker.h"
150150#include "machine/ay31015.h"
151#include "deprecat.h"
152151
153152
154153static const device_config *exidy_ay31015;
r3724r3725
348347
349348static MACHINE_RESET( exidyd )
350349{
350   const address_space *space = cputag_get_address_space(machine, "main", ADDRESS_SPACE_PROGRAM);
351
351352   /* Initialize cassette interface */
352353   cass_data.output.length = 0;
353354   cass_data.output.level = 1;
r3724r3725
359360   centronics_config(0, exidy_cent_config);
360361   /* assumption: select is tied low */
361362   centronics_write_handshake(0, CENTRONICS_SELECT | CENTRONICS_NO_RESET, CENTRONICS_SELECT| CENTRONICS_NO_RESET);
362   exidy_fe_port_w(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0, 0);
363   exidy_fe_port_w(space, 0, 0);
363364
364365   timer_set(ATTOTIME_IN_USEC(10), NULL, 0, exidy_reset);
365366   memory_set_bank(machine, 1, 1);
r3724r3725
873874
874875static Z80BIN_EXECUTE( exidy )
875876{
876   if ((execute_address >= 0xc000) && (execute_address <= 0xdfff) && (memory_read_byte(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0xdffa) != 0xc3))
877   const address_space *space = cputag_get_address_space(machine, "main", ADDRESS_SPACE_PROGRAM);
878
879   if ((execute_address >= 0xc000) && (execute_address <= 0xdfff) && (memory_read_byte(space, 0xdffa) != 0xc3))
877880      return;               /* can't run a program if the cartridge isn't in */
878881
879882   /* Since Exidy Basic is by Microsoft, it needs some preprocessing before it can be run.
r3724r3725
893896         0xc3, 0x89, 0xc6,};   // JP C689   ;run program
894897
895898      for (i = 0; i < ARRAY_LENGTH(data); i++)
896         memory_write_byte(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0xf01f + i, data[i]);
899         memory_write_byte(space, 0xf01f + i, data[i]);
897900
898901      if (!autorun)
899         memory_write_word_16le(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0xf028,0xc3dd);
902         memory_write_word_16le(space, 0xf028,0xc3dd);
900903
901904      /* tell BASIC where program ends */
902      memory_write_byte(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0x1b7, (end_address >> 0) & 0xff);
903      memory_write_byte(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0x1b8, (end_address >> 8) & 0xff);
905      memory_write_byte(space, 0x1b7, (end_address >> 0) & 0xff);
906      memory_write_byte(space, 0x1b8, (end_address >> 8) & 0xff);
904907
905908      if ((execute_address != 0xc858) && autorun)
906         memory_write_word_16le(cputag_get_address_space(Machine,"main",ADDRESS_SPACE_PROGRAM), 0xf028, execute_address);
909         memory_write_word_16le(space, 0xf028, execute_address);
907910
908      cpu_set_reg(cputag_get_cpu(Machine, "main"), REG_PC, 0xf01f);
911      cpu_set_reg(cputag_get_cpu(machine, "main"), REG_PC, 0xf01f);
909912   }
910913   else
911914   {
912915      if (autorun)
913         cpu_set_reg(cputag_get_cpu(Machine, "main"), REG_PC, execute_address);
916         cpu_set_reg(cputag_get_cpu(machine, "main"), REG_PC, execute_address);
914917   }
915918}
916919
src/mess/drivers/enterp.c
r3724r3725
1616 ******************************************************************************/
1717
1818#include "driver.h"
19#include "deprecat.h"
2019#include "audio/dave.h"
2120#include "includes/enterp.h"
2221#include "video/epnick.h"
r3724r3725
157156static void enterprise_dave_interrupt(running_machine *machine, int state)
158157{
159158   if (state)
160      cpu_set_input_line(Machine->cpu[0],0,HOLD_LINE);
159      cpu_set_input_line(machine->cpu[0],0,HOLD_LINE);
161160   else
162      cpu_set_input_line(Machine->cpu[0],0,CLEAR_LINE);
161      cpu_set_input_line(machine->cpu[0],0,CLEAR_LINE);
163162}
164163
165164/* enterprise interface to dave - ok, so Dave chip is unique
src/mess/drivers/einstein.c
r3724r3725
7979/* 7e = 0, read from fe, 7e = 1, read from fe */
8080
8181#include "driver.h"
82#include "deprecat.h"
8382#include "machine/z80ctc.h"
8483#include "machine/z80pio.h"
8584#include "machine/z80sio.h"

Previous 15994 Revisions Next


© 1998-2018 The MESS Team