]> git.sesse.net Git - pistorm/commitdiff
only display SERDAT lsb
authornine <nine@aphlor.org>
Sun, 21 Feb 2021 01:27:14 +0000 (01:27 +0000)
committerjust nine <nine@aphlor.org>
Mon, 22 Feb 2021 11:18:03 +0000 (11:18 +0000)
emulator.c

index 50d144bec4bd5319c34804a6058764e8bf8739b5..04fe15e3f6c62d335d6e7c312ec170954b3ce360 100644 (file)
@@ -691,8 +691,10 @@ void m68k_write_memory_16(unsigned int address, unsigned int value) {
   }*/
 
   if (address == 0xDFF030) {
-    char *beb = (char *)&value;
-    printf("%c%c", beb[1], beb[0]);
+    char *serdat = (char *)&value;
+    // SERDAT word. see amiga dev docs appendix a; upper byte is control codes, and bit 0 is always 1.
+    // ignore this upper byte as it's not viewable data, only display lower byte.
+    printf("%c", serdat[0]);
   }
   if (address == 0xDFF09A) {
     if (!(value & 0x8000)) {