Skip to content

Commit

Permalink
Fixed link port, LCD cursor, and keypad bugs
Browse files Browse the repository at this point in the history
  • Loading branch information
drdnar committed Dec 24, 2014
1 parent 9213f65 commit 4f13c2e
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 4 deletions.
8 changes: 6 additions & 2 deletions Tiedye/Hardware/TI84PCSE/ColorLcd.cs
Original file line number Diff line number Diff line change
Expand Up @@ -225,10 +225,12 @@ public void WriteData(byte value)
RegEntryMode = val;
break;
case 0x20: // Cursor Row
CursorRow = (val % 240);
LastCursorRow = CursorRow = (val % 240);
CursorColumn = LastCursorColumn;
break;
case 0x21: // Cursor Column
CursorColumn = (val % 320);
LastCursorColumn = CursorColumn = (val % 320);
CursorRow = LastCursorRow;
break;
case 0x22: // GRAM Buffer
if (LogEnable)
Expand Down Expand Up @@ -305,6 +307,8 @@ public ushort RegEntryMode

public int CursorRow = 0;
public int CursorColumn = 0;
public int LastCursorRow = 0;
public int LastCursorColumn = 0;
public int GramBuffer = 0;
public void IncCursor()
{
Expand Down
4 changes: 2 additions & 2 deletions Tiedye/Hardware/TI84PCSE/Ti84PlusCSe.cs
Original file line number Diff line number Diff line change
Expand Up @@ -435,15 +435,15 @@ byte ReadLogPort(object sender, ushort address)
switch (address & 0xFF)
{
case 0x00: // D-Bus
return DBus.ReadLines();
return 3;//DBus.ReadLines();
case 0x01: // Keypad
return Keypad.Read();
case 0x02: // TODO: System status
// Bit 1 is the LCD ready timer.
return (byte)(1 | 2 | (Mapper.FlashWriteEnable ? 4 : 0) | 0xE0);
case 0x03: // Interrupt mask
// TODO: DBus interrupt enable
return (byte)((Keypad.OnInterruptEnable ? 1 : 0) | (Apd.GenerateInterrupt ? 2 : 0) | (PApd.GenerateInterrupt ? 4 : 0) | (OffEnableMode ? 8 : 0));// | (DBus.I));
return (byte)((Keypad.OnInterruptEnable ? 1 : 0) | (Apd.GenerateInterrupt ? 2 : 0) | (PApd.GenerateInterrupt ? 4 : 0) | 16);// | (DBus.I));
case 0x04: // Interrupt ID
return (byte)((Keypad.OnKey ? 0 : 8) | ((byte)Interrupts & 0xFF) | (CrystalTimer1.HasExpired ? 0x20 : 0) | (CrystalTimer2.HasExpired ? 0x40 : 0) | (CrystalTimer3.HasExpired ? 0x80 : 0));
case 0x05: // Memory page C
Expand Down
Binary file modified TiedyeDesktop/Resources/layout-myriad-trans-keys.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.

0 comments on commit 4f13c2e

Please sign in to comment.