From 299b7da5bbb34853c6a80a1144a1c1c46d8df3fe Mon Sep 17 00:00:00 2001 From: Peter Jakubco Date: Mon, 4 May 2026 08:22:49 +0200 Subject: [PATCH 1/2] [#314] Update GitHub issue templates - align feature request template with repo ticket sections - capture bug context, impact, and environment details - make usability questions emuStudio-specific --- .github/ISSUE_TEMPLATE/bug_report.md | 44 ++++++++++---------- .github/ISSUE_TEMPLATE/feature_request.md | 20 +++++---- .github/ISSUE_TEMPLATE/usability_question.md | 23 ++++++---- 3 files changed, 47 insertions(+), 40 deletions(-) diff --git a/.github/ISSUE_TEMPLATE/bug_report.md b/.github/ISSUE_TEMPLATE/bug_report.md index 897074eae..3a41559c9 100644 --- a/.github/ISSUE_TEMPLATE/bug_report.md +++ b/.github/ISSUE_TEMPLATE/bug_report.md @@ -7,35 +7,33 @@ assignees: '' --- -**Describe the bug** -A clear and concise description of what the bug is. +**Problem** +What is wrong? Include the observed behavior or exact error. -**To Reproduce** +**Context** +What were you doing, which module/plugin/computer is affected, and why does it matter? + +**Minimal reproducer** Steps to reproduce the behavior: -1. Go to '...' -2. Click on '....' -3. Scroll down to '....' -4. See error +1. Open/load/run '...' +2. Do '....' +3. Observe '....' **Expected behavior** -A clear and concise description of what you expected to happen. - -**Screenshots** -If applicable, add screenshots to help explain your problem. - -**Desktop (please complete the following information):** +What should happen instead? -- OS: [e.g. iOS] -- Browser [e.g. chrome, safari] -- Version [e.g. 22] +**Impact** +Why does this bug matter? Does it block a workflow, break emulation, or corrupt output? -**Smartphone (please complete the following information):** +**Environment** -- Device: [e.g. iPhone6] -- OS: [e.g. iOS8.1] -- Browser [e.g. stock browser, safari] -- Version [e.g. 22] +- emuStudio version / commit: +- Java version: +- OS: +- Affected module/plugin: +- Computer configuration: +- GUI or command line: -**Additional context** -Add any other context about the problem here. +**References / additional context** +Logs, screenshots, sample files/config, specs, or related issues. diff --git a/.github/ISSUE_TEMPLATE/feature_request.md b/.github/ISSUE_TEMPLATE/feature_request.md index de666baee..30258c2ed 100644 --- a/.github/ISSUE_TEMPLATE/feature_request.md +++ b/.github/ISSUE_TEMPLATE/feature_request.md @@ -7,14 +7,18 @@ assignees: '' --- -**Is your feature request related to a problem? Please describe.** -A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] +**Context** +Describe current behavior, affected module/plugin/computer, and any useful background. -**Describe the solution you'd like** -A clear and concise description of what you want to happen. +**Motivation** +Why is this needed? What use case, limitation, or workflow does it address? -**Describe alternatives you've considered** -A clear and concise description of any alternative solutions or features you've considered. +**High-Level Steps** +If you already have an implementation direction in mind, outline it here. -**Additional context** -Add any other context or screenshots about the feature request here. +1. ... +2. ... +3. ... + +**References / related issues** +Specs, screenshots, examples, related issues, or external links. diff --git a/.github/ISSUE_TEMPLATE/usability_question.md b/.github/ISSUE_TEMPLATE/usability_question.md index c2c20c1b2..4f3574845 100644 --- a/.github/ISSUE_TEMPLATE/usability_question.md +++ b/.github/ISSUE_TEMPLATE/usability_question.md @@ -7,17 +7,22 @@ assignees: '' --- -**What is your question?** -What would you like to ask about? +**Context** +What are you trying to do in emuStudio? Mention the module/plugin/computer involved. -**What environment do you have?** -Java version, operating system you use, etc. +**What you tried** +Commands, configuration snippets, docs followed, and what happened instead. -**What computer configuration do you use?** -E.g. MITS Altair 8800; custom; etc. +**Environment** -**How you run emuStudio?** -GUI or command line (if so, please send the exact command line). +- emuStudio version / commit: +- Java version: +- OS: +- Computer configuration: +- GUI or command line: + +**Question** +What exactly do you need help with? **Additional context** -Add any other context or screenshots. +Logs, screenshots, sample config/files, or links to docs/specs. From 6fad742f1e2f4c0f64d8ea6b36e7ba4933390700 Mon Sep 17 00:00:00 2001 From: Peter Jakubco Date: Mon, 4 May 2026 08:29:58 +0200 Subject: [PATCH 2/2] [#314] Fix Z80 block I/O port addressing - use decremented B for INI, INIR, IND, and INDR port reads - derive memptr from adjusted block I/O port address --- .../plugins/cpu/zilogZ80/EmulatorEngine.java | 40 +++++++++---------- 1 file changed, 20 insertions(+), 20 deletions(-) diff --git a/plugins/cpu/z80-cpu/src/main/java/net/emustudio/plugins/cpu/zilogZ80/EmulatorEngine.java b/plugins/cpu/z80-cpu/src/main/java/net/emustudio/plugins/cpu/zilogZ80/EmulatorEngine.java index 2b82c5460..12467d105 100644 --- a/plugins/cpu/z80-cpu/src/main/java/net/emustudio/plugins/cpu/zilogZ80/EmulatorEngine.java +++ b/plugins/cpu/z80-cpu/src/main/java/net/emustudio/plugins/cpu/zilogZ80/EmulatorEngine.java @@ -2482,13 +2482,13 @@ void I_INI() { // pc:4,pc+1:5,IO,hl:3 advanceCycles(1); int hl = (regs[REG_H] << 8) | regs[REG_L]; - int bc = (regs[REG_B] << 8) | regs[REG_C]; - byte io = context.readIO(bc); + int decB = (regs[REG_B] - 1) & 0xFF; + regs[REG_B] = decB; + int portAddress = (decB << 8) | regs[REG_C]; + byte io = context.readIO(portAddress); advanceCycles(4); memory.write(hl++, io); - int decB = (regs[REG_B] - 1) & 0xFF; - regs[REG_B] = decB; regs[REG_H] = (hl >>> 8) & 0xFF; regs[REG_L] = hl & 0xFF; @@ -2500,7 +2500,7 @@ void I_INI() { | TABLE_XY[decB] | PARITY_TABLE[(tmp & 7) ^ decB]; Q = flags; - memptr = (bc + 1) & 0xFFFF; + memptr = (portAddress + 1) & 0xFFFF; advanceCycles(3); } @@ -2508,14 +2508,14 @@ void I_INIR() { // pc:4,pc+1:5,IO,hl:3,[hl:1 x 5] advanceCycles(1); int hl = (regs[REG_H] << 8) | regs[REG_L]; - int bc = (regs[REG_B] << 8) | regs[REG_C]; - byte io = context.readIO(bc); + int decB = (regs[REG_B] - 1) & 0xFF; + regs[REG_B] = decB; + int portAddress = (decB << 8) | regs[REG_C]; + byte io = context.readIO(portAddress); advanceCycles(4); memory.write(hl++, io); advanceCycles(3); - int decB = (regs[REG_B] - 1) & 0xFF; - regs[REG_B] = decB; regs[REG_H] = (hl >>> 8) & 0xFF; regs[REG_L] = hl & 0xFF; @@ -2527,7 +2527,7 @@ void I_INIR() { | TABLE_XY[decB] | PARITY_TABLE[(tmp & 7) ^ decB]; Q = flags; - memptr = (bc + 1) & 0xFFFF; + memptr = (portAddress + 1) & 0xFFFF; if (decB == 0) { return; @@ -2558,13 +2558,13 @@ void I_IND() { // pc:4,pc+1:5,IO,hl:3 advanceCycles(1); int hl = (regs[REG_H] << 8) | regs[REG_L]; - int bc = (regs[REG_B] << 8) | regs[REG_C]; - byte io = context.readIO(bc); + int decB = (regs[REG_B] - 1) & 0xFF; + regs[REG_B] = decB; + int portAddress = (decB << 8) | regs[REG_C]; + byte io = context.readIO(portAddress); advanceCycles(4); memory.write(hl--, io); - int decB = (regs[REG_B] - 1) & 0xFF; - regs[REG_B] = decB; regs[REG_H] = (hl >>> 8) & 0xFF; regs[REG_L] = hl & 0xFF; @@ -2576,7 +2576,7 @@ void I_IND() { | TABLE_XY[decB] | PARITY_TABLE[(tmp & 7) ^ decB]; Q = flags; - memptr = (bc - 1) & 0xFFFF; + memptr = (portAddress - 1) & 0xFFFF; advanceCycles(3); } @@ -2584,14 +2584,14 @@ void I_INDR() { // pc:4,pc+1:5,IO,hl:3,[hl:1 x 5] advanceCycles(1); int hl = (regs[REG_H] << 8) | regs[REG_L]; - int bc = (regs[REG_B] << 8) | regs[REG_C]; - byte io = context.readIO(bc); + int decB = (regs[REG_B] - 1) & 0xFF; + regs[REG_B] = decB; + int portAddress = (decB << 8) | regs[REG_C]; + byte io = context.readIO(portAddress); advanceCycles(4); memory.write(hl--, io); advanceCycles(3); - int decB = (regs[REG_B] - 1) & 0xFF; - regs[REG_B] = decB; regs[REG_H] = (hl >>> 8) & 0xFF; regs[REG_L] = hl & 0xFF; @@ -2603,7 +2603,7 @@ void I_INDR() { | TABLE_XY[decB] | PARITY_TABLE[(tmp & 7) ^ decB]; Q = flags; - memptr = (bc - 1) & 0xFFFF; + memptr = (portAddress - 1) & 0xFFFF; if (decB == 0) { return;