Skip to content

Commit

Permalink
port some external DMD alphanumeric mapping fixes from lucky1
Browse files Browse the repository at this point in the history
police force, riverboat gambler, GTS80B, GTS3, Hankin
  • Loading branch information
toxieainc committed Nov 23, 2023
1 parent e4f1a21 commit dfb6b3e
Show file tree
Hide file tree
Showing 9 changed files with 287 additions and 117 deletions.
11 changes: 8 additions & 3 deletions ext/dmddevice/Demo/dmddevice_dll/dmddevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -125,18 +125,17 @@ DMDDEV void Render_16_Shades(UINT16 width, UINT16 height, UINT8 *currbuffer)
}
}


DMDDEV void Render_PM_Alphanumeric_Frame(layout_t layout, const UINT16 *const seg_data, const UINT16 *const seg_data2)
{
if (isOpen) {
if (isOpen) {
memset(AlphaNumericFrameBuffer,0x00,2048);

switch (layout) {
case __2x16Alpha :
_2x16Alpha(seg_data);
break;
case __2x20Alpha :
_2x20Alpha(seg_data); //!! misses 4 chars in each row
_2x20Alpha(seg_data);
break;
case __2x7Alpha_2x7Num :
_2x7Alpha_2x7Num(seg_data);
Expand Down Expand Up @@ -174,6 +173,12 @@ DMDDEV void Render_PM_Alphanumeric_Frame(layout_t layout, const UINT16 *const se
case __1x16Alpha_1x16Num_1x7Num :
_1x16Alpha_1x16Num_1x7Num(seg_data);
break;
case __1x7Num_1x16Alpha_1x16Num :
_1x7Num_1x16Alpha_1x16Num(seg_data);
break;
case __1x16Alpha_1x16Num_1x7Num_1x4Num :
_1x16Alpha_1x16Num_1x7Num_1x4Num(seg_data);
break;
default:
break;
}
Expand Down
24 changes: 13 additions & 11 deletions ext/dmddevice/dmddevice.h
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
// license:BSD-3-Clause

#ifdef DMDDEVICE_DLL_EXPORTS
#define DMDDEV __declspec(dllexport)
#define DMDDEV __declspec(dllexport)
#else
#define DMDDEV __declspec(dllimport)
#define DMDDEV __declspec(dllimport)
#endif

typedef struct tPMoptions {
Expand Down Expand Up @@ -35,22 +35,24 @@ UINT8 *OutputPacketBuffer;
typedef int(*Console_Input_t)(UINT8 *buf, int size);
Console_Input_t Console_Input = NULL;

typedef enum {
typedef enum {
None,
__2x16Alpha,
__2x20Alpha,
__2x7Alpha_2x7Num,
__2x7Alpha_2x7Num_4x1Num,
__2x7Num_2x7Num_4x1Num,
__2x7Num_2x7Num_10x1Num,
__2x7Num_2x7Num_4x1Num_gen7,
__2x16Alpha,
__2x20Alpha,
__2x7Alpha_2x7Num,
__2x7Alpha_2x7Num_4x1Num,
__2x7Num_2x7Num_4x1Num,
__2x7Num_2x7Num_10x1Num,
__2x7Num_2x7Num_4x1Num_gen7,
__2x7Num10_2x7Num10_4x1Num,
__2x6Num_2x6Num_4x1Num,
__2x6Num10_2x6Num10_4x1Num,
__4x7Num10,
__6x4Num_4x1Num,
__2x7Num_4x1Num_1x16Alpha,
__1x16Alpha_1x16Num_1x7Num
__1x16Alpha_1x16Num_1x7Num,
__1x7Num_1x16Alpha_1x16Num,
__1x16Alpha_1x16Num_1x7Num_1x4Num
} layout_t;

#ifdef __cplusplus
Expand Down
6 changes: 6 additions & 0 deletions ext/dmddevice/pinDMDv1/dmddevice_dll/dmddevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -366,6 +366,12 @@ DMDDEV void Render_PM_Alphanumeric_Frame(layout_t layout, const UINT16 *const se
case __1x16Alpha_1x16Num_1x7Num :
_1x16Alpha_1x16Num_1x7Num(seg_data);
break;
case __1x7Num_1x16Alpha_1x16Num :
_1x7Num_1x16Alpha_1x16Num(seg_data);
break;
case __1x16Alpha_1x16Num_1x7Num_1x4Num :
_1x16Alpha_1x16Num_1x7Num_1x4Num(seg_data);
break;
default:
break;
}
Expand Down
6 changes: 6 additions & 0 deletions ext/dmddevice/pinDMDv2/dmddevice_dll/dmddevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -442,6 +442,12 @@ DMDDEV void Render_PM_Alphanumeric_Frame(layout_t layout, const UINT16 *const se
case __1x16Alpha_1x16Num_1x7Num :
_1x16Alpha_1x16Num_1x7Num(seg_data);
break;
case __1x7Num_1x16Alpha_1x16Num :
_1x7Num_1x16Alpha_1x16Num(seg_data);
break;
case __1x16Alpha_1x16Num_1x7Num_1x4Num :
_1x16Alpha_1x16Num_1x7Num_1x4Num(seg_data);
break;
default:
break;
}
Expand Down
6 changes: 6 additions & 0 deletions ext/dmddevice/pinDMDv3/dmddevice_dll/dmddevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,12 @@ DMDDEV void Render_PM_Alphanumeric_Frame(layout_t layout, const UINT16 *const se
case __1x16Alpha_1x16Num_1x7Num :
_1x16Alpha_1x16Num_1x7Num(seg_data);
break;
case __1x7Num_1x16Alpha_1x16Num :
_1x7Num_1x16Alpha_1x16Num(seg_data);
break;
case __1x16Alpha_1x16Num_1x7Num_1x4Num :
_1x16Alpha_1x16Num_1x7Num_1x4Num(seg_data);
break;
default:
break;
}
Expand Down
Loading

0 comments on commit dfb6b3e

Please sign in to comment.