Skip to content

Commit 2894147

Browse files
committed
Source code comments.
1 parent 45e574d commit 2894147

File tree

2 files changed

+12
-8
lines changed

2 files changed

+12
-8
lines changed

sources/Z80.c

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -942,18 +942,20 @@ static Z_ALWAYS_INLINE zuint8 m(Z80 *self, zuint8 offset, zuint8 value)
942942
| the Z80 CPU performs additional flag changes during this M-cycle and managed |
943943
| to decipher the behaviors. All block instructions copy bits 13 and 11 of PCi |
944944
| to YF and XF, respectively [1.1], but `inir`, `indr`, `otir` and `otdr` also |
945-
| modify HF and PF in a very complicated way [1.2]. These two flags are not |
946-
| commented here because the explanation would not be simpler than the code |
947-
| itself, so please refer to David Banks' paper [2] for more information. |
945+
| modify HF and PF in a very complicated way [1.2]. These latter two flags are |
946+
| not commented here because the explanation would not be simpler than the |
947+
| code itself, so please refer to David Banks' paper [2] for more information. |
948948
| |
949949
| David Banks' discoveries have been corroborated thanks to Peter Helcmanovsky |
950950
| (AKA Ped7g), who wrote a test that covers most of the cases that can be |
951951
| verified on a ZX Spectrum [3]. |
952952
| |
953-
| In 2022, rofl0r discovered that `otir` and `otdr` set MEMPTR to `PCi + 1` |
954-
| during the extra M-cycle [4]. This went unnoticed by the emulation community |
955-
| until 2023, when Manuel Sainz de Baranda y Goñi rediscovered this behaviour |
956-
| in `inir`, `indr`, `otir` and `otdr` [5]. |
953+
| In 2022, rofl0r discovered that the instructions `otir` and `otdr` also set |
954+
| MEMPTR to `PCi + 1` during the extra M-cycle [4]. However, this information |
955+
| was not announced anywhere and went unnoticed by the emulation community |
956+
| until 2023, when Manuel Sainz de Baranda y Goñi rediscovered the same |
957+
| behaviour in all four I/O block instructions: `inir`, `indr`, `otir` and |
958+
| `otdr` [5]. |
957959
| |
958960
| References: |
959961
| 1. https://stardot.org.uk/forums/viewtopic.php?t=15464 |

sources/Z80.rc.in

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
1 VERSIONINFO
1+
/* IMPORTANT: This file MUST be saved using "UTF-8 with BOM" encoding. */
2+
3+
1 VERSIONINFO
24
FILEVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
35
PRODUCTVERSION @PROJECT_VERSION_MAJOR@,@PROJECT_VERSION_MINOR@,@PROJECT_VERSION_PATCH@,0
46
FILEFLAGSMASK 0x3FL

0 commit comments

Comments
 (0)