Skip to content

Commit

Permalink
Tube ULA: Fix two byte data transfer flags incorrect (#179)
Browse files Browse the repository at this point in the history
Change-Id: I1e5080fd45558c442820afe4587567c3e0d38d43
  • Loading branch information
hoglet67 committed Sep 6, 2023
1 parent b3acee4 commit 3029fc8
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions src/tube-ula.c
Original file line number Diff line number Diff line change
Expand Up @@ -266,9 +266,11 @@ static void tube_host_read(uint32_t addr)
{
PH3_0 = BYTE_TO_WORD(PH3_1);
ph3pos--;
PSTAT3 |= 0xC0;
if (!ph3pos) HSTAT3 &= (uint32_t)~HBIT_7;
if ((HSTAT1 & HBIT_3) && (ph3pos == 0)) tube_irq|=NMI_BIT;
if (!ph3pos) { // Test if PH3 empty
HSTAT3 &= (uint32_t)~HBIT_7; // Clear host "available" flag
PSTAT3 |= 0xC0; // Set parasite "Not Full" flag (and NMI flag)
if (HSTAT1 & HBIT_3) tube_irq|=NMI_BIT; // Raise NMI interrupt if enabled
}
//tube_updateints_NMI();
}
break;
Expand Down

0 comments on commit 3029fc8

Please sign in to comment.