Closed ghost closed 3 years ago
Hello @Naryosha,
Thank you kindly for the review of the specification and the model emulator! I also appreciate the excellent issue formatting.
The correct behavior is reflected by the specification at 4.A: FL, PC, and SP are readable and writable in user mode. PS is readable but not writeable. The implication on line 559 of the specification is incorrect: only the Processor Status register is not writeable in user mode. In addition, the model emulator is incorrect in that it would raise a fault if a program in user mode attempted to read from the Processor Status register. The hardware YCPU allows this behavior and would return the value of PS.
If you have the time, I would sincerely appreciate it if you would correct the specification and model emulator where they do not conform to 4.A.
Best wishes!
Thank you for the explanation. I have some more questions but don't think it worths another issue. So, here goes:
cartridge.txt
: Is there a specific error code when accessing sector 4096 and beyond? For the record, 0x10c's M35FD specs don't specify that an error code would be set after a read/write failure.keyboard.txt
, setting keyboard T bit means not to translate to ASCII, but the testconsole.asm
and the emulator seem to have it inverted. Which one is correct?keyboard.txt
: What is actually press
key event? I'm not familiar with XNA so I assumed that press
is when the key is repeating (when it's being held after a while), but it didn't work well with the testconsole
program. When the key is just down
should it also generate a press
event?P.S. here's my WIP :)
@Naryosha This is phenomenal. Thanks for your work here. I am reviewing it today.
Your WIP looks amazing as well. 💯
In 3.B, it is implied that user cannot write to
FL
,PC
,PS
, andSP
, although they all can still be read.https://github.com/ZaneDubya/YCPU/blob/0af90f8e6ad8adb4e19847ad9d636b685b8520f7/Documentation/ycpu.txt#L559
In 4.A (ALU Bit Pattern), user can only write to
FL
,PC
, andUSP
, but notPS
.https://github.com/ZaneDubya/YCPU/blob/0af90f8e6ad8adb4e19847ad9d636b685b8520f7/Documentation/ycpu.txt#L1342-L1355
Additionally, in the C# source, user cannot read from
PS
.https://github.com/ZaneDubya/YCPU/blob/0af90f8e6ad8adb4e19847ad9d636b685b8520f7/Source/Libraries/YpsilonCPU/Emulation/Processor/YCPU.cs#L163-L166
I think 4.A makes sense, but I'm not sure if user should be able to read
PS
. 🤔