mirror of
https://github.com/preble/libpinproc
synced 2026-02-24 18:25:23 +01:00
Fix error in Stern switch mappings.
This commit is contained in:
@@ -235,7 +235,6 @@ PR_EXPORT void PRDriverStatePatter(PRDriverState *driver, uint16_t millisecondsO
|
|||||||
PR_EXPORT uint16_t PRDecode(PRMachineType machineType, const char *str)
|
PR_EXPORT uint16_t PRDecode(PRMachineType machineType, const char *str)
|
||||||
{
|
{
|
||||||
uint16_t x;
|
uint16_t x;
|
||||||
printf("hello\n");
|
|
||||||
|
|
||||||
if (str == NULL)
|
if (str == NULL)
|
||||||
return 0;
|
return 0;
|
||||||
@@ -281,7 +280,6 @@ PR_EXPORT uint16_t PRDecode(PRMachineType machineType, const char *str)
|
|||||||
}
|
}
|
||||||
else if (machineType == kPRMachineStern)
|
else if (machineType == kPRMachineStern)
|
||||||
{
|
{
|
||||||
printf("hi\n");
|
|
||||||
switch (str[0])
|
switch (str[0])
|
||||||
{
|
{
|
||||||
case 'L':
|
case 'L':
|
||||||
@@ -302,7 +300,7 @@ PR_EXPORT uint16_t PRDecode(PRMachineType machineType, const char *str)
|
|||||||
else return x + 7;
|
else return x + 7;
|
||||||
default:
|
default:
|
||||||
if ((x - 1) % 16 < 8)
|
if ((x - 1) % 16 < 8)
|
||||||
return 32 + 8 * (x / 8) + (7 - ((x - 1) % 8));
|
return 32 + 8 * ((x - 1) / 8) + (7 - ((x - 1) % 8));
|
||||||
else
|
else
|
||||||
return 32 + (x - 1);
|
return 32 + (x - 1);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user