Previous 15994 Revisions Next

r2289 Sunday 6th April, 2008 at 02:45:33 UTC by Firewave
Machine -> machine cleanups
[src/mess/drivers]ti990_10.c ti990_4.c
[src/mess/machine]mz700.c sms.c ti990.c ti990.h vc20.c
[src/mess/video]amstrad.c

src/mess/video/amstrad.c
r2288r2289
4444static int amstrad_plus_split_address;
4545static int amstrad_screen_width;  // width in bytes
4646
47static void amstrad_plus_handle_dma(void);
47static void amstrad_plus_handle_dma(running_machine *machine);
4848
4949extern int aleste_mode;
5050
r2288r2289
9769764020h    STOP    Stop processing the sound list.
977977*/
978978
979static void amstrad_plus_dma_parse(int channel, int *addr)
979static void amstrad_plus_dma_parse(running_machine *machine, int channel, int *addr)
980980{
981981   unsigned short command;
982   running_machine *machine = Machine;
983982
984983   if(*addr & 0x01)
985984      (*addr)++;  // align to even address
r2288r2289
10441043   (*addr)+=2;  // point to next DMA instruction
10451044}
10461045
1047static void amstrad_plus_handle_dma()
1046static void amstrad_plus_handle_dma(running_machine *machine)
10481047{
10491048   if(amstrad_plus_dma_status & 0x01)  // DMA channel 0
1050      amstrad_plus_dma_parse(0,&amstrad_plus_dma_0_addr);
1049      amstrad_plus_dma_parse(machine,0,&amstrad_plus_dma_0_addr);
10511050
10521051   if(amstrad_plus_dma_status & 0x02)  // DMA channel 1
1053      amstrad_plus_dma_parse(1,&amstrad_plus_dma_1_addr);
1052      amstrad_plus_dma_parse(machine,1,&amstrad_plus_dma_1_addr);
10541053
10551054   if(amstrad_plus_dma_status & 0x04)  // DMA channel 2
1056      amstrad_plus_dma_parse(2,&amstrad_plus_dma_2_addr);
1055      amstrad_plus_dma_parse(machine,2,&amstrad_plus_dma_2_addr);
10571056}
10581057
10591058/************************************************************************
r2288r2289
12111210            border_counter = 1;  // border extended to cover garbage data from using the soft scroll functions
12121211         }
12131212         // CPC+/GX4000 DMA channels
1214         amstrad_plus_handle_dma();  // a DMA command is handled at the leading edge of HSYNC (every 64us)
1213         amstrad_plus_handle_dma(machine);  // a DMA command is handled at the leading edge of HSYNC (every 64us)
12151214      }
12161215   }
12171216   amstrad_CRTC_HS = data;
src/mess/machine/mz700.c
r2288r2289
1111
1212/* Core includes */
1313#include "driver.h"
14#include "deprecat.h"
1514#include "includes/mz700.h"
1615
1716/* Components */
r2288r2289
124123{
125124   /* INTMSK: interrupt enabled? */
126125    if (pio_port_c_output & 0x04)
127      cpunum_set_input_line(Machine, 0, 0, HOLD_LINE);
126      cpunum_set_input_line(device->machine, 0, 0, HOLD_LINE);
128127}
129128
130129/************************ PIO ************************************************/
src/mess/machine/ti990.c
r2288r2289
8282   cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, CLEAR_LINE);
8383}
8484
85void ti990_hold_load(void)
85void ti990_hold_load(running_machine *machine)
8686{
87   cpunum_set_input_line(Machine, 0, INPUT_LINE_NMI, ASSERT_LINE);
87   cpunum_set_input_line(machine, 0, INPUT_LINE_NMI, ASSERT_LINE);
8888   timer_set(ATTOTIME_IN_MSEC(100), NULL, 0, clear_load);
8989}
9090
src/mess/machine/ti990.h
r2288r2289
1212void ti990_set_int10(int state);
1313void ti990_set_int13(int state);
1414
15void ti990_hold_load(void);
15void ti990_hold_load(running_machine *machine);
1616
1717 READ8_HANDLER ( ti990_panel_read );
1818WRITE8_HANDLER ( ti990_panel_write );
src/mess/machine/vc20.c
r2288r2289
685685   }
686686
687687   logerror("loading rom %s at %.4x size:%.4x\n",image_filename(image), addr, size);
688   read_ = image_fread(image, new_memory_region( Machine, REGION_USER1, ( size & 0x1FFF ) ? ( size + 0x2000 ) : size, 0 ), size);
688   read_ = image_fread(image, new_memory_region( image->machine, REGION_USER1, ( size & 0x1FFF ) ? ( size + 0x2000 ) : size, 0 ), size);
689689   if (read_ != size)
690690      return 1;
691691
src/mess/machine/sms.c
r2288r2289
11#include "driver.h"
2#include "deprecat.h"
32#include "image.h"
43#include "includes/sms.h"
54#include "video/smsvdp.h"
r2288r2289
737736}
738737
739738DEVICE_START( sms_cart ) {
740   running_machine *machine = Machine;
739   running_machine *machine = device->machine;
741740   int i;
742741
743742   for ( i = 0; i < MAX_CARTRIDGES; i++ ) {
r2288r2289
764763
765764DEVICE_IMAGE_LOAD( sms_cart )
766765{
767   running_machine *machine = Machine;
766   running_machine *machine = image->machine;
768767   int size = image_length(image);
769768   int index = image_index_in_device( image );
770769   const char *fname = image_filename( image );
src/mess/drivers/ti990_4.c
r2288r2289
4848
4949static MACHINE_RESET(ti990_4)
5050{
51   ti990_hold_load();
51   ti990_hold_load(machine);
5252
5353   ti990_reset_int();
5454
r2288r2289
9595static WRITE8_HANDLER ( lrex_callback )
9696{
9797   /* right??? */
98   ti990_hold_load();
98   ti990_hold_load(machine);
9999}
100100
101101#if VIDEO_911
src/mess/drivers/ti990_10.c
r2288r2289
6868*/
6969
7070#include "driver.h"
71#include "deprecat.h"
7172#include "cpu/tms9900/tms9900.h"
7273#include "machine/ti990.h"
7374#include "machine/990_hd.h"
r2288r2289
7677
7778static MACHINE_RESET( ti990_10 )
7879{
79   ti990_hold_load();
80   ti990_hold_load(machine);
8081
8182   ti990_reset_int();
8283
r2288r2289
108109static void lrex_callback(void)
109110{
110111   /* right??? */
111   ti990_hold_load();
112   ti990_hold_load(Machine);
112113}
113114
114115/*

Previous 15994 Revisions Next


© 1998-2018 The MESS Team