Previous 15994 Revisions Next

r2778 Saturday 31st May, 2008 at 00:36:50 UTC by Nathan Woods
More running_machine* parameters
[src/mess/machine]hp48.c odyssey2.c
[src/mess/video]dgn_beta.c intv.c

src/mess/video/dgn_beta.c
r2777r2778
400400   }
401401}
402402
403static void beta_plot_char_line(int x,int y, bitmap_t *bitmap)
403static void beta_plot_char_line(running_machine *machine, int x,int y, bitmap_t *bitmap)
404404{
405405   int CharsPerLine   = m6845_get_register(H_DISPLAYED);   // Get chars per line.
406406   unsigned char *data    = memory_region(REGION_GFX1);      // ptr to char rom
r2777r2778
682682         if ((beta_scr_x>=0) && (beta_scr_x<699) && (beta_scr_y>=0) && (beta_scr_y<549))
683683         {
684684            if(IsTextMode)
685               beta_plot_char_line(beta_scr_x, beta_scr_y, bitmap);
685               beta_plot_char_line(screen->machine, beta_scr_x, beta_scr_y, bitmap);
686686            else
687687               beta_plot_gfx_line(beta_scr_x, beta_scr_y, bitmap);
688688         }
src/mess/video/intv.c
r2777r2778
122122    }
123123}
124124
125static void render_sprites(void)
125static void render_sprites(running_machine *machine)
126126{
127127    INT32 cardMemoryLocation, pixelSize;
128128    INT32 spritePixelHeight;
r2777r2778
710710      // Render the background
711711      render_background(machine, tmpbitmap);
712712      // Render the sprites into their buffers
713      render_sprites();
713      render_sprites(machine);
714714      for (i = 0; i < 8; i++) intv_sprite[i].collision = 0;
715715      // Copy the sprites to the background
716716      copy_sprites_to_background(machine, tmpbitmap);
src/mess/machine/hp48.c
r2777r2778
6767} hp48_banks[129];
6868
6969// to do support weired comparator settings
70static void hp48_config(void)
70static void hp48_config(running_machine *machine)
7171{
7272   static const read8_machine_func read_handlers[11] = { 0, SMH_BANK1, SMH_BANK2, SMH_BANK3, SMH_BANK4, SMH_BANK5, SMH_BANK6, SMH_BANK7, SMH_BANK8, SMH_BANK9, SMH_BANK10 };
7373   int i, begin_bank, end_bank, begin, end, mem_type, bank;
r2777r2778
181181   for (i=0; i+1< sizeof(hp48s.mem)/sizeof(hp48s.mem[0]); i++) {
182182      hp48s.mem[i].adr=-1;
183183   }
184   hp48_config();
184   hp48_config(machine);
185185}
186186
187187void hp48_mem_config(running_machine *machine, int v)
r2777r2778
190190   if (hp48s.mem[HDW].adr==-1) {
191191      logerror("Configuring HDW at %06X\n", v );
192192      hp48s.mem[HDW].adr=v;
193      hp48_config();
193      hp48_config(machine);
194194   } else if (hp48s.mem[RAM].adr==-1) {
195195      if (hp48s.state==0) {
196196         v = 0x100000 - v;
r2777r2778
201201         logerror("Configuring RAM at %06X\n", v );
202202         hp48s.mem[RAM].adr=v;
203203         hp48s.state=0;
204         hp48_config();
204         hp48_config(machine);
205205      }
206206   } else if (hp48s.mem[CARD1].adr==-1) {
207207      if (hp48s.state==0) {
r2777r2778
212212         logerror("Configuring CARD1 at %06X\n", v );
213213         hp48s.mem[CARD1].adr=v;
214214         hp48s.state=0;
215         hp48_config();
215         hp48_config(machine);
216216      }
217217   } else if (hp48s.mem[CARD2].adr==-1) {
218218      if (hp48s.state==0) {
r2777r2778
223223         logerror("Configuring CARD2 at %06X\n", v );
224224         hp48s.mem[CARD2].adr=v;
225225         hp48s.state=0;
226         hp48_config();
226         hp48_config(machine);
227227      }
228228   }
229229}
r2777r2778
235235      if (hp48s.mem[i].adr==v) {
236236         hp48s.mem[i].adr=-1;
237237         hp48s.state=0;
238         hp48_config();
238         hp48_config(machine);
239239         break;
240240      }
241241   }
src/mess/machine/odyssey2.c
r2777r2778
1717static UINT8 p1, p2;
1818static size_t   cart_size;
1919
20static void odyssey2_switch_banks(void) {
20static void odyssey2_switch_banks(running_machine *machine)
21{
2122   switch ( cart_size ) {
2223   case 12288:
2324      /* 12KB cart support (for instance, KTAA as released) */
r2777r2778
5960
6061MACHINE_RESET( odyssey2 )
6162{
62    /* jump to "last" bank, will work for all sizes due to being mirrored */
63    p1 = 0xFF;
64    p2 = 0xFF;
65   odyssey2_switch_banks();
66    return;
63   /* jump to "last" bank, will work for all sizes due to being mirrored */
64   p1 = 0xFF;
65   p2 = 0xFF;
66   odyssey2_switch_banks(machine);
6767}
6868
6969/****** External RAM ******************************/
r2777r2778
127127
128128READ8_HANDLER( odyssey2_getp1 )
129129{
130    UINT8 data = p1;
130   UINT8 data = p1;
131131
132    logerror("%.9f p1 read %.2x\n", attotime_to_double(timer_get_time()), data);
133    return data;
132   logerror("%.9f p1 read %.2x\n", attotime_to_double(timer_get_time()), data);
133   return data;
134134}
135135
136136WRITE8_HANDLER( odyssey2_putp1 )
137137{
138    p1 = data;
138   p1 = data;
139139
140   odyssey2_switch_banks();
140   odyssey2_switch_banks(machine);
141141
142142   odyssey2_lum_w ( machine, 0, p1 >> 7 );
143143
144    logerror("%.6f p1 written %.2x\n", attotime_to_double(timer_get_time()), data);
144   logerror("%.6f p1 written %.2x\n", attotime_to_double(timer_get_time()), data);
145145}
146146
147147READ8_HANDLER( odyssey2_getp2 )

Previous 15994 Revisions Next


© 1998-2018 The MESS Team