break;
case CONFITEM_MAP: {
unsigned int maptype = 0, mapsize = 0, mapaddr = 0;
- int mirraddr = -1;
+ unsigned int mirraddr = ((unsigned int)-1);
char mapfile[128], mapid[128];
memset(mapfile, 0x00, 128);
memset(mapid, 0x00, 128);
unsigned int cpu_type;
unsigned char map_type[MAX_NUM_MAPPED_ITEMS];
- long map_offset[MAX_NUM_MAPPED_ITEMS];
- long map_high[MAX_NUM_MAPPED_ITEMS];
+ unsigned long map_offset[MAX_NUM_MAPPED_ITEMS];
+ unsigned long map_high[MAX_NUM_MAPPED_ITEMS];
unsigned int map_size[MAX_NUM_MAPPED_ITEMS];
unsigned int rom_size[MAX_NUM_MAPPED_ITEMS];
unsigned char *map_data[MAX_NUM_MAPPED_ITEMS];
- int map_mirror[MAX_NUM_MAPPED_ITEMS];
+ unsigned int map_mirror[MAX_NUM_MAPPED_ITEMS];
char *map_id[MAX_NUM_MAPPED_ITEMS];
struct platform_config *platform;
}
goto cpu_loop;
-stop_cpu_emulation:
+//stop_cpu_emulation:
printf("[CPU] End of CPU thread\n");
}
key_end:
printf("[KBD] Keyboard thread ending\n");
+ return (void*)NULL;
}
void stop_cpu_emulation(uint8_t disasm_cur) {
#define NONE 0x80
-static int lshift = 0, rshift = 0, lctrl = 0, rctrl = 0, lalt = 0, altgr = 0;
+static int lshift = 0, rshift = 0,/* lctrl = 0, rctrl = 0,*/ lalt = 0, altgr = 0;
extern int mouse_fd;
extern int keyboard_fd;
/* ======================================================================== */
/* ============================== END OF FILE ============================= */
-/* =======================================x================================= */
+/* ======================================================================== */
#endif /* M68KCONF__HEADER */
/* make string of immediate value */
static char* get_imm_str_s(uint size)
{
- static char str[15];
+ static char str[25];
if(size == 0)
sprintf(str, "#%s", make_signed_hex_str_8(read_imm_8()));
else if(size == 1)
static char* get_imm_str_u(uint size)
{
- static char str[15];
+ static char str[25];
if(size == 0)
sprintf(str, "#$%x", read_imm_8() & 0xff);
else if(size == 1)
char* m68ki_disassemble_quick(unsigned int pc, unsigned int cpu_type)
{
- static char buff[100];
+ static char buff[1000];
buff[0] = 0;
m68k_disassemble(buff, pc, cpu_type);
return buff;
if (cfg->map_type[i] == MAPTYPE_NONE)
continue;
else if (ovl && cfg->map_type[i] == MAPTYPE_ROM) {
- if (cfg->map_mirror[i] != -1 && CHKRANGE(addr, cfg->map_mirror[i], cfg->map_size[i])) {
+ if (cfg->map_mirror[i] != ((unsigned int)-1) && CHKRANGE(addr, cfg->map_mirror[i], cfg->map_size[i])) {
read_addr = cfg->map_data[i] + ((addr - cfg->map_mirror[i]) % cfg->rom_size[i]);
goto read_value;
}
goto idewrite8;
case GIRQ_4000_OFFSET:
gayle_a4k_irq = value;
+ /* Fallthrough */
case GIRQ_OFFSET:
gayle_irq = (gayle_irq & value) | (value & (GAYLE_IRQ_RESET | GAYLE_IRQ_BERR));
return;
if (subsys) {
cfg->subsys = malloc(strlen(subsys) + 1);
strcpy(cfg->subsys, subsys);
- for (int i = 0; i < strlen(cfg->subsys); i++) {
+ for (unsigned int i = 0; i < strlen(cfg->subsys); i++) {
cfg->subsys[i] = tolower(cfg->subsys[i]);
}
}
const uint8_t ide_magic[9] = {
'1','D','E','D','1','5','C','0',0x00
};
-
+/*
static char *charmap(uint8_t v)
{
static char cbuf[3];
fprintf(stderr, "\n");
}
}
-
+*/
/* FIXME: use proper endian convertors! */
static uint16_t le16(uint16_t v)
{
static void ide_data_out(struct ide_drive *d, uint16_t v, int len)
{
+ (void)len;
if (d->state != IDE_DATA_OUT) {
ide_fault(d, "bad data write");
d->taskfile.data = v;
return c->lba4 | ((c->selected) ? 0x10 : 0x00);
case ide_status_r:
d->intrq = 0; /* Acked */
+ /* Fallthrough */
+ /* no break */
case ide_altst_r:
return t->status;
default:
}
}
- uint8_t ve;
+// uint8_t ve;
switch(r) {
case ide_data:
{
int i;
char *d = (char *)p;
+// strncpy(d, t, len);
+#pragma GCC diagnostic push
+#pragma GCC diagnostic ignored "-Wstringop-truncation"
strncpy(d, t, len);
+#pragma GCC diagnostic pop
for (i = 0; i < len; i += 2) {
char c = *d;
void pinet_init(char *dev) {
// Initialize them nets.
+ (void)dev;
}
uint8_t PI_MAC[6] = { 0x00, 0x00, 0x00, 0x00, 0x00, 0x00 };
uint8_t PI_IP[4] = { 192, 168, 1, 9 };
void handle_pinet_write(uint32_t addr, uint32_t val, uint8_t type) {
- int32_t r;
+// int32_t r;
switch (addr & 0xFFFF) {
case PINET_CMD_READ:
if (i != -1) {
sptr = &cfg->map_data[i][src_addr - cfg->map_offset[i]];
if (realtime_graphics_debug) {
- printf("Grabbing data from maping %d - offset %.8X\nData:\n", i, src_addr - cfg->map_offset[i]);
+ printf("Grabbing data from maping %d - offset %.8lX\nData:\n", i, src_addr - cfg->map_offset[i]);
for (int i = 0; i < h; i++) {
for (int j = 0; j < t_pitch; j++) {
printf("%.2X", sptr[j + (i * t_pitch)]);
uint32_t framebuffer_addr_adj = 0;
static void handle_rtg_command(uint32_t cmd);
-static struct timespec f1, f2;
+//static struct timespec f1, f2;
uint8_t realtime_graphics_debug = 0;
extern int cpu_emulation_running;
-
+/*
static const char *op_type_names[OP_TYPE_NUM] = {
"BYTE",
"WORD",
"32BPP RGB (RGBA)",
"15BPP RGB (555)",
};
-
+*/
int init_rtg_data() {
rtg_mem = calloc(1, 40 * SIZE_MEGA);
if (!rtg_mem) {
return 1;
}
-extern uint8_t busy, rtg_on;
-void rtg_update_screen();
+//extern uint8_t busy, rtg_on;
+//void rtg_update_screen();
unsigned int rtg_read(uint32_t address, uint8_t mode) {
//printf("%s read from RTG: %.8X\n", op_type_names[mode], address);