File:  [Tom Morton FrontierVM] / frontvm / m68000.h
Revision 1.1: download - view: text, annotated - select for diffs
Tue Apr 24 17:57:18 2018 UTC (21 months ago) by root
CVS tags: MAIN, HEAD
Initial revision

#ifndef _M68K_H
#define _M68K_H

typedef unsigned int u32;
typedef unsigned short u16;
typedef unsigned char u8;
typedef signed int s32;
typedef signed short s16;
typedef signed char s8;

typedef void (*HOSTCALL) ();
extern HOSTCALL hcalls [];

extern char *STRam;
extern int line_no;

extern int Init680x0 ();
extern void Start680x0 ();
extern void FlagException (int num);
extern int GetReg (int reg);
extern void SetReg (int reg, int val);
extern unsigned int exception_handlers[32];

#define STMemory_ReadByte	MemReadByte
#define STMemory_ReadWord	MemReadWord
#define STMemory_ReadLong	MemReadLong
#define STMemory_WriteByte	MemWriteByte
#define STMemory_WriteWord	MemWriteWord
#define STMemory_WriteLong	MemWriteLong

#define STRAM_ADDR(Var)  ((u32)STRam+((u32)Var&0x00ffffff))

extern char MemReadByte (unsigned int pos);
extern short MemReadWord (unsigned int pos);
extern int MemReadLong (unsigned int pos);
extern void MemWriteByte (unsigned int pos, int val);
extern void MemWriteWord (unsigned int pos, int val);
extern void MemWriteLong (unsigned int pos, int val);

extern int GetXFlag ();
extern int GetZFlag ();
extern int GetNFlag ();
extern int GetVFlag ();
extern int GetCFlag ();

#endif /* _M68K_H */

unix.superglobalmegacorp.com