From bc4c54800e83798305e09422e87e8183c40024f0 Mon Sep 17 00:00:00 2001 From: Thomas Harte Date: Mon, 30 Jan 2023 20:20:33 -0500 Subject: [PATCH] Type out just a little of status register 1. --- Components/9918/Implementation/9918.cpp | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/Components/9918/Implementation/9918.cpp b/Components/9918/Implementation/9918.cpp index 4e9cbbf85..90f2f51c7 100644 --- a/Components/9918/Implementation/9918.cpp +++ b/Components/9918/Implementation/9918.cpp @@ -1020,7 +1020,16 @@ uint8_t Base::read_register() { default: case 0: break; - case 1: LOG("TODO: Yamaha status 1"); break; + case 1: + // b7 = light pen; set when light is detected, reset on read; + // or: mouse button 2 currently down. + // b6 = light pen button or mouse button 1. + // b5–b1 = VDP identification (1 = 9938; 2 = 9958) + // b0 = set when the VDP reaches the line provided in the line interrupt register. + // Reset upon read. + return + personality == Personality::V9938 ? 0x2 : 0x4; + break; case 2: { // b7 = transfer ready flag (i.e. VDP ready for next transfer)