--- hatari/src/includes/video.h 2019/04/01 07:09:16 1.1.1.1 +++ hatari/src/includes/video.h 2019/04/01 07:12:17 1.1.1.5 @@ -1,20 +1,14 @@ /* - Hatari + Hatari - video.h + + This file is distributed under the GNU Public License, version 2 or at + your option any later version. Read the file gpl.txt for details. */ -typedef struct { - unsigned int Address; /* Address we accessed, eg VideoSync(0xff820a) or VideoShifter(0xff8260) */ - unsigned char Byte; /* Byte we wrote */ - int FrameCycles; /* Clock cycles into frame */ -} SYNCSHIFTER_ACCESS; - -typedef struct { - int nCount; /* Number of matching entries - when equal 'nChecks' this table is complete */ - int nChecks; /* Number of address/byte/cycle checks in match table */ - SYNCSHIFTER_ACCESS *pSyncShifterAccess; /* Checks to compare with */ - void *pFunc; /* Handler function to call when table is found to match */ - int Value; /* Value to pass to above function via 'SyncHandler_Value' */ -} SYNCSHIFTER_ACCESS_TABLE; +#ifndef HATARI_VIDEO_H +#define HATARI_VIDEO_H + +#include #define BORDERMASK_NONE 0x0000 /* Borders masks */ #define BORDERMASK_TOP 0x0001 @@ -22,37 +16,56 @@ typedef struct { #define BORDERMASK_LEFT 0x0004 #define BORDERMASK_RIGHT 0x0008 -extern long VideoAddress; -extern unsigned char VideoSyncByte,VideoShifterByte; extern BOOL bUseHighRes; extern int nVBLs,nHBL; -extern int nStartHBL,nEndHBL; +extern int nStartHBL, nEndHBL; extern int OverscanMode; -extern unsigned short int HBLPalettes[(NUM_VISIBLE_LINES+1)*16]; +extern Uint16 HBLPalettes[(NUM_VISIBLE_LINES+1)*16]; +extern Uint16 *pHBLPalettes; extern unsigned long HBLPaletteMasks[NUM_VISIBLE_LINES+1]; -extern unsigned short int *pHBLPalettes; extern unsigned long *pHBLPaletteMasks; -extern unsigned long VideoBase; -extern unsigned long VideoRaster; +extern Uint32 VideoBase; +extern int VBLCounter; +extern int nScreenRefreshRate; extern void Video_Reset(void); extern void Video_MemorySnapShot_Capture(BOOL bSave); extern void Video_ClearOnVBL(void); -extern void Video_CalculateAddress(void); -extern unsigned long Video_ReadAddress(void); extern void Video_InterruptHandler_VBL(void); -extern void Video_InterruptHandler_VBL_Pending(void); extern void Video_InterruptHandler_EndLine(void); extern void Video_InterruptHandler_HBL(void); -extern void Video_SyncHandler_SetLeftRightBorder(void); -extern void Video_SyncHandler_SetSyncScrollOffset(void); -extern void Video_SyncHandler_SetTopBorder(void); -extern void Video_SyncHandler_SetBottomBorder(void); -extern void Video_WriteToShifter(void); -extern void Video_WriteToSync(void); -extern void Video_StoreSyncShifterAccess(unsigned int Address,unsigned char Byte); +extern void Video_WriteToShifter(Uint8 Byte); extern void Video_StartHBL(void); extern void Video_CopyVDIScreen(void); extern void Video_EndHBL(void); extern void Video_SetScreenRasters(void); extern void Video_SetHBLPaletteMaskPointers(void); + +extern void Video_ScreenCounterHigh_ReadByte(void); +extern void Video_ScreenCounterMed_ReadByte(void); +extern void Video_ScreenCounterLow_ReadByte(void); +extern void Video_Sync_ReadByte(void); +extern void Video_BaseLow_ReadByte(void); +extern void Video_LineWidth_ReadByte(void); +extern void Video_ShifterMode_ReadByte(void); + +extern void Video_Sync_WriteByte(void); +extern void Video_Color0_WriteWord(void); +extern void Video_Color1_WriteWord(void); +extern void Video_Color2_WriteWord(void); +extern void Video_Color3_WriteWord(void); +extern void Video_Color4_WriteWord(void); +extern void Video_Color5_WriteWord(void); +extern void Video_Color6_WriteWord(void); +extern void Video_Color7_WriteWord(void); +extern void Video_Color8_WriteWord(void); +extern void Video_Color9_WriteWord(void); +extern void Video_Color10_WriteWord(void); +extern void Video_Color11_WriteWord(void); +extern void Video_Color12_WriteWord(void); +extern void Video_Color13_WriteWord(void); +extern void Video_Color14_WriteWord(void); +extern void Video_Color15_WriteWord(void); +extern void Video_ShifterMode_WriteByte(void); + +#endif /* HATARI_VIDEO_H */