Previous 15994 Revisions Next

r3915 Saturday 20th December, 2008 at 16:09:13 UTC by Firewave
Removed depretcat.h from video/dgn_beta.c (but added to video/m6845.c)
[src/mess/drivers]einstein.c
[src/mess/includes]dgn_beta.h
[src/mess/machine]dgn_beta.c
[src/mess/video]amstrad.c bbc.c dgn_beta.c m6845.c m6845.h

src/mess/video/dgn_beta.c
r3914r3915
8080*/
8181
8282#include "driver.h"
83#include "deprecat.h"
8483#include "includes/dgn_beta.h"
8584#include "video/m6845.h"
8685
r3914r3915
133132
134133/* Debugging commands and handlers. */
135134static void execute_beta_vid_log(running_machine *machine, int ref, int params, const char *param[]);
136static void RegLog(int offset, int data);
135static void RegLog(running_machine *machine, int offset, int data);
137136static void execute_beta_vid_fill(running_machine *machine, int ref, int params, const char *param[]);
138137static void execute_beta_vid_box(running_machine *machine, int ref, int params, const char *param[]);
139138static void execute_beta_vid(running_machine *machine, int ref, int params, const char *param[]);
r3914r3915
152151
153152static void beta_Set_RA(int offset, int data);
154153static void beta_Set_HSync(running_machine *machine, int offset, int data);
155static void beta_Set_VSync(int offset, int data);
154static void beta_Set_VSync(running_machine *machine, int offset, int data);
156155static void beta_Set_DE(int offset, int data);
157156
158157static const struct m6845_interface beta_m6845_interface = {
r3914r3915
217216/* 6821-I28, this allows the 6845 to access the full 64K address range, however    */
218217/* since the ram data is addressed as a 16bit wide unit, this allows the 6845      */
219218/* access to the first 128K or ram.                                                */
220void vid_set_gctrl(int data)
219void vid_set_gctrl(running_machine *machine, int data)
221220{
222221   GCtrl=data;
223222   if (LogRegWrites)
224      debug_console_printf(Machine, "I28-PB=$%2X, %2X-%s-%s-%s-%s-%s-%s PC=%4X\n",
223      debug_console_printf(machine, "I28-PB=$%2X, %2X-%s-%s-%s-%s-%s-%s PC=%4X\n",
225224                 data,
226225                 data & GCtrlAddrLines,
227226                 data & GCtrlFS       ? "FS" : "  ",
r3914r3915
230229                 data & GCtrlHiLo      ? "Hi" : "Lo",
231230                 data & GCtrlSWChar      ? "C0" : "C1",
232231                 data & GCtrlWI      ? "Wi" : "  ",
233                 cpu_get_pc( Machine->cpu[0] ));
232                 cpu_get_pc( machine->cpu[0] ));
234233}
235234
236235// called when the 6845 changes the character row
r3914r3915
268267}
269268
270269// called when the 6845 changes the VSync
271static void beta_Set_VSync(int offset, int data)
270static void beta_Set_VSync(running_machine *machine, int offset, int data)
272271{
273272   beta_VSync=data;
274273   if (!beta_VSync)
r3914r3915
294293      VSyncMin=beta_scr_y;
295294   }
296295
297   dgn_beta_frame_interrupt(Machine, data);
296   dgn_beta_frame_interrupt(machine, data);
298297}
299298
300299static void beta_Set_DE(int offset, int data)
r3914r3915
710709      VidAddr=data;            /* Record reg being written to */
711710   }
712711   if (LogRegWrites)
713      RegLog(offset,data);
712      RegLog(space->machine, offset,data);
714713}
715714
716715/* Write handler for colour, pallate ram */
r3914r3915
733732}
734733
735734
736static void RegLog(int offset, int data)
735static void RegLog(running_machine *machine, int offset, int data)
737736{
738737   char   RegName[16];
739738
r3914r3915
758757   }
759758
760759   if(offset&0x1)
761      debug_console_printf(Machine, "6845 write Reg %s Addr=%3d Data=%3d ($%2.2X) \n",RegName,VidAddr,data,data);
760      debug_console_printf(machine, "6845 write Reg %s Addr=%3d Data=%3d ($%2.2X) \n",RegName,VidAddr,data,data);
762761}
763762
764763static void execute_beta_vid_fill(running_machine *machine, int ref, int params, const char *param[])
src/mess/video/amstrad.c
r3914r3915
12121212}
12131213
12141214/* CRTC - Set new Vertical Sync Status*/
1215static void amstrad_Set_VS(int offset, int data)
1215static void amstrad_Set_VS(running_machine *machine, int offset, int data)
12161216{
12171217/* New CRTC_VSync */
12181218//  if (((amstrad_CRTC_VS^data) != 0)&&(data != 0)) {
src/mess/video/m6845.c
r3914r3915
99 ************************************************************************/
1010
1111#include "driver.h"
12#include "deprecat.h"
1213#include "video/m6845.h"
1314
1415#define True 1
r3914r3915
485486         if (crtc.Character_Row_Counter==R7_vertical_sync_position)
486487         {
487488            crtc.VSYNC=True;
488            if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(0,crtc.VSYNC); /* call VS update */
489            if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(machine, 0,crtc.VSYNC); /* call VS update */
489490         }
490491
491492
r3914r3915
499500                        {
500501                                crtc.Vertical_Sync_Width_Counter=0;
501502                                crtc.VSYNC=False;
502                                if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(0,crtc.VSYNC); /* call VS update */
503                                if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(machine, 0,crtc.VSYNC); /* call VS update */
503504                        }
504505                }
505506
r3914r3915
525526            if (crtc.Character_Row_Counter==R7_vertical_sync_position)
526527            {
527528               crtc.VSYNC=True;
528               if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(0,crtc.VSYNC); /* call VS update */
529               if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(machine,0,crtc.VSYNC); /* call VS update */
529530            }
530531         }
531532      }
r3914r3915
837838   crtc.VSYNC = 0;
838839
839840   /* call function to let emulation "know" */
840   if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(0,crtc.VSYNC); /* call VS update */
841   if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(Machine,0,crtc.VSYNC); /* call VS update */
841842
842843
843844   /* if we got to here the vsync has just ended */
r3914r3915
857858   crtc.VSYNC = 1;
858859
859860   /* call function to let emulation "know" */
860   if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(0,crtc.VSYNC); /* call VS update */
861   if (crct6845_calls.out_VS_func) (crct6845_calls.out_VS_func)(Machine,0,crtc.VSYNC); /* call VS update */
861862
862863
863864   /* if we got to here the vsync has just been set, and has just started */
src/mess/video/m6845.h
r3914r3915
2424   void (*out_MA_func)(int offset, int data);
2525   void (*out_RA_func)(int offset, int data);
2626   void (*out_HS_func)(running_machine *machine, int offset, int data);
27   void (*out_VS_func)(int offset, int data);
27   void (*out_VS_func)(running_machine *machine, int offset, int data);
2828   void (*out_DE_func)(int offset, int data);
2929   void (*out_CR_func)(int offset, int data);
3030   void (*out_CRE_func)(int offset, int data);
src/mess/video/bbc.c
r3914r3915
484484}
485485
486486// called when the 6845 changes the VSync
487static void BBC_Set_VSync(int offset, int data)
487static void BBC_Set_VSync(running_machine *machine, int offset, int data)
488488{
489489   // catch the falling edge
490490   if ((!data)&&(BBC_VSync))
src/mess/includes/dgn_beta.h
r3914r3915
104104/* mc6845 video display generator */
105105void init_video(running_machine *machine);
106106extern VIDEO_UPDATE( dgnbeta );
107void vid_set_gctrl(int data);
107void vid_set_gctrl(running_machine *machine, int data);
108108
109109/* 74HC670 4x4bit colour ram */
110110WRITE8_HANDLER(colour_ram_w);
src/mess/machine/dgn_beta.c
r3914r3915
822822static WRITE8_HANDLER(d_pia2_pb_w)
823823{
824824   /* Update top video address lines */
825   vid_set_gctrl(data);
825   vid_set_gctrl(space->machine, data);
826826}
827827
828828static void d_pia2_irq_a(running_machine *machine, int state)
src/mess/drivers/einstein.c
r3914r3915
203203//}
204204//
205205//// called when the 6845 changes the VSync
206//static void Einstein_Set_VSync(int offset, int data)
206//static void Einstein_Set_VSync(running_machine *machine, int offset, int data)
207207//{
208208//  Einstein_VSync=data;
209209//  if (!Einstein_VSync)

Previous 15994 Revisions Next


© 1998-2018 The MESS Team