]> git.sesse.net Git - pistorm/blobdiff - platforms/amiga/rtg/rtg.c
Add license information to source
[pistorm] / platforms / amiga / rtg / rtg.c
index 9f440bbc4920eb9b30d349495a0698499dffa962..6a1963a5060a5a1fb2889ddab191612b95214438 100644 (file)
@@ -1,3 +1,5 @@
+// SPDX-License-Identifier: MIT
+
 #include <stdint.h>
 #include <endian.h>
 #include <stdio.h>
@@ -5,7 +7,7 @@
 #include <string.h>
 #include <time.h>
 #include "rtg.h"
-#include "../../../config_file/config_file.h"
+#include "config_file/config_file.h"
 
 uint8_t rtg_u8[4];
 uint16_t rtg_x[8], rtg_y[8];
@@ -28,11 +30,11 @@ uint32_t framebuffer_addr = 0;
 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",
@@ -46,7 +48,7 @@ static const char *rtg_format_names[RTGFMT_NUM] = {
     "32BPP RGB (RGBA)",
     "15BPP RGB (555)",
 };
-
+*/
 int init_rtg_data() {
     rtg_mem = calloc(1, 40 * SIZE_MEGA);
     if (!rtg_mem) {
@@ -57,11 +59,14 @@ int init_rtg_data() {
     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);
+    if (address == RTG_COMMAND) {
+        return 0xFFCF;
+    }
     if (address >= PIGFX_REG_SIZE) {
         if (rtg_mem && (address - PIGFX_REG_SIZE) < PIGFX_UPPER) {
             switch (mode) {