Go to the documentation of this file.
10 const unsigned char ready;
12 const unsigned char rx;
13 const unsigned char vsync;
24 const unsigned char spin;
25 const unsigned char busy;
26 const unsigned char lda;
28 const unsigned char ldx;
30 const unsigned char rts;
33 #define RIA (*(volatile struct __RP6502 *)0xFFE0)
35 #define RIA_READY_TX_BIT 0x80
36 #define RIA_READY_RX_BIT 0x40
37 #define RIA_BUSY_BIT 0x80
41 #define RIA_OP_EXIT 0xFF
42 #define RIA_OP_ZXSTACK 0x00
43 #define RIA_OP_XREG 0x01
44 #define RIA_OP_PHI2 0x02
45 #define RIA_OP_CODEPAGE 0x03
46 #define RIA_OP_LRAND 0x04
47 #define RIA_OP_STDIN_OPT 0x05
48 #define RIA_OP_CLOCK 0x0F
49 #define RIA_OP_CLOCK_GETRES 0x10
50 #define RIA_OP_CLOCK_GETTIME 0x11
51 #define RIA_OP_CLOCK_SETTIME 0x12
52 #define RIA_OP_CLOCK_GETTIMEZONE 0x13
53 #define RIA_OP_OPEN 0x14
54 #define RIA_OP_CLOSE 0x15
55 #define RIA_OP_READ_XSTACK 0x16
56 #define RIA_OP_READ_XRAM 0x17
57 #define RIA_OP_WRITE_XSTACK 0x18
58 #define RIA_OP_WRITE_XRAM 0x19
59 #define RIA_OP_LSEEK 0x1A
60 #define RIA_OP_UNLINK 0x1B
61 #define RIA_OP_RENAME 0x1C
70 int stdin_opt(
unsigned long ctrl_bits,
unsigned char str_length);
78 #define STDIN_FILENO 0
79 #define STDOUT_FILENO 1
80 #define STDERR_FILENO 2
94 int open(
const char *name,
int flags, ...);
95 int read(
int fildes,
void *buf,
unsigned count);
96 int write(
int fildes,
const void *buf,
unsigned count);
98 long lseek(
int fd,
long offset,
int whence);
100 unsigned char _sysrename(
const char *oldpath,
const char *newpath);
104 #define xram0_struct_set(addr, type, member, val) \
105 RIA.addr0 = (unsigned)(&((type *)0)->member) + (unsigned)addr; \
106 switch (sizeof(((type *)0)->member)) { \
112 RIA.rw0 = val & 0xff; \
113 RIA.rw0 = (val >> 8) & 0xff; \
117 RIA.rw0 = (unsigned long)val & 0xff; \
118 RIA.rw0 = ((unsigned long)val >> 8) & 0xff; \
119 RIA.rw0 = ((unsigned long)val >> 16) & 0xff; \
120 RIA.rw0 = ((unsigned long)val >> 24) & 0xff; \
124 #define xram1_struct_set(addr, type, member, val) \
125 RIA.addr1 = (unsigned)(&((type *)0)->member) + (unsigned)addr; \
126 switch (sizeof(((type *)0)->member)) { \
132 RIA.rw1 = val & 0xff; \
133 RIA.rw1 = (val >> 8) & 0xff; \
137 RIA.rw1 = (unsigned long)val & 0xff; \
138 RIA.rw1 = ((unsigned long)val >> 8) & 0xff; \
139 RIA.rw1 = ((unsigned long)val >> 16) & 0xff; \
140 RIA.rw1 = ((unsigned long)val >> 24) & 0xff; \
unsigned char x_wrap
Definition: rp6502.h:145
unsigned char log_size
Definition: rp6502.h:192
unsigned xram_palette_ptr
Definition: rp6502.h:176
unsigned xram_palette_ptr
Definition: rp6502.h:164
@ FR_DISK_ERR
Definition: rp6502.h:200
@ FR_NO_FILESYSTEM
Definition: rp6502.h:212
@ FR_LOCKED
Definition: rp6502.h:216
unsigned xram_sprite_ptr
Definition: rp6502.h:182
@ FR_DENIED
Definition: rp6502.h:206
int y_pos_px
Definition: rp6502.h:190
@ FR_MKFS_ABORTED
Definition: rp6502.h:213
int open(const char *name, int flags,...)
@ FR_INVALID_PARAMETER
Definition: rp6502.h:220
unsigned xram_font_ptr
Definition: rp6502.h:153
unsigned xram_sprite_ptr
Definition: rp6502.h:191
unsigned xram_data_ptr
Definition: rp6502.h:163
int height_chars
Definition: rp6502.h:150
int width_tiles
Definition: rp6502.h:161
@ FR_NOT_ENABLED
Definition: rp6502.h:211
int y_pos_px
Definition: rp6502.h:148
long lseek(int fd, long offset, int whence)
@ FR_NOT_ENOUGH_CORE
Definition: rp6502.h:218
@ FR_INVALID_OBJECT
Definition: rp6502.h:208
@ FR_OK
Definition: rp6502.h:199
int read_xstack(void *buf, unsigned count, int fildes)
int height_px
Definition: rp6502.h:174
int x_pos_px
Definition: rp6502.h:171
@ FR_INVALID_DRIVE
Definition: rp6502.h:210
unsigned char _sysrename(const char *oldpath, const char *newpath)
unsigned xram_palette_ptr
Definition: rp6502.h:152
unsigned char y_wrap
Definition: rp6502.h:170
char channel
Definition: famitone2.h:31
int height_tiles
Definition: rp6502.h:162
int x_pos_px
Definition: rp6502.h:180
const void uint16_t count
Definition: memory.h:58
unsigned char log_size
Definition: rp6502.h:183
@ FR_NO_PATH
Definition: rp6502.h:204
unsigned char y_wrap
Definition: rp6502.h:146
@ FR_NO_FILE
Definition: rp6502.h:203
byte x
Definition: api.h:26
int read(int fildes, void *buf, unsigned count)
@ FR_INVALID_NAME
Definition: rp6502.h:205
unsigned char has_opacity_metadata
Definition: rp6502.h:193
int write_xstack(const void *buf, unsigned count, int fildes)
@ FR_WRITE_PROTECTED
Definition: rp6502.h:209
unsigned xram_data_ptr
Definition: rp6502.h:151
@ FR_TIMEOUT
Definition: rp6502.h:214
@ FR_NOT_READY
Definition: rp6502.h:202
int y_pos_px
Definition: rp6502.h:181
int write(int fildes, const void *buf, unsigned count)
#define errno
Definition: errno.h:9
int x_pos_px
Definition: rp6502.h:189
int x_pos_px
Definition: rp6502.h:159
unsigned char y_wrap
Definition: rp6502.h:158
int x_pos_px
Definition: rp6502.h:147
int write_xram(unsigned buf, unsigned count, int fildes)
unsigned xram_tile_ptr
Definition: rp6502.h:165
int read_xram(unsigned buf, unsigned count, int fildes)
unsigned char has_opacity_metadata
Definition: rp6502.h:184
int xregn(char device, char channel, unsigned char address, unsigned count,...)
uint8_t uint16_t address
Definition: bios.h:180
FRESULT
Definition: rp6502.h:198
@ FR_TOO_MANY_OPEN_FILES
Definition: rp6502.h:219
int width_px
Definition: rp6502.h:173
@ FR_EXIST
Definition: rp6502.h:207
unsigned char _sysremove(const char *name)
int y_pos_px
Definition: rp6502.h:160
int stdin_opt(unsigned long ctrl_bits, unsigned char str_length)
int y_pos_px
Definition: rp6502.h:172
int width_chars
Definition: rp6502.h:149
unsigned xram_data_ptr
Definition: rp6502.h:175
unsigned char x_wrap
Definition: rp6502.h:169
unsigned char x_wrap
Definition: rp6502.h:157
@ FR_INT_ERR
Definition: rp6502.h:201