Annotation of uae/src/include/custom.h, revision 1.1.1.18

1.1.1.3   root        1:  /*
1.1       root        2:   * UAE - The Un*x Amiga Emulator
1.1.1.3   root        3:   *
1.1       root        4:   * custom chip support
                      5:   *
                      6:   * (c) 1995 Bernd Schmidt
                      7:   */
                      8: 
1.1.1.7   root        9: /* These are the masks that are ORed together in the chipset_mask option.
                     10:  * If CSMASK_AGA is set, the ECS bits are guaranteed to be set as well.  */
1.1.1.18! root       11: #define CSMASK_OCS 0
1.1.1.7   root       12: #define CSMASK_ECS_AGNUS 1
                     13: #define CSMASK_ECS_DENISE 2
1.1.1.18! root       14: #define CSMASK_FULL_ECS 3
1.1.1.7   root       15: #define CSMASK_AGA 4
                     16: 
1.1.1.15  root       17: uae_u32 get_copper_address(int copno);
                     18: 
1.1.1.5   root       19: extern void custom_init (void);
                     20: extern void customreset (void);
                     21: extern int intlev (void);
                     22: extern void dumpcustom (void);
1.1       root       23: 
1.1.1.5   root       24: extern void do_disk (void);
1.1.1.9   root       25: extern void do_copper (void);
1.1       root       26: 
1.1.1.3   root       27: extern void notice_new_xcolors (void);
                     28: extern void notice_screen_contents_lost (void);
1.1.1.5   root       29: extern void init_row_map (void);
1.1.1.3   root       30: 
1.1.1.15  root       31: extern void custom_prepare_savestate (void);
                     32: 
1.1.1.3   root       33: extern int picasso_requested_on;
                     34: extern int picasso_on;
                     35: 
                     36: /* Set to 1 to leave out the current frame in average frame time calculation.
                     37:  * Useful if the debugger was active.  */
1.1       root       38: extern int bogusframe;
                     39: 
1.1.1.3   root       40: extern uae_u16 dmacon;
                     41: extern uae_u16 intena,intreq;
1.1.1.2   root       42: 
                     43: extern int current_hpos (void);
1.1.1.3   root       44: extern int vpos;
1.1.1.2   root       45: 
1.1.1.15  root       46: extern int find_copper_record (uaecptr, int *, int *);
                     47: 
1.1.1.12  root       48: extern int n_frames;
                     49: 
1.1.1.8   root       50: STATIC_INLINE int dmaen (unsigned int dmamask)
1.1       root       51: {
                     52:     return (dmamask & dmacon) && (dmacon & 0x200);
                     53: }
                     54: 
                     55: #define SPCFLAG_STOP 2
1.1.1.9   root       56: #define SPCFLAG_COPPER 4
                     57: #define SPCFLAG_INT 8
                     58: #define SPCFLAG_BRK 16
1.1       root       59: #define SPCFLAG_EXTRA_CYCLES 32
                     60: #define SPCFLAG_TRACE 64
                     61: #define SPCFLAG_DOTRACE 128
                     62: #define SPCFLAG_DOINT 256
                     63: #define SPCFLAG_BLTNASTY 512
                     64: #define SPCFLAG_EXEC 1024
1.1.1.2   root       65: #define SPCFLAG_MODE_CHANGE 8192
1.1.1.18! root       66: #define SPCFLAG_RESTORE_SANITY 16384
1.1       root       67: 
1.1.1.3   root       68: extern uae_u16 adkcon;
1.1       root       69: 
1.1.1.3   root       70: extern unsigned int joy0dir, joy1dir;
                     71: extern int joy0button, joy1button;
                     72: 
1.1.1.4   root       73: extern void INTREQ (uae_u16);
1.1.1.15  root       74: extern void INTREQ_0 (uae_u16);
1.1.1.4   root       75: extern uae_u16 INTREQR (void);
1.1       root       76: 
1.1.1.7   root       77: /* maximums for statically allocated tables */
                     78: 
1.1.1.18! root       79: #define MAXHPOS 256
        !            80: #define MAXVPOS 576
1.1.1.7   root       81: 
                     82: /* PAL/NTSC values */
                     83: 
1.1.1.2   root       84: /* The HRM says: The vertical blanking area (PAL) ranges from line 0 to line 29,
                     85:  * and no data can be displayed there. Nevertheless, we lose some overscan data
1.1.1.7   root       86:  * if minfirstline is set to 29. */
                     87: 
                     88: #define MAXHPOS_PAL 227
                     89: #define MAXHPOS_NTSC 227
                     90: #define MAXVPOS_PAL 312
                     91: #define MAXVPOS_NTSC 262
1.1.1.18! root       92: #define VBLANK_ENDLINE_PAL 27
        !            93: #define VBLANK_ENDLINE_NTSC 28
        !            94: #define VBLANK_SPRITE_PAL 25
        !            95: #define VBLANK_SPRITE_NTSC 20
1.1.1.7   root       96: #define VBLANK_HZ_PAL 50
                     97: #define VBLANK_HZ_NTSC 60
                     98: 
                     99: extern int maxhpos, maxvpos, minfirstline, vblank_endline, numscrlines, vblank_hz;
                    100: extern unsigned long syncbase;
                    101: #define NUMSCRLINES (maxvpos+1-minfirstline+1)
1.1       root      102: 
                    103: #define DMA_AUD0      0x0001
                    104: #define DMA_AUD1      0x0002
                    105: #define DMA_AUD2      0x0004
                    106: #define DMA_AUD3      0x0008
                    107: #define DMA_DISK      0x0010
                    108: #define DMA_SPRITE    0x0020
                    109: #define DMA_BLITTER   0x0040
                    110: #define DMA_COPPER    0x0080
                    111: #define DMA_BITPLANE  0x0100
1.1.1.10  root      112: #define DMA_MASTER    0x0200
1.1       root      113: #define DMA_BLITPRI   0x0400
1.1.1.2   root      114: 
                    115: extern unsigned long frametime, timeframes;
1.1.1.17  root      116: extern int plfstrt, plfstop, plffirstline, plflastline;
1.1.1.2   root      117: 
1.1.1.14  root      118: /* 100 words give you 1600 horizontal pixels. Should be more than enough for
                    119:  * superhires. Don't forget to update the definition in genp2c.c as well.
                    120:  * needs to be larger for superhires support */
                    121: #define MAX_WORDS_PER_LINE 100
1.1.1.3   root      122: 
                    123: extern uae_u32 hirestab_h[256][2];
                    124: extern uae_u32 lorestab_h[256][4];
                    125: 
                    126: extern uae_u32 hirestab_l[256][1];
                    127: extern uae_u32 lorestab_l[256][2];
1.1.1.11  root      128: 
                    129: /* AGA mode color lookup tables */
                    130: extern unsigned int xredcolors[256], xgreencolors[256], xbluecolors[256];
1.1.1.13  root      131: 
1.1.1.16  root      132: extern int bpl_off[8];
1.1.1.15  root      133: 
1.1.1.13  root      134: /* get resolution from bplcon0 */
                    135: #define GET_RES(CON0) (((CON0) & 0x8000) ? RES_HIRES : ((CON0) & 0x40) ? RES_SUPERHIRES : RES_LORES)
                    136: /* get sprite width from FMODE */
                    137: #define GET_SPRITEWIDTH(FMODE) ((((FMODE) >> 2) & 3) == 3 ? 64 : (((FMODE) >> 2) & 3) == 0 ? 16 : 32)
                    138: /* Compute the number of bitplanes from a value written to BPLCON0  */
                    139: #define GET_PLANES(x) ((((x) >> 12) & 7) | (((x) & 0x10) >> 1))
                    140: 

unix.superglobalmegacorp.com

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