libsidplayfp  0.3.5
sidusage.h
1 /***************************************************************************
2  sidusage.h - sid usage definitions
3  -------------------
4  begin : Tues Nov 19 2002
5  copyright : (C) 2002 by Simon White
6  email : sidplay2@yahoo.com
7  ***************************************************************************/
8 
9 /***************************************************************************
10  * *
11  * This program is free software; you can redistribute it and/or modify *
12  * it under the terms of the GNU General Public License as published by *
13  * the Free Software Foundation; either version 2 of the License, or *
14  * (at your option) any later version. *
15  * *
16  ***************************************************************************/
17 
18 #ifndef _sidusage_h_
19 #define _sidusage_h_
20 
21 #include "sidtypes.h"
22 
23 enum
24 {
25  SID_READ = 1 << 0,
26  SID_WRITE = 1 << 1,
27  SID_EXECUTE = 1 << 2,
28  SID_STACK = 1 << 3,
29  SID_SAMPLE = 1 << 4,
30  SID_BAD_READ = 1 << 5,
31  SID_BAD_EXECUTE = 1 << 6,
32 
33  // Next byte provides extended information
34  SID_EXTENSION = 1 << 7,
35 
36  // Once SID_EXTENSION has been tested for, you
37  // are recommened to throw that bit away and
38  // assign it the following meaning where
39  // appropriate. This bit is not saved to file.
40  SID_LOAD_IMAGE = 1 << 7,
41  SID_OPCODE = 1 << 14
42 };
43 
44 enum
45 {
46  SID_IRQ = 1 << 0, // Play == 0
47  SID_IRQ_RTI = 1 << 1, // Switch out kernal with no I flag
48  SID_IRQ_IFLAG = 1 << 2, // Bad I flag
49  SID_IRQ_DISABLE = 1 << 3, // Permently disables IRQ source
50  SID_IRQ_NOACK = 1 << 4, // Dosen't acknowledge IRQ source
51  SID_NMI = 1 << 5, // Enables NMI IRQs
52  SID_EXECUTE_IO = 1 << 6, // Execution in IO (under)
53  SID_EXECUTE_ROM = 1 << 7, // Execution in ROM (under)
54  SID_IRQ_OTHER = 1 << 8, // Enabled alternative IRQ
55  SID_BAD_STACK = 1 << 9, // Tune corrupts stack contents
56  SID_INSTR_EX = 1 << 10, // Extended 6510 instructions
57  SID_INSTR_ILL = 1 << 11, // Illegal 6510 instructions
58  //SID_PSID_RANDOM = 1 << 12, // PSID Random extension (obsolete)
59  SID_INFINITE = 1 << 12, // Code Infinite loops
60  SID_INSTR_BRK = 1 << 13, // 6510 BRK, indications of a bad tune...
61  SID_IRQ_OVER = 1 << 14 // Overlapped IRQs
62 };
63 
64 // All unused have a reserved meaning and must contain
65 // a zero value
66 typedef struct sid_usage_t
67 {
68  typedef uint_least16_t memflags_t;
69  uint_least32_t flags; // Error flags
70  // The next value may change to 16 bits
71  memflags_t memory[0x10000]; // usage flags
72 } sid_usage_t;
73 
74 #endif // _sidusage_h_