Annotation of generator/raze/raze.h, revision 1.1

1.1     ! root        1: /*
        !             2:  * RAZE-x86 Z80 emulator.
        !             3:  *
        !             4:  * Copyright (c) 1999 Richard Mitton
        !             5:  *
        !             6:  * This may only be distributed as part of the complete RAZE package.
        !             7:  * See RAZE.TXT for license information.
        !             8:  */
        !             9: 
        !            10: #ifndef __RAZE_H_INCLUDED__
        !            11: #define __RAZE_H_INCLUDED__
        !            12: 
        !            13: #ifdef __cplusplus
        !            14: extern "C" {
        !            15: #endif
        !            16: 
        !            17:    /* Fix this as you need it */
        !            18:    #ifndef UBYTE
        !            19:       #define UBYTE unsigned char
        !            20:    #endif
        !            21:    #ifndef UWORD
        !            22:       #define UWORD unsigned short
        !            23:    #endif
        !            24: 
        !            25:    /* Memory map constants */
        !            26:    #define Z80_MAP_DIRECT  0  /* Reads/writes are done directly */
        !            27:    #define Z80_MAP_HANDLED 1  /* Reads/writes use a function handler */
        !            28: 
        !            29:    /* Z80 registers */
        !            30:    typedef enum {
        !            31:       Z80_REG_AF=0,
        !            32:       Z80_REG_BC,
        !            33:       Z80_REG_DE,
        !            34:       Z80_REG_HL,
        !            35:       Z80_REG_IX,
        !            36:       Z80_REG_IY,
        !            37:       Z80_REG_PC,
        !            38:       Z80_REG_SP,
        !            39:       Z80_REG_AF2,
        !            40:       Z80_REG_BC2,
        !            41:       Z80_REG_DE2,
        !            42:       Z80_REG_HL2,
        !            43:       Z80_REG_IFF1,        /* boolean - 1 or 0 */
        !            44:       Z80_REG_IFF2,        /* boolean - 1 or 0 */
        !            45:       Z80_REG_IR,
        !            46:       Z80_REG_IM,          /* 0, 1, or 2 */
        !            47:       Z80_REG_IRQVector,   /* 0x00 to 0xff */
        !            48:       Z80_REG_IRQLine,     /* boolean - 1 or 0 */
        !            49:       Z80_REG_Halted       /* boolean - 1 or 0 */
        !            50:    } z80_register;
        !            51: 
        !            52:    /* Z80 main functions */
        !            53:    void  z80_reset(void);
        !            54:    int   z80_emulate(int cycles);
        !            55:    void  z80_raise_IRQ(UBYTE vector);
        !            56:    void  z80_lower_IRQ(void);
        !            57:    void  z80_cause_NMI(void);
        !            58: 
        !            59:    /* Z80 context functions */
        !            60:    int   z80_get_context_size(void);
        !            61:    void  z80_set_context(void *context);
        !            62:    void  z80_get_context(void *context);
        !            63:    UWORD z80_get_reg(z80_register reg);
        !            64:    void  z80_set_reg(z80_register reg, UWORD value);
        !            65: 
        !            66:    /* Z80 cycle functions */
        !            67:    int   z80_get_cycles_elapsed(void);
        !            68:    void  z80_stop_emulating(void);
        !            69:    void  z80_skip_idle(void);
        !            70:    void  z80_do_wait_states(int n);
        !            71: 
        !            72:    /* Z80 I/O functions */
        !            73:    void  z80_init_memmap(void);
        !            74:    void  z80_map_fetch(UWORD start, UWORD end, UBYTE *memory);
        !            75:    void  z80_map_read(UWORD start, UWORD end, UBYTE *memory);
        !            76:    void  z80_map_write(UWORD start, UWORD end, UBYTE *memory);
        !            77:    void  z80_add_read(UWORD start, UWORD end, int method, void *data);
        !            78:    void  z80_add_write(UWORD start, UWORD end, int method, void *data);
        !            79:    void  z80_set_in(UBYTE (*handler)(UWORD port));
        !            80:    void  z80_set_out(void (*handler)(UWORD port, UBYTE value));
        !            81:    void  z80_set_reti(void (*handler)(void));
        !            82:    void  z80_set_fetch_callback(void (*handler)(UWORD pc));
        !            83:    void  z80_end_memmap(void);
        !            84: 
        !            85: #ifdef __cplusplus
        !            86: };
        !            87: #endif
        !            88: 
        !            89: #endif /* __RAZE_H_INCLUDED__ */
        !            90: 

unix.superglobalmegacorp.com

This archive runs on limited infrastructure. Preserving old code on modern bandwidth. Automated agents are requested to crawl responsibly.