Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:08 23 Jul 2025 Privacy Policy
Jump to

Notice. New forum software under development. It's going to miss a few functions and look a bit ugly for a while, but I'm working on it full time now as the old forum was too unstable. Couple days, all good. If you notice any issues, please contact me.

Forum Index : Microcontroller and PC projects : uM2(+): User Loadable Display Drivers

Author Message
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10287
Posted: 08:14am 16 Aug 2015
Copy link to clipboard 
Print this post

In this thread Peter Carnegie (G8JCF) introduced the new approach to user loadable display drivers.

This mechanism loads up a driver as a CFunction that then allows you to use all of the graphics functions and commands available in the Micromite firmware version you are using (must be 4.7b23 or later).

In his post he included a driver to allow use of the 4.3", 5", and 7" SSD1963 displays on an 8-bit databus on the uM2. This driver isn't really needed on the uM+ as the SSD1963 support is included in the MX470 firmware. However the driver would work on the uM+ just as well as the uM2.

In this thread we will add additional user loadable display drivers that can be used on either the uM2 or uM+

This post has code for the 2.2" 176x220 displays based on the S6D0164 graphics chip. These displays have the advantage of being very fast to drive with an 8-bit parallel bus and very bright.
Note that pins DB8-DB15 are used on this display for the 8-bit databus connections.



The code includes optimisations that increase performance on the uM+ if the pins designated LCD_D0-LCD_D7 are used for DB8-DB15 as in the example code below
The code is also optimised if pins 25,26,27,36,37,38,2,3 are used for DB8-DB15 on a 44-pin MX170. In this case pins 4 and 5 must be left unconnected.
Otherwise performance is still good with a completely free selection of pins on any of the uM2(+) variants.


OPTION EXPLICIT
OPTION DEFAULT None

PRINT "S6D0164 CFunction Drivers Example"


'Initialise the Display Driver
'FUNCTION Display.Open(DB8,DB9,DB10,DB11%,DB12%,DB13%,DB14%,DB15%,RS%,WR%,RST%,Orient%)
' NB Tie CS Low and tie RD high
' Orient% is 1 for landscape, 2 for Portrait orientation, 3 for reverse landscape, 4 for reverse portrait
dim Orientation%=2

dim Retrn%=Display.Open(60, 61, 62, 63, 64, 1, 2, 3, 24, 27, 28,Orientation%)

' Display the driver version number
print "Driver version is ",Display.Ver()
'Use Font 2 and scale x2
Font 2,2

'Yellow FG, Dark Blue BG
Colour &HFFFF00,&H000066

'Clearscreen
CLS
'Draw a Red Frame
Box 0,0,MM.HRes-4,MM.VRes-4,4,&HFF0000,-1

Text MM.HRES\2-60,(MM.VRes/2)-100,"S6D0164"

Text MM.HRES\2-65,(MM.VRes/2)+70,STR$(MM.HRes)+" "+STR$(MM.VRes)

Text MM.Hres\2 - 10,(MM.VRes/2)+70,"x"

DIM I%

'Countdown
FOR I%=9 TO 0 STEP -1
Text (MM.Hres/2)-40, (MM.VRes/2)-45,STR$(I%),,1,2,&H00FF00,&H000066
PAUSE 900
NEXT I%

'Change Orientation to Portrait to show that calling
'Display.Open again in a program is legal
Orientation%=1
Retrn%=Display.Open(60, 61, 62, 63, 64, 1, 2, 3, 24, 27, 28, Orientation%)

GUI Test Display

'Close the driver
Retrn%=Display.Close()
END



'**********Append this code and below onto the end of your MMBasic program***********
'
' Copyright (c) Peter Mather 2015
'
' Initialise the Display Driver for S6D0164 controlled 176x220 TFT LCD Panel
'
' OpenDriver initialises the loadable CFunction driver so that you can use all of the
' MMBasic graphic commands in your program.
'
'
' NB Tie CS Low and tie RD high
' Make sure Solder jumper J2 is open for 8-bit mode
' note the 8 data bits are connected to DB8-DB15 and NOT DB0-7
'
' DB8% ~ DB15 are the pin numbers for the data bus to the display
' RS% is pin number of RS signal
' WR% is pin number of WR signal
' RST% is pin number of Reset signal
' Orient% is 1 for landscape, 2 for Portrait orientation, 3 for reverse landscape, 4 for reverse portrait
'
' After Calling Display.Open, any of the usual MM Graphic commands may be used
' in your MMBasic program, eg BOX, TEXT, LINE, CIRCLE etc
'
' Note: on the MM+, if you use the standard LCD pins for the data pins DB8-DB15
' performance is optimised
' Note: on the 44-pin MM2, if you use pins 25,26,27,36,37,38,2,3 for the data
' pins DB8-DB15 performace is optimised
'
' Ver 1.01 2015-08-16 Initial Release
'
'**********************************************************************************

FUNCTION Display.Open(DB8%, DB9%, DB10%, DB11%, DB12%, DB13%, DB14%, DB15%, RS%, WR%, RST%, Orient%) as integer
'Arrays to pass data into the InitDriver CFunction
LOCAL Pindefs%(16)
LOCAL DisplayMetrics%(4)
LOCAL CFuncAddr%
LOCAL Retrn%

'CFunctions always return a 64 bit integer

PinDefs%(0)=DB8%:PinDefs%(1)=DB9%:PinDefs%(2)=DB10%:PinDefs%(3)=DB11%
PinDefs%(4)=DB12%:PinDefs%(5)=DB13%:PinDefs%(6)=DB14%:PinDefs%(7)=DB15%

PinDefs%(8)=RS%: PinDefs%(9)=WR%: PinDefs%(10)=RST%

DisplayMetrics%(0)=Orient%

CFuncAddr%=PEEK(CFUNADDR Driver_S6D0164)

'Initialise the S6D0164 driver
Retrn%=Driver_S6D0164(0,CFuncAddr%,PinDefs%(),DisplayMetrics%())
Display.Open=Retrn%

'Check Return codes
SELECT CASE Retrn%
CASE 0
EXIT FUNCTION
CASE 1
ERROR "Driver_SSD1963.Open : "+STR$(Retrn%)+" : Driver Already Open - use CPU Restart"
CASE ELSE
ERROR "Driver_SSD1963.Open : "+STR$(Retrn%)+" : Unknown Error"
END SELECT

END SUB

FUNCTION Display.Close() AS FLOAT

LOCAL Retrn%=Driver_S6D0164(1)

Display.Close=Retrn%

'Check Return codes
SELECT CASE Retrn%
CASE 0
EXIT FUNCTION
CASE 1
PRINT "Warning: Driver_SSD1963.Close : "+STR$(Retrn%)+" : Driver Already Closed"
EXIT FUNCTION
CASE ELSE
ERROR "Driver_SSD1963.Close : "+STR$(Retrn%)+" : Unknown Error"
END SELECT

END FUNCTION


FUNCTION Display.Ver() AS FLOAT

LOCAL Retrn%=Driver_S6D0164(2)
Display.Ver=Retrn% / 100

END FUNCTION
'******************************************************************************
CFunction Driver_S6D0164
0000026F
3c029d00 8c42008c 8c420000 8c43000c 1060000e 308400ff 24050001 54650004
8c45000c 3c03bf88 ac646230 8c45000c 24030002 54a30056 8c430054 3c03bf88
ac646430 10000052 8c430054 30830001 50600006 8c4300c0 8c4300a0 8c450080
ac650000 10000004 30830002 8c450080 ac650000 30830002 50600006 8c4300c4
8c4300a4 8c450084 ac650000 10000004 30830004 8c450084 ac650000 30830004
50600006 8c4300c8 8c4300a8 8c450088 ac650000 10000004 30830008 8c450088
ac650000 30830008 50600006 8c4300cc 8c4300ac 8c45008c ac650000 10000004
30830010 8c45008c ac650000 30830010 50600006 8c4300d0 8c4300b0 8c450090
ac650000 10000004 30830020 8c450090 ac650000 30830020 50600006 8c4300d4
8c4300b4 8c450094 ac650000 10000004 30830040 8c450094 ac650000 30830040
50600006 8c4300d8 8c4300b8 8c450098 ac650000 10000004 7c042420 8c450098
ac650000 7c042420 04830006 8c4300dc 8c4300bc 8c44009c ac640000 10000004
8c430054 8c44009c ac640000 8c430054 8c44004c ac640000 8c430050 8c42004c
ac620000 03e00008 00000000
27bdffe8 afbf0014 afb00010 00808021 3c029d00 8c42008c 8c420000 8c430048
8c420040 ac620000 7c843a00 0411FF89 00000000 320400ff 0411FF86 00000000
8fbf0014 8fb00010 03e00008 27bd0018
27bdffe0 afbf001c afb20018 afb10014 afb00010 00808821 00a09021 3c029d00
8c42008c 8c500000 8e020048 8e030040 ac430000 7c843a00 0411FF72 00000000
322400ff 0411FF6F 00000000 8e020044 8e030040 ac430000 7e443a00 0411FF69
00000000 324400ff 0411FF66 00000000 8fbf001c 8fb20018 8fb10014 8fb00010
03e00008 27bd0020
27bdffd0 afbf002c afb50028 afb40024 afb30020 afb2001c afb10018 afb00014
2483ffff 00661821 24a6ffff 00c73021 3c079d00 8ce7008c 8cf00000 8e080000
24070002 15070008 24070004 00809021 00601021 00a09821 00c08821 00a0a821
10000019 0080a021 1507000c 24070001 8e020004 2442ffff 00439023 00441023
8e110008 2631ffff 02269823 02258823 0220a821 10000017 0040a021 1507000b
24070003 8e020004 2442ffff 00469023 00451023 00809821 00608821 0080a821
1000000c 0040a021 24070003 5507000a 24040036 00a09021 00c01021 8e110008
2631ffff 02239823 02248823 0220a821 00a0a021 24040036 00402821 0411FF9E
00000000 24040037 02402821 0411FF9A 00000000 24040038 02202821 0411FF96
00000000 24040039 02602821 0411FF92 00000000 24040020 02802821 0411FF8E
00000000 24040021 02a02821 0411FF8A 00000000 24040022 0411FF73 00000000
8e020044 8e030040 ac430000 8fbf002c 8fb50028 8fb40024 8fb30020 8fb2001c
8fb10018 8fb00014 03e00008 27bd0030
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 3c029d00 8c42008c
8c510000 0086102a 14400004 8fb00038 00801021 00c02021 00403021 00a7102a
14400005 28820000 00a01021 00e02821 00403821 28820000 0002200b 3c029d00
8c420094 8c420000 0082402b 2443ffff 0068200a 28c30000 0003300b 00c2182b
2442ffff 0043300a 28a20000 0002280b 3c029d00 8c420098 8c430000 00a3402b
2462ffff 0048280a 28e20000 0002380b 00e01021 00e3382b 2463ffff 0067100a
24070001 00e41823 00663021 00e53823 00e23821 70e69802 0411FF65 00000000
7e0220c0 00109203 3252f800 00529025 00108143 321007e0 02509025 00128202
325200ff 52120011 321000ff 12600028 2671ffff 321000ff 325200ff 2413ffff
02002021 0411FEB1 00000000 02402021 0411FEAE 00000000 2631ffff 5633fff9
02002021 1000001b 8fbf0024 02002021 0411FEA6 00000000 02002021 0411FEA3
00000000 2673ffff 12600011 2673ffff 2404ffff 8e220054 8e23004c ac430000
8e220050 8e23004c ac430000 8e220054 8e23004c ac430000 8e220050 8e23004c
ac430000 2673ffff 5664fff3 8e220054 8fbf0024 8fb30020 8fb2001c 8fb10018
8fb00014 03e00008 27bd0028
27bdff88 afbf0074 afbe0070 afb7006c afb60068 afb50064 afb40060 afb3005c
afb20058 afb10054 afb00050 afa40078 00a08021 afa60080 afa70084 8fb20088
8fa4008c 3c029d00 8c42008c 8c420000 8c450000 30a50001 10a00005 8fa30090
8c530008 8c420004 10000004 afa20034 8c530004 8c420008 afa20034 7c9420c0
00041203 3042f800 0282a025 00042143 308407e0 0284a025 7c7120c0 00031203
3042f800 02228825 00031943 306307e0 02238825 0014b202 8fa40078 02002821
8fa20080 72423002 8fa20084 72423802 0411FEF4 00000000 8fa30084 18600075
0011aa02 afb20018 afb00038 8fa20080 afa20044 00021823 afa30048 8fa30084
00620018 00001012 afa20040 afa00014 afa0003c 32b500ff afb50020 323100ff
afb10024 32d600ff afb60028 329400ff 1000005c afb4002c 06000019 0213102b
50400018 26310001 06a20016 26310001 52e00014 26310001 93c20000 8fa30010
00431024 10400009 8fa40020 8fa40028 0411FE2B 00000000 8fa4002c 0411FE28
00000000 10000007 26310001 0411FE24 00000000 8fa40024 0411FE21 00000000
26310001 1632ffe4 26100001 26940001 8fa20018 8fa30080 12830016 02c2b021
8fa30014 02831021 24430007 285e0000 007e100b 0002f0c3 8fa20094 005ef021
8fa2001c 00541823 000317c3 00021742 00621821 30630007 00621023 24030001
00431004 afa20010 02c08021 1000ffca 00008821 8fa20030 24420001 afa20030
14520007 26b50001 1000000c 8fa2003c afa00030 8fa30040 2463ffff afa3001c
8fa20080 1840fff3 8fb60078 0000a021 8fa30034 1000ffda 02a3b82b 24420001
afa2003c 8fa30038 8fa20018 00621821 afa30038 8fa30014 8fa20044 00621821
afa30014 8fa30040 8fa20048 00621821 afa30040 8fa3003c 8fa20084 10620006
8fbf0074 1e40ffe2 8fb50038 1000ffeb 8fa2003c 8fbf0074 8fbe0070 8fb7006c
8fb60068 8fb50064 8fb40060 8fb3005c 8fb20058 8fb10054 8fb00050 03e00008
27bd0078
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 3c029d00 8c42008c
8c500000 02009821 1200002c 24020001 3c119d00 8e220048 8e030014 ac430000
8e22004c 8e03001c ac430000 8e220094 ac400000 8e220098 ac400000 8e220044
0040f809 02002021 8e220010 8e0400e0 00002821 0040f809 00003021 8e220010
8e0400e4 00002821 0040f809 00003021 8e220010 8e0400e8 00002821 0040f809
00003021 26120020 8e220010 8e0400ec 00002821 0040f809 00003021 26100004
5612fffa 8e220010 ae600020 3c029d00 8c42008c ac400000 00001021 8fbf0024
8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0028
27bdffc0 afbf003c afbe0038 afb70034 afb60030 afb5002c afb40028 afb30024
afb20020 afb1001c afb00018 00a0b821 00c0a021 00e0f021 8c820000 24030001
14430008 8c840004 14800007 24030002 0411FFAD 00000000 00402021 10000230
00022fc3 24030002 14430003 3c029d00 1080022a 24040065 8c42008c 8c420000
10400009 00409821 8c430020 24040001 3c02dead 3442c001 14620221 00002821
1000000c 2665000c 3c109d00 8e02003c 0040f809 24040200 00409821 8e02008c
ac530000 3c02dead 3442c001 ae620020 2665000c ae60000c 3c02bf81 8c42f220
7c42d800 3c030661 24630053 1043000b 2403001c 3c030660 24630053 10430006
3c040661 3484a053 1044000e 2403002c 10000002 2403ffff 2403001c 3c040660
3484a053 10440006 3c040580 3484a053 50440009 24030040 10000003 3c040580
2403002c 3c040580 3484b053 00441026 24040064 0082180a 8e840000 24020019
1482003c 2402003c 8e820004 14400039 2402003c 8e840008 2402001a 54820034
8e840000 8e82000c 54400031 8e840000 8e840010 2402001b 5482002d 8e840000
8e820014 5440002a 8e840000 8e840018 24020024 14820063 02808821 8e82001c
14400061 02609021 8e840020 24020025 1482005e 0000a821 8e820024 1440005c
3c109d00 8e840028 24020026 14820059 24160001 8e82002c 54400057 8e020028
8e840030 24020002 54820053 8e020028 8e820034 54400050 8e020028 8e840038
24020003 5482004c 8e020028 8e82003c 54400049 8e020028 2402002c 54620046
8e020028 24020001 aca20000 8e840000 2402003c 5482003b 02808821 8e820004
54400038 02808821 8e840008 2402003d 54820034 02808821 8e82000c 54400031
02808821 8e840010 2402003e 5482002d 02808821 8e820014 5440002a 02808821
8e840018 2402003f 54820026 02808821 8e82001c 54400023 02808821 8e840020
24020040 5482001f 02808821 8e820024 5440001c 02808821 8e840028 24020001
54820018 02808821 8e82002c 54400015 02808821 8e840030 24020002 54820011
02808821 8e820034 1440000e 02808821 8e840038 24020003 1482000a 00000000
8e82003c 54400008 02609021 24020040 54620005 02609021 24020002 aca20000
02808821 02609021 0000a821 3c109d00 24160001 8e020028 0040f809 8e240000
00561004 ae420080 8e020024 8e240000 0040f809 24050006 ae4200a0 8e020024
8e240000 0040f809 24050005 ae4200c0 8e020010 8e240000 24050008 0040f809
00003021 8e020014 8e240000 0040f809 00002821 8e220000 ae4200ec 26b50001
26310008 24020008 16a2ffe2 26520004 3c109d00 8e020028 0040f809 8e840040
24110001 00511004 ae620040 8e020024 8e840040 0040f809 24050006 ae620044
8e020024 8e840040 0040f809 24050005 ae620048 8e020010 8e840040 24050008
0040f809 00003021 8e820040 ae6200e0 8e620044 8e630040 ac430000 8e020028
0040f809 8e840048 00511004 ae62004c 8e020024 8e840048 0040f809 24050006
ae620050 8e020024 8e840048 0040f809 24050005 ae620054 8e020010 8e840048
24050008 0040f809 00003021 8e820048 ae6200e4 8e620050 8e63004c ac430000
8e020010 8e840050 24050008 0040f809 00003021 8e020014 8e840050 0040f809
24050001 8e820050 ae6200e8 3c029d00 244209bc 3c039d00 24630414 0062202b
10800005 00621823 8ee40000 00641821 10000004 ae630010 8ee40000 00641821
ae630010 3c039d00 246305e0 0062202b 10800005 00621023 8ee40000 00441021
10000004 ae620018 8ee40000 00441021 ae620018 240200b0 ae620004 240200dc
ae620008 8fc20000 ae620000 3c109d00 8e030090 a0620015 8e020014 8e840050
0040f809 24050001 8e020004 0040f809 24042710 8e020014 8e840050 0040f809
00002821 8e020004 0040f809 24042710 8e020014 8e840050 0040f809 24050001
8e020004 0040f809 24042710 24040011 2405001a 0411FCA2 00000000 24040012
24053121 0411FC9E 00000000 24040013 2405006c 0411FC9A 00000000 24040014
24054249 0411FC96 00000000 24040010 24050800 0411FC92 00000000 8e020004
0040f809 24042710 24040011 2405011a 0411FC8B 00000000 8e020004 0040f809
24042710 24040011 2405031a 0411FC84 00000000 8e020004 0040f809 24042710
24040011 2405071a 0411FC7D 00000000 8e020004 0040f809 24042710 24040011
24050f1a 0411FC76 00000000 8e020004 0040f809 24042710 24040011 24050f3a
0411FC6F 00000000 8e020004 0040f809 24047530 24040001 2405011c 0411FC68
00000000 24040002 24050100 0411FC64 00000000 24040003 24051030 0411FC60
00000000 24040007 00002821 0411FC5C 00000000 24040008 24050808 0411FC58
00000000 2404000b 24051100 0411FC54 00000000 2404000c 00002821 0411FC50
00000000 2404000f 24051401 0411FC4C 00000000 24040015 00002821 0411FC48
00000000 24040020 00002821 0411FC44 00000000 24040021 00002821 0411FC40
00000000 24040036 240500af 0411FC3C 00000000 24040037 00002821 0411FC38
00000000 24040038 240500db 0411FC34 00000000 24040039 00002821 0411FC30
00000000 2404000f 24050b01 0411FC2C 00000000 24040007 24050016 0411FC28
00000000 24040007 24050017 0411FC24 00000000 8e020004 0040f809 3404c350
8e630000 24020002 1462000e 24020004 3c029d00 8c430094 240400b0 ac640000
8c420098 240300dc ac430000 24040003 24051030 0411FC12 00000000 8e630000
24020004 5462000d 8e630000 3c029d00 8c430094 240400b0 ac640000 8c420098
240300dc ac430000 24040003 24051000 0411FC03 00000000 8e630000 24020001
5462000d 8e630000 3c029d00 8c430094 240400dc ac640000 8c420098 240300b0
ac430000 24040003 24051028 0411FBF4 00000000 8e630000 24020003 1462000c
3c109d00 3c029d00 8c430094 240400dc ac640000 8c420098 240300b0 ac430000
24040003 24051018 0411FBE5 00000000 8e020048 8c420000 ae620014 8e02004c
8c420000 ae62001c 8e020048 8e630010 ac430000 8e020048 8e030094 8c660000
8e030098 8c670000 afa00010 8c420000 00002021 00002821 24c6ffff 0040f809
24e7ffff 8e02004c 8e630018 ac430000 00002021 10000002 00002821 00002821
00801021 00a01821 8fbf003c 8fbe0038 8fb70034 8fb60030 8fb5002c 8fb40028
8fb30024 8fb20020 8fb1001c 8fb00018 03e00008 27bd0040
End CFunction
Edited by matherp 2015-08-17
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10287
Posted: 09:43pm 16 Aug 2015
Copy link to clipboard 
Print this post

Next driver is for the SSD1289 typically seen in 3.2" 240 x 320 versions



This has a 16-bit parallel interface + 3 control lines (RS, WR, and RESET) so although it is theoretically possible to use on a 28-pin uM2 it is more useful on the 44-pin uM2 or UM+.

Note that the basic mechanisms of the routines to set up the display are identical to those for the S6D0164 and Peter Carnegie's SSD1963 driver.

These displays also support touch input. To use the inbuilt touch mechanism with the loadable display is easy.

Run the attached program but comment out the line:
Retrn%=Display.Close()

Once the GUI TEST DISPLAY is running (lots of circles) press return on the console to stop the program. This will leave the display driver loaded and operational.

Then enter "OPTION TOUCH cspin,irqpin" substituting in the the correct pin numbers.
Finally enter "GUI CALIBRATE" to calibrate the touch system.

Now you can reset the processor and the touch characteristics for your display will have been stored.

You can now run your own program using the loadable driver and full touch input support as per the in-built drivers


OPTION EXPLICIT
OPTION DEFAULT None

PRINT "SSD1289 16-bit CFunction Driver Example"


'Initialise the Display Driver
' Function Display.Open(D0%,D1%,D2%,D3%,D4%,D5%,D6%,D7%,D8%,D9%,D10%,D11%,D12%,D13%,D14%,D15%,RS%,WR%,RST%,Orient%)
' NB Tie CS Low and tie RD high
' Orient% is 1 for landscape, 2 for Portrait orientation, 3 for reverse landscape, 4 for reverse portrait
dim Orientation%=2
dim Retrn%=Display.Open(11,12,13,14,15,16,17,18,60, 61, 62, 63, 64, 1, 2, 3, 24, 27, 28,Orientation%)

' Display the driver version number
print "Driver version is ",Display.Ver()

'Use Font 2 and scale x2
Font 2,2

'Yellow FG, Dark Blue BG
Colour &HFFFF00,&H000066

'Clearscreen
CLS 'Draw a Red Frame
Box 0,0,MM.HRes-4,MM.VRes-4,4,&HFF0000,-1

Text MM.HRES\2-60,(MM.VRes/2)-100,"SSD1289"

Text MM.HRES\2-65,(MM.VRes/2)+70,STR$(MM.HRes)+" "+STR$(MM.VRes)

Text MM.Hres\2 - 10,(MM.VRes/2)+70,"x"

DIM I%

'Countdown
FOR I%=9 TO 0 STEP -1
Text (MM.Hres/2)-40, (MM.VRes/2)-45,STR$(I%),,1,2,&H00FF00,&H000066
PAUSE 900
NEXT I%

'Change Orientation to Portrait to show that calling
'Display.Open again in a program is legal
Orientation%=1
Retrn%=Display.Open(11,12,13,14,15,16,17,18,60, 61, 62, 63, 64, 1, 2, 3, 24, 27, 28, Orientation%)

GUI Test Display

'Close the driver
Retrn%=Display.Close()

END



'**********Append this code and below onto the end of your MMBasic program***********
'
' Copyright (c) Peter Mather 2015
'
' Initialise the Display Driver for SSD1289 controlled TFT LCD Panel in 16-bit mode
' i.e. RGB565.
'
' Display.Open initialises the loadable CFunction driver so that you can use all of the
' MMBasic graphic commands in your program.
'
' D0% ~ D15% are the pin numbers for the data bus to the display
' RS% is pin number of RS signal
' WR% is pin number of WR signal
' RST% is pin number of Reset signal
' Orient% PORTRAIT=0,RPORTRAIT=1,LANDSCAPE=2,RLANDSCAPE=3
'
' After Calling Display.Open, any of the usual MM Graphic commands may be used
' in your MMBasic program, eg BOX, TEXT, LINE, CIRCLE etc
'
' Ver 1.02 2015-08-17 Initial Release
'
'**********************************************************************************

FUNCTION Display.Open(D0%,D1%,D2%,D3%,D4%,D5%,D6%,D7%,D8%,D9%,D10%,D11%,D12%,D13%,D14%,D15%,RS%,WR%,RST%,Orient%,Size!) as integer

LOCAL Pindefs%(20)
LOCAL DisplayMetrics%(4)
LOCAL CFuncAddr%
LOCAL Retrn%

'Open Driver Function, 0=Open, 1=Close, 2=Ver
LOCAL DriverFunc%=0

PinDefs%(0)=D0%:PinDefs%(1)=D1%:PinDefs%(2)=D2%:PinDefs%(3)=D3%
PinDefs%(4)=D4%:PinDefs%(5)=D5%:PinDefs%(6)=D6%:PinDefs%(7)=D7%
PinDefs%(8)=D8%:PinDefs%(9)=D9%:PinDefs%(10)=D10%:PinDefs%(11)=D11%
PinDefs%(12)=D12%:PinDefs%(13)=D13%:PinDefs%(14)=D14%:PinDefs%(15)=D15%
PinDefs%(16)=RS%
PinDefs%(17)=WR%
PinDefs%(18)=RST%

DisplayMetrics%(0)=Orient%

CFuncAddr%=PEEK(CFUNADDR Driver_SSD1289)

Retrn%=Driver_SSD1289(DriverFunc%,CFuncAddr%,PinDefs%(),DisplayMetrics%())

Display.Open=Retrn%

'Check Return codes
SELECT CASE Retrn%
CASE 0
EXIT FUNCTION
CASE 1
ERROR "Driver_SSD1289.Open : "+STR$(Retrn%)+" : Driver Already Open - use CPU Restart"
CASE ELSE
ERROR "Driver_SSD1289.Open : "+STR$(Retrn%)+" : Unknown Error"
END SELECT

END SUB

'**********************************************************************************
' Close the display driver
'**********************************************************************************

FUNCTION Display.Close() AS FLOAT
local Retrn%=Driver_SSD1289(1)
Display.Close=Retrn%

'Check Return codes
SELECT CASE Retrn%
CASE 0
EXIT FUNCTION
CASE 1
PRINT "Warning: Driver_SSD1289.Close : "+STR$(Retrn%)+" : Driver Already Closed"
EXIT FUNCTION
CASE ELSE
ERROR "Driver_SSD1289.Close : "+STR$(Retrn%)+" : Unknown Error"
END SELECT
end FUNCTION


FUNCTION Display.Ver() AS FLOAT

LOCAL Retrn%=Driver_SSD1289(2)
Display.Ver=Retrn% / 100

END FUNCTION
'******************************************************************************
'Driver_SSD1289 2015-08-16 18:50:05 UTC Author:Peter with CFuncGen Ver 2.1.1.0
CFunction Driver_SSD1289
00000278
3c029d00 8c42008c 30830001 10600006 8c420000 8c4300c0 8c450080 ac650000
10000005 30830002 8c430100 8c450080 ac650000 30830002 50600006 8c430104
8c4300c4 8c450084 ac650000 10000004 30830004 8c450084 ac650000 30830004
50600006 8c430108 8c4300c8 8c450088 ac650000 10000004 30830008 8c450088
ac650000 30830008 50600006 8c43010c 8c4300cc 8c45008c ac650000 10000004
30830010 8c45008c ac650000 30830010 50600006 8c430110 8c4300d0 8c450090
ac650000 10000004 30830020 8c450090 ac650000 30830020 50600006 8c430114
8c4300d4 8c450094 ac650000 10000004 30830040 8c450094 ac650000 30830040
50600006 8c430118 8c4300d8 8c450098 ac650000 10000004 30830080 8c450098
ac650000 30830080 50600006 8c43011c 8c4300dc 8c45009c ac650000 10000004
30830100 8c45009c ac650000 30830100 50600006 8c430120 8c4300e0 8c4500a0
ac650000 10000004 30830200 8c4500a0 ac650000 30830200 50600006 8c430124
8c4300e4 8c4500a4 ac650000 10000004 30830400 8c4500a4 ac650000 30830400
50600006 8c430128 8c4300e8 8c4500a8 ac650000 10000004 30830800 8c4500a8
ac650000 30830800 50600006 8c43012c 8c4300ec 8c4500ac ac650000 10000004
30831000 8c4500ac ac650000 30831000 50600006 8c430130 8c4300f0 8c4500b0
ac650000 10000004 30832000 8c4500b0 ac650000 30832000 50600006 8c430134
8c4300f4 8c4500b4 ac650000 10000004 30834000 8c4500b4 ac650000 30834000
50600006 8c430138 8c4300f8 8c4500b8 ac650000 10000004 30848000 8c4500b8
ac650000 30848000 50800006 8c43013c 8c4300fc 8c4400bc ac640000 10000004
8c430054 8c4400bc ac640000 8c430054 8c44004c ac640000 8c430050 8c42004c
ac620000 03e00008 00000000
27bdffe0 afbf001c afb10018 afb00014 00a08821 3c029d00 8c42008c 8c500000
8e020048 8e030040 ac430000 0411FF49 00000000 8e020044 8e030040 ac430000
02202021 0411FF43 00000000 8fbf001c 8fb10018 8fb00014 03e00008 27bd0020
27bdffd8 afbf0024 afb40020 afb3001c afb20018 afb10014 afb00010 2488ffff
01063021 24a8ffff 01073821 3c089d00 8d08008c 8d100000 8e090000 24080002
15280008 24080004 00801821 00c01021 00a09021 00e08821 00a0a021 10000019
00809821 1528000c 24080001 8e020004 2442ffff 00461823 00441023 8e110008
2631ffff 02279023 02258823 0220a021 10000017 00409821 1528000b 24080003
8e020004 2442ffff 00471823 00451023 00809021 00c08821 0080a021 1000000c
00409821 24080003 1528000a 00021200 00a01821 00e01021 8e110008 2631ffff
02269023 02248823 0220a021 00a09821 00021200 24040044 00432821 0411FFA8
00000000 24040045 02402821 0411FFA4 00000000 24040046 02202821 0411FFA0
00000000 2404004e 02602821 0411FF9C 00000000 2404004f 02802821 0411FF98
00000000 8e020048 8e030040 ac430000 24040022 0411FEE7 00000000 8e020044
8e030040 ac430000 8fbf0024 8fb40020 8fb3001c 8fb20018 8fb10014 8fb00010
03e00008 27bd0028
27bdffe0 afbf001c afb20018 afb10014 afb00010 3c029d00 8c42008c 8c500000
0086102a 14400004 8fb10030 00801021 00c02021 00403021 00a7102a 14400005
28820000 00a01021 00e02821 00403821 28820000 0002200b 3c029d00 8c420094
8c420000 0082402b 2443ffff 0068200a 28c30000 0003300b 00c2182b 2442ffff
0043300a 28a20000 0002280b 3c029d00 8c420098 8c430000 00a3402b 2462ffff
0048280a 28e20000 0002380b 00e01021 00e3382b 2463ffff 0067100a 24070001
00e41823 00663021 00e53823 00e23821 70e69002 0411FF68 00000000 7e2220c0
00112203 3084f800 00442025 00118943 323107e0 00912025 0411FE9C 00000000
2652ffff 1240000b 2652ffff 2404ffff 8e020054 8e03004c ac430000 8e020050
8e03004c ac430000 2652ffff 5644fff9 8e020054 8fbf001c 8fb20018 8fb10014
8fb00010 03e00008 27bd0020
27bdff90 afbf006c afbe0068 afb70064 afb60060 afb5005c afb40058 afb30054
afb20050 afb1004c afb00048 afa40070 00a08021 afa60078 afa7007c 8fb20080
8fa30084 3c049d00 8c84008c 8c940000 8e840000 30840001 10800005 8fa20088
8e930008 8e840004 10000004 afa40030 8e930004 8e840008 afa40030 7c6520c0
00032203 3084f800 00a42025 00031943 306307e0 00831825 afa30018 7c4420c0
00021a03 3063f800 00831825 00021143 304207e0 00621025 afa2001c 8fa40070
02002821 8fa20078 72423002 8fa2007c 72423802 0411FF15 00000000 8fa3007c
1860007e 8fbf006c afb20028 afb00034 8fa40078 afa40040 00041023 afa20044
00640018 00001012 afa2003c afa00020 afa00038 1000006d 2403ffff 06000029
0213102b 50400028 26310001 06c20026 26310001 53c00024 26310001 8fa40010
90820000 8fa40014 00441024 50400010 8fa4001c 8fa20018 14430009 8fa40018
8e820054 8e83004c ac430000 8e820050 8e83004c ac430000 10000012 8fa30018
0411FE27 00000000 1000000e 8fa30018 14830009 8fa4001c 8e820054 8e83004c
ac430000 8e820050 8e83004c ac430000 10000004 8fa3001c 0411FE19 00000000
8fa3001c 26310001 1632ffd4 26100001 26b50001 8fa20028 8fa40078 12a40017
02e2b821 8fa40020 02a41021 24440007 28450000 0085100b 000210c3 8fa4008c
00821021 afa20010 8fa20024 00552023 000417c3 00021742 00822021 30840007
00821023 24040001 00441004 afa20014 02e08021 1000ffb9 00008821 8fa2002c
24420001 afa2002c 14520007 26d60001 1000000c 8fa20038 afa0002c 8fa4003c
2484ffff afa40024 8fa20078 1840fff3 8fb70070 0000a821 8fa40030 1000ffd9
02c4f02b 24420001 afa20038 8fa40034 8fa20028 00822021 afa40034 8fa40020
8fa20040 00822021 afa40020 8fa4003c 8fa20044 00822021 afa4003c 8fa40038
8fa2007c 10820005 8fbf006c 1e40ffe2 8fb60034 1000ffeb 8fa20038 8fbe0068
8fb70064 8fb60060 8fb5005c 8fb40058 8fb30054 8fb20050 8fb1004c 8fb00048
03e00008 27bd0070
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 3c029d00 8c42008c
8c500000 02009821 1200002c 24020001 3c119d00 8e220048 8e030014 ac430000
8e22004c 8e03001c ac430000 8e220094 ac400000 8e220098 ac400000 8e220044
0040f809 02002021 8e220010 8e040140 00002821 0040f809 00003021 8e220010
8e040144 00002821 0040f809 00003021 8e220010 8e040148 00002821 0040f809
00003021 26120040 8e220010 8e04014c 00002821 0040f809 00003021 26100004
5612fffa 8e220010 ae600020 3c029d00 8c42008c ac400000 00001021 8fbf0024
8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0028
27bdffc0 afbf003c afbe0038 afb70034 afb60030 afb5002c afb40028 afb30024
afb20020 afb1001c afb00018 00a0f021 00c0a821 afa7004c 8c820000 24030001
14430008 8c840004 14800007 24030002 0411FFAD 00000000 00402021 10000188
00022fc3 24030002 14430003 3c029d00 10800182 24040066 8c42008c 8c420000
10400009 0040a021 8c430020 24040001 3c02dead 3442c001 14620179 00002821
1000000c 02a08821 3c109d00 8e02003c 0040f809 24040200 0040a021 8e02008c
ac540000 3c02dead 3442c001 ae820020 02a08821 02809021 00009821 3c109d00
24160001 24170010 8e020028 0040f809 8e240000 00561004 ae420080 8e020024
8e240000 0040f809 24050006 ae4200c0 8e020024 8e240000 0040f809 24050005
ae420100 8e020010 8e240000 24050008 0040f809 00003021 8e020014 8e240000
0040f809 00002821 8e220000 ae42014c 26730001 26310008 1677ffe3 26520004
3c109d00 8e020028 0040f809 8ea40080 24110001 00511004 ae820040 8e020024
8ea40080 0040f809 24050006 ae820044 8e020024 8ea40080 0040f809 24050005
ae820048 8e020010 8ea40080 24050008 0040f809 00003021 8ea20080 ae820140
8e820044 8e830040 ac430000 8e020028 0040f809 8ea40088 00511004 ae82004c
8e020024 8ea40088 0040f809 24050006 ae820050 8e020024 8ea40088 0040f809
24050005 ae820054 8e020010 8ea40088 24050008 0040f809 00003021 8ea20088
ae820144 8e820050 8e83004c ac430000 8e020010 8ea40090 24050008 0040f809
00003021 8e020014 8ea40090 0040f809 24050001 8ea20090 ae820148 3c029d00
244209e0 3c039d00 24630494 0062202b 10800005 00621823 8fc40000 00641821
10000004 ae830010 8fc40000 00641821 ae830010 3c039d00 246305e0 0062202b
10800005 00621023 8fc40000 00441021 10000004 ae820018 8fc40000 00441021
ae820018 8fa3004c 8c620000 ae820000 26920004 240200f0 ae820004 26910008
24020140 ae820008 3c109d00 8e020090 8e830000 a0430015 8e020014 8ea40090
0040f809 24050001 8e020004 0040f809 24042710 8e020014 8ea40090 0040f809
00002821 8e020004 0040f809 24042710 8e020014 8ea40090 0040f809 24050001
8e020004 0040f809 24042710 00002021 24050001 0411FD5D 00000000 24040003
3405a8a4 0411FD59 00000000 2404000c 00002821 0411FD55 00000000 2404000d
2405080c 0411FD51 00000000 2404000e 24052b00 0411FD4D 00000000 2404001e
240500b7 0411FD49 00000000 24040001 24052b3f 0411FD45 00000000 24040002
24050600 0411FD41 00000000 24040010 00002821 0411FD3D 00000000 24040011
24056070 0411FD39 00000000 24040005 00002821 0411FD35 00000000 24040006
00002821 0411FD31 00000000 24040016 3405ef1c 0411FD2D 00000000 24040017
24050003 0411FD29 00000000 24040007 24050233 0411FD25 00000000 2404000b
00002821 0411FD21 00000000 2404000f 00002821 0411FD1D 00000000 24040041
00002821 0411FD19 00000000 24040042 00002821 0411FD15 00000000 24040048
00002821 0411FD11 00000000 24040049 2405013f 0411FD0D 00000000 2404004a
00002821 0411FD09 00000000 2404004b 00002821 0411FD05 00000000 24040030
24050707 0411FD01 00000000 24040031 24050204 0411FCFD 00000000 24040032
24050204 0411FCF9 00000000 24040033 24050502 0411FCF5 00000000 24040034
24050507 0411FCF1 00000000 24040035 24050204 0411FCED 00000000 24040036
24050204 0411FCE9 00000000 24040037 24050502 0411FCE5 00000000 2404003a
24050302 0411FCE1 00000000 2404003b 24050302 0411FCDD 00000000 24040023
00002821 0411FCD9 00000000 24040024 00002821 0411FCD5 00000000 24040025
34058000 0411FCD1 00000000 8e820000 24030004 10430009 24056040 24030001
10430006 24056068 38450003 24036070 24046058 0085180a 00602821 24040011
0411FCC2 00000000 8e820000 30420001 10400008 3c029d00 8c430098 8e440000
ac640000 8c420094 8e230000 10000007 ac430000 8c430094 8e440000 ac640000
8c420098 8e230000 ac430000 3c109d00 8e020048 8c420000 ae820014 8e02004c
8c420000 ae82001c 8e020048 8e830010 ac430000 8e020048 8e030094 8c660000
8e030098 8c670000 afa00010 8c420000 00002021 00002821 24c6ffff 0040f809
24e7ffff 8e02004c 8e830018 ac430000 00002021 10000002 00002821 00002821
00801021 00a01821 8fbf003c 8fbe0038 8fb70034 8fb60030 8fb5002c 8fb40028
8fb30024 8fb20020 8fb1001c 8fb00018 03e00008 27bd0040
End CFunction 'MIPS32 M4K
Edited by matherp 2015-08-18
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10287
Posted: 12:16am 17 Aug 2015
Copy link to clipboard 
Print this post

Last one for the moment.

This driver is for the SSD1963 but drives the display in RGB666 mode rather than RGB888 as used in the uM+ firmware and Peter Carnegie's SSD1963 driver. In order to do this it uses a 9-bit data bus (DB0-DB8) rather than 8 bits.





The advantage is that drawing takes about 33% less time than the 8-bit driver.
The disadvantage is the loss of colour resolution and one extra pin.

This driver is especially useful on the 44-pin uM2. In this case if pins 23,24,25,36,37,38,2,3,4 are used (in that order) for DB0-DB8 then the driver will optimise writing by using PortC on the chip. This will make a huge speed improvement allowing performance on the uM2 (MX170) to approach that of the much faster uM+ (MX470) chip by only using 2 write commands per pixel rather than 3. In this case pin 5 must be left unconnected.
The driver can be used on the uM+ but there is no advantage over the in-built driver.


OPTION EXPLICIT
OPTION DEFAULT None

PRINT "SSD1963 9-bit CFunction Driver Example"

'4.3" inch display
CONST Size!=4.3

'Initialise the Display Driver
'Function Display.Open(D0%,D1%,D2%,D3%,D4%,D5%,D6%,D7%,D8%,RS%,WR%,RST%,Orientation%,Size!)
' NB Tie CS Low and tie RD high
' Orientation% is 1 for landscape, 2 for Portrait orientation, 3 for reverse landscape, 4 for reverse portrait
dim Orientation%=1
dim Retrn%=Display.Open(25,26,27,36,37,38,2,3,4,21,22,19,Orientation%,Size!)

' Display the driver version number
print "Driver version is ",Display.Ver()

'Use Font 2 and scale x4
Font 2,4

'Yellow FG, Dark Blue BG
Colour &HFFFF00,&H000066

'Clearscreen
CLS

'Draw a Red Frame
Box 0,0,MM.HRes-4,MM.VRes-4,4,&HFF0000,-1

Text MM.HRES\2-120,(MM.VRes/2)-100,"SSD1963"

Text MM.HRES\2-130,(MM.VRes/2)+70,STR$(MM.HRes)+" "+STR$(MM.VRes),,1,1

Text MM.Hres\2 - 20,(MM.VRes/2)+70,"x"

DIM I%

'Countdown
FOR I%=9 TO 0 STEP -1
Text (MM.Hres/2)-40, (MM.VRes/2)-35,STR$(I%),,1,2,&H00FF00,&H000066
PAUSE 900
NEXT I%

'Change Orientation to Portrait to show that calling
'Display.Open again in a program is legal
Orientation%=2
Retrn%=Display.Open(25, 26, 27, 36, 37, 38, 2, 3, 4, 21, 22, 19, Orientation%, Size!)

GUI Test Display

'Close the driver
Retrn%=Display.Close()
END



'**********Append this code and below onto the end of your MMBasic program***********
'
' Copyright (c) Peter Mather 2015
'
' Initialise the Display Driver for SSD1963 controlled TFT LCD Panel in 9-bit mode
' i.e. RGB666. This is approximately 50% faster than full colour RGB888 mode
'
' Display.Open initialises the loadable CFunction driver so that you can use all of the
' MMBasic graphic commands in your program.
'
' D0% ~ D8% are the pin numbers for the data bus to the display
' RS% is pin number of RS signal
' WR% is pin number of WR signal
' RST% is pin number of Reset signal
' Orient% PORTRAIT=0,RPORTRAIT=1,LANDSCAPE=2,RLANDSCAPE=3
' Size% is display size in Inches eg 4 inch, 5 etc
'
' After Calling Display.Open, any of the usual MM Graphic commands may be used
' in your MMBasic program, eg BOX, TEXT, LINE, CIRCLE etc
'
' Note: on the 44-pin MM2, if you use pins 25,26,27,36,37,38,2,3,4 for the data pins DB0-DB8 performance is optimised
' Ver 1.02 2015-08-17 Initial Release
'
'**********************************************************************************

FUNCTION Display.Open(D0%,D1%,D2%,D3%,D4%,D5%,D6%,D7%,D8%,RS%,WR%,RST%,Orient%,Size!) as integer

LOCAL Pindefs%(16)
LOCAL DisplayMetrics%(4)
LOCAL CFuncAddr%
LOCAL Retrn%

'Open Driver Function, 0=Open, 1=Close, 2=Ver
LOCAL DriverFunc%=0

PinDefs%(0)=D0%:PinDefs%(1)=D1%:PinDefs%(2)=D2%:PinDefs%(3)=D3%
PinDefs%(4)=D4%:PinDefs%(5)=D5%:PinDefs%(6)=D6%:PinDefs%(7)=D7%
PinDefs%(8)=D8%

PinDefs%(9)=RS%
PinDefs%(10)=WR%
PinDefs%(11)=RST%

DisplayMetrics%(0)=Orient%
DisplayMetrics%(1)=Size!

CFuncAddr%=PEEK(CFUNADDR Driver_SSD1963_9)

Retrn%=Driver_SSD1963_9(DriverFunc%,CFuncAddr%,PinDefs%(),DisplayMetrics%())
'Check Return codes
SELECT CASE Retrn%
CASE 0
EXIT FUNCTION
CASE 1
ERROR "Display.Open : "+STR$(Retrn%)+" : Driver Already Open - use CPU Restart"
CASE ELSE
ERROR "Display.Open : "+STR$(Retrn%)+" : Unknown Error"
END SELECT
END SUB

FUNCTION Display.Close() AS FLOAT

LOCAL Retrn%=Driver_SSD1963_9(1)

Display.Close=Retrn%

'Check Return codes
SELECT CASE Retrn%
CASE 0
EXIT FUNCTION
CASE 1
PRINT "Warning: Driver.Close : "+STR$(Retrn%)+" : Driver Already Closed"
EXIT FUNCTION
CASE ELSE
ERROR "Driver.Close : "+STR$(Retrn%)+" : Unknown Error"
END SELECT

END FUNCTION

FUNCTION Display.Ver() AS FLOAT

LOCAL Retrn%=Driver_SSD1963_9(2)
Display.Ver=Retrn% / 100

END FUNCTION

'Driver_SSD1963_9 2015-08-17 09:54:02 UTC Author:Peter with CFuncGen Ver 2.1.1.0
'
CFunction Driver_SSD1963_9
00000244
'Write9Bits
3c029d00 8c42008c 8c420000 8c430010 50600005 30830001 3c03bf88 ac646230
1000005b 8c430054 50600006 8c4300c8 8c4300a4 8c450080 ac650000 10000004
30830002 8c450080 ac650000 30830002 50600006 8c4300cc 8c4300a8 8c450084
ac650000 10000004 30830004 8c450084 ac650000 30830004 50600006 8c4300d0
8c4300ac 8c450088 ac650000 10000004 30830008 8c450088 ac650000 30830008
50600006 8c4300d4 8c4300b0 8c45008c ac650000 10000004 30830010 8c45008c
ac650000 30830010 50600006 8c4300d8 8c4300b4 8c450090 ac650000 10000004
30830020 8c450090 ac650000 30830020 50600006 8c4300dc 8c4300b8 8c450094
ac650000 10000004 30830040 8c450094 ac650000 30830040 50600006 8c4300e0
8c4300bc 8c450098 ac650000 10000004 30830080 8c450098 ac650000 30830080
50600006 8c4300e4 8c4300c0 8c45009c ac650000 10000004 30840100 8c45009c
ac650000 30840100 50800006 8c4300e8 8c4300c4 8c4400a0 ac640000 10000004
8c430054 8c4400a0 ac640000 8c430054 8c44004c ac640000 8c430050 8c42004c
ac620000 03e00008 00000000
27bdffd8 afbf0024 afb10020 afb0001c afa60030 afa70034 00a08821 3c029d00
8c42008c 8c500000 27a20030 afa20010 8e020048 8e030040 ac430000 0411FF85
00000000 8e020044 8e030040 ac430000 1a20000a 00008021 8fa20010 24430004
afa30010 80440000 0411FF7A 00000000 26100001 1611fff9 8fa20010 8fbf0024
8fb10020 8fb0001c 03e00008 27bd0028
27bdffd8 afbf0024 afb20020 afb1001c afb00018 2488ffff 01063021 24a8ffff
01073821 3c089d00 8d08008c 8d100000 8e090000 24080002 15280008 24080004
00a01021 00e01821 8e120008 2652ffff 02468823 10000011 02449023 15280008
24080001 8e030004 2463ffff 00671023 00651823 00808821 10000013 00c09021
15280007 24080003 00801021 00c01821 00a08821 1000000c 00e09021 24080003
5528000a 00032202 8e030004 2463ffff 00661023 00641823 8e120008 2652ffff
02478823 02459023 00032202 afa40010 afa30014 2404002a 24050004 00023202
00403821 0411FFA2 00000000 00121202 afa20010 afb20014 2404002b 24050004
00113202 02203821 0411FF99 00000000 2404002c 00002821 0411FF95 00000000
8e020044 8e030040 ac430000 8fbf0024 8fb20020 8fb1001c 8fb00018 03e00008
27bd0028
27bdffd8 afbf0024 afb40020 afb3001c afb20018 afb10014 afb00010 3c029d00
8c42008c 8c500000 0086102a 14400004 8fb30038 00801021 00c02021 00403021
00a7102a 14400005 28820000 00a01021 00e02821 00403821 28820000 0002200b
3c029d00 8c420094 8c420000 0082402b 2443ffff 0068200a 28c30000 0003300b
00c2182b 2442ffff 0043300a 28a20000 0002280b 3c029d00 8c420098 8c430000
00a3402b 2462ffff 0048280a 28e20000 0002380b 00e01021 00e3382b 2463ffff
0067100a 24070001 00e41823 00663021 00e53823 00e23821 70e6a002 0411FF77
00000000 7e621340 00138bc3 323101f8 00518825 7e722880 00139903 327301c0
02539025 1232000f 02202021 12800025 2690ffff 2413ffff 02202021 0411FED8
00000000 02402021 0411FED5 00000000 2610ffff 5613fff9 02202021 1000001a
8fbf0024 0411FECE 00000000 02202021 0411FECB 00000000 2694ffff 12800011
2694ffff 2404ffff 8e020054 8e03004c ac430000 8e020050 8e03004c ac430000
8e020054 8e03004c ac430000 8e020050 8e03004c ac430000 2694ffff 5684fff3
8e020054 8fbf0024 8fb40020 8fb3001c 8fb20018 8fb10014 8fb00010 03e00008
27bd0028
27bdff88 afbf0074 afbe0070 afb7006c afb60068 afb50064 afb40060 afb3005c
afb20058 afb10054 afb00050 afa40078 00a08021 afa60080 afa70084 8fb20088
8fa4008c 3c029d00 8c42008c 8c420000 8c450000 30a50001 10a00005 8fa30090
8c530004 8c420008 10000004 afa20034 8c530008 8c420004 afa20034 7c851340
000413c3 304201f8 00a21025 afa20020 7c822880 00042103 308401c0 00442025
afa40024 7c641340 000313c3 304201f8 00821025 afa20028 7c622880 00031943
306301c0 00431825 afa3002c 8fa40078 02002821 8fa20080 72423002 8fa20084
72423802 0411FF04 00000000 8fa30084 1860006d 8fbf0074 afb20018 afb00038
8fa20080 afa20044 00021823 afa30048 8fa30084 00620018 00001012 afa20040
afa00014 1000005c afa0003c 06000019 0213102b 50400018 26310001 06a20016
26310001 52e00014 26310001 93c20000 8fa30010 00431024 10400009 8fa40028
8fa40020 0411FE55 00000000 8fa40024 0411FE52 00000000 10000007 26310001
0411FE4E 00000000 8fa4002c 0411FE4B 00000000 26310001 1632ffe4 26100001
26940001 8fa20018 8fa30080 12830016 02c2b021 8fa30014 02831021 24430007
285e0000 007e100b 0002f0c3 8fa20094 005ef021 8fa2001c 00541823 000317c3
00021742 00621821 30630007 00621023 24030001 00431004 afa20010 02c08021
1000ffca 00008821 8fa20030 24420001 afa20030 14520007 26b50001 1000000c
8fa2003c afa00030 8fa30040 2463ffff afa3001c 8fa20080 1840fff3 8fb60078
0000a021 8fa30034 1000ffda 02a3b82b 24420001 afa2003c 8fa30038 8fa20018
00621821 afa30038 8fa30014 8fa20044 00621821 afa30014 8fa30040 8fa20048
00621821 afa30040 8fa3003c 8fa20084 10620005 8fbf0074 1e40ffe2 8fb50038
1000ffeb 8fa2003c 8fbe0070 8fb7006c 8fb60068 8fb50064 8fb40060 8fb3005c
8fb20058 8fb10054 8fb00050 03e00008 27bd0078
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 3c029d00 8c42008c
8c500000 02009821 1200002c 24020001 3c119d00 8e220048 8e030018 ac430000
8e22004c 8e030020 ac430000 8e220094 ac400000 8e220098 ac400000 8e220044
0040f809 02002021 8e220010 8e0400ec 00002821 0040f809 00003021 8e220010
8e0400f0 00002821 0040f809 00003021 8e220010 8e0400f4 00002821 0040f809
00003021 26120024 8e220010 8e0400f8 00002821 0040f809 00003021 26100004
5612fffa 8e220010 ae600024 3c029d00 8c42008c ac400000 00001021 8fbf0024
8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0028
27bdffb0 afbf004c afbe0048 afb70044 afb60040 afb5003c afb40038 afb30034
afb20030 afb1002c afb00028 00a0f021 00c0a821 afa7005c 8c820000 24030001
14430008 8c840004 14800007 24030002 0411FFAD 00000000 00402021 10000211
00022fc3 24030002 14430003 3c029d00 1080020b 24040066 8c42008c 8c420000
10400009 00409821 8c430024 24040001 3c02dead 3442c001 14620202 00002821
1000000c ae600010 3c109d00 8e02003c 0040f809 24040200 00409821 8e02008c
ac530000 3c02dead 3442c001 ae620024 ae600010 8ea30000 24020019 1462003f
02a08821 8ea20004 1440003d 02609021 8ea30008 2402001a 1462003a 0000a021
8ea2000c 14400038 3c109d00 8ea30010 2402001b 14620035 24160001 8ea20014
14400033 24170009 8ea30018 24020024 54620030 8e020028 8ea2001c 5440002d
8e020028 8ea30020 24020025 54620029 8e020028 8ea20024 54400026 8e020028
8ea30028 24020026 54620022 8e020028 8ea2002c 5440001f 8e020028 8ea30030
24020002 5462001b 8e020028 8ea20034 54400018 8e020028 8ea30038 24020003
54620014 8e020028 8ea2003c 54400011 8e020028 8ea30040 24020004 5462000d
8e020028 8ea20044 5440000a 8e020028 24020001 ae620010 02a08821 02609021
0000a021 3c109d00 24160001 24170009 8e020028 0040f809 8e240000 00561004
ae420080 8e020024 8e240000 0040f809 24050006 ae4200a4 8e020024 8e240000
0040f809 24050005 ae4200c8 8e020010 8e240000 24050008 0040f809 00003021
8e020014 8e240000 0040f809 00002821 8e220000 ae4200f8 26940001 26310008
1697ffe3 26520004 3c109d00 8e020028 0040f809 8ea40048 24110001 00511004
ae620040 8e020024 8ea40048 0040f809 24050006 ae620044 8e020024 8ea40048
0040f809 24050005 ae620048 8e020010 8ea40048 24050008 0040f809 00003021
8ea20048 ae6200ec 8e620044 8e630040 ac430000 8e020028 0040f809 8ea40050
00511004 ae62004c 8e020024 8ea40050 0040f809 24050006 ae620050 8e020024
8ea40050 0040f809 24050005 ae620054 8e020010 8ea40050 24050008 0040f809
00003021 8ea20050 ae6200f0 8e620050 8e63004c ac430000 8e020010 8ea40058
24050008 0040f809 00003021 8e020014 8ea40058 0040f809 24050001 8ea20058
ae6200f4 3c029d00 24420910 3c039d00 24630380 0062202b 10800005 00621823
8fc40000 00641821 10000004 ae630014 8fc40000 00641821 ae630014 3c039d00
24630544 0062202b 10800005 00621023 8fc40000 00441021 10000004 ae62001c
8fc40000 00441021 ae62001c 8fa3005c 8c620000 ae620000 8c620008 ae62000c
2c420005 14400006 2671000c 24020320 ae620004 240201e0 10000005 ae620008
240201e0 ae620004 24020110 ae620008 3c109d00 8e020090 8e630000 a0430011
8e020014 8ea40058 0040f809 24050001 8e020004 0040f809 24042710 8e020014
8ea40058 0040f809 00002821 8e020004 0040f809 24042710 8e020014 8ea40058
0040f809 24050001 8e020004 0040f809 24042710 8e220000 2c420005 1040000a
24020054 afa20010 240400e2 24050003 24060023 24070002 0411FD00 00000000
10000009 240400e0 afa20010 240400e2 24050003 2406001e 24070002 0411FCF7
00000000 240400e0 24050001 24060001 0411FCF2 00000000 3c109d00 8e020004
0040f809 24042710 240400e0 24050001 24060003 0411FCE9 00000000 8e020004
0040f809 24042710 24040001 00002821 0411FCE2 00000000 8e020004 3c040001
0040f809 348486a0 8e220000 2c420005 10400034 240200ff afa20010 240400e6
24050003 24060001 2407001f 0411FCD3 00000000 24020001 afa20010 240300df
afa30014 afa20018 2402000f afa2001c afa00020 240400b0 24050007 24060020
00003821 0411FCC5 00000000 afa00010 24020008 afa20014 2402002b afa20018
afa0001c 24100002 afb00020 afa00024 240400b4 24050008 24060002 24070013
0411FCB6 00000000 afa00010 24020004 afa20014 2402000c afa20018 afa0001c
afb00020 240400b6 24050007 24060001 24070020 0411FCA9 00000000 10000034
240400ba afa20010 240400e6 24050003 24060003 240700ff 0411FCA0 00000000
24020003 afa20010 2402001f afa20014 24020001 afa20018 240200df afa2001c
afa00020 240400b0 24050007 24060024 00003821 0411FC91 00000000 afa00010
2402002e afa20014 24020030 afa20018 afa0001c 2402000f afa20020 afa00024
240400b4 24050008 24060003 240700a0 0411FC82 00000000 afa00010 24020010
afa20014 afa20018 afa0001c 24020008 afa20020 240400b6 24050007 24060002
2407000d 0411FC75 00000000 240400ba 24050001 2406000f 0411FC70 00000000
240400b8 24050002 24060007 24070001 0411FC6A 00000000 24040036 24050001
00003021 0411FC65 00000000 240400f0 24050001 24060006 0411FC60 00000000
2404003a 24050001 24060060 0411FC5B 00000000 24040026 24050001 24060001
0411FC56 00000000 3c029d00 8c420004 0040f809 24042710 24040029 00002821
0411FC4E 00000000 24020001 afa20010 240200f0 afa20014 afa00018 afa0001c
240400be 24050006 24060006 240700f0 0411FC42 00000000 240400d0 24050001
2406000d 0411FC3D 00000000 8e620000 24030004 10430009 24060060 24030001
10430006 00003021 38460003 240300a0 240400c0 0086180a 00603021 24040036
24050001 0411FC2D 00000000 8e620000 30420001 10400008 3c029d00 8c430094
8e640004 ac640000 8c420098 8e630008 10000007 ac430000 8c430098 8e640004
ac640000 8c420094 8e630008 ac430000 3c109d00 8e020048 8c420000 ae620018
8e02004c 8c420000 ae620020 8e020048 8e630014 ac430000 8e020048 8e030094
8c660000 8e030098 8c670000 afa00010 8c420000 00002021 00002821 24c6ffff
0040f809 24e7ffff 8e02004c 8e63001c ac430000 00002021 10000002 00002821
00002821 00801021 00a01821 8fbf004c 8fbe0048 8fb70044 8fb60040 8fb5003c
8fb40038 8fb30034 8fb20030 8fb1002c 8fb00028 03e00008 27bd0050
End CFunction 'MIPS32 M4K
 
matherp
Guru

Joined: 11/12/2012
Location: United Kingdom
Posts: 10287
Posted: 12:57am 19 Aug 2015
Copy link to clipboard 
Print this post

One more variant on the SSD1963.



This version is completely optimised for the 44-pin uM2 and can only be used on that chip.

The 44-pin uM2 has 10 pins on the hardware port C in (PortC0-PortC9, 24,25,26,36,37,38,2,3,4,5) which are not allocated to any advanced functions (i2C etc.) in addition to all the pins available on the 28-pin device. By using these for the display the code can be optimised to reduce to an absolute minimum the number of operations needed to update the screen. It is also possible to make the code very small (the single CFunction is only 4k bytes long)

It is difficult to benchmark accurately but the performance appears to be only slightly slower than a uM+ at 120MHz which of course also uses pre-defined pins to achieve its performance.

The code is also completely compatible with Peter Carnegie's SD card handling routines allowing a 800x480 full colour screen to be used at the same time as the SD card on a uM2. Example code displaying full colour 800 x 480 images will be posted separately.

As with all of the loadable drivers, all of the internal firmware graphics functions are available (BOX, TEXT, CIRCLE, etc.)

NOTE: The 5" and 7" displays have the same resolution 800 x 480. However, there appear to be two different ways they are wired so if you have a 5" display and the driver doesn't work properly try setting the size as 7" and visa versa.


OPTION EXPLICIT
OPTION DEFAULT None
CPU 48

PRINT "SSD1963 44-pin uM2 CFunction Driver Example"

CONST Size!=7.0 'Set display size

' Initialise the Display Driver
' Function Display.Open(RST%,Orientation%,Size!)
' Only for use on 44-pin MX170
' Connect pins 25,26,27,36,37,38,2,3 to d0-d7
' Connect pin 4 to RS
' Connect pin 5 to WR
' Tie CS Low and tie RD high
' Orientation% is 1 for landscape, 2 for Portrait orientation, 3 for reverse landscape, 4 for reverse portrait
dim Orientation%=1
' Display the driver version number

dim Retrn%=Display.Open(19,Orientation%,Size!)

' Display the driver version number
print "Driver version is ",Display.Ver()

'Use Font 2 and scale x4
Font 2,4

'Yellow FG, Dark Blue BG
Colour &HFFFF00,&H000066

'Clearscreen
CLS

'Draw a Red Frame
Box 0,0,MM.HRes-4,MM.VRes-4,4,&HFF0000,-1

Text MM.HRES\2-120,(MM.VRes/2)-100,"SSD1963"

Text MM.HRES\2-130,(MM.VRes/2)+70,STR$(MM.HRes)+" "+STR$(MM.VRes),,1,1

Text MM.Hres\2 - 20,(MM.VRes/2)+70,"x"

DIM I%

'Countdown
FOR I%=9 TO 0 STEP -1
Text (MM.Hres/2)-40, (MM.VRes/2)-35,STR$(I%),,1,2,&H00FF00,&H000066
PAUSE 900
NEXT I%

'Change Orientation to Portrait to show that calling
'Display.Open again in a program is legal
Orientation%=2
Retrn%=Display.Open(19, Orientation%, Size!)

GUI Test Display

'Close the driver
Retrn%=Display.Close()
END



'**********Append this code and below onto the end of your MMBasic program***********
'
' Copyright (c) Peter Mather 2015
'
' Initialise the Display Driver for SSD1963 controlled TFT LCD Panel in 8-bit databus, 24-bit mode
' i.e. RGB888. This is optimised for the 44-pin uM2 and uses defined pinout except for the reset pin
' It achieves performance approaching that of the uM+ by heavily optimising bus I/O
'
' Display.Open initialises the loadable CFunction driver so that you can use all of the
' MMBasic graphic commands in your program.
'
' RST% is pin number of Reset signal
' Orient% PORTRAIT=0,RPORTRAIT=1,LANDSCAPE=2,RLANDSCAPE=3
' Size% is display size in Inches eg 4 inch, 5 etc
'
' After Calling Display.Open, any of the usual MM Graphic commands may be used
' in your MMBasic program, eg BOX, TEXT, LINE, CIRCLE etc
'
' Note: you must use pins 25,26,27,36,37,38,2,3 for the data pins DB0-DB7
' you must use pin 4 for RS and pin 5 for WR
' Tie CS Low and tie RD high
'
' Ver 1.02 2015-08-19 Initial Release
'
'**********************************************************************************

FUNCTION Display.Open(RST%,Orient%,Size!) as integer

LOCAL Pindefs%(16)
LOCAL DisplayMetrics%(4)
LOCAL CFuncAddr%
LOCAL Retrn%

'Open Driver Function, 0=Open, 1=Close, 2=Ver
LOCAL DriverFunc%=0

PinDefs%(0)=RST%

DisplayMetrics%(0)=Orient%
DisplayMetrics%(1)=Size!

CFuncAddr%=PEEK(CFUNADDR Driver_SSD1963_8C)

Retrn%=Driver_SSD1963_8C(DriverFunc%,CFuncAddr%,PinDefs%(),DisplayMetrics%())
'Check Return codes
SELECT CASE Retrn%
CASE 0
EXIT FUNCTION
CASE 1
ERROR "Display.Open : "+STR$(Retrn%)+" : Driver Already Open - use CPU Restart"
CASE ELSE
ERROR "Display.Open : "+STR$(Retrn%)+" : Unknown Error"
END SELECT
END SUB

FUNCTION Display.Close() AS FLOAT

LOCAL Retrn%=Driver_SSD1963_8C(1)

Display.Close=Retrn%

'Check Return codes
SELECT CASE Retrn%
CASE 0
EXIT FUNCTION
CASE 1
PRINT "Warning: Driver.Close : "+STR$(Retrn%)+" : Driver Already Closed"
EXIT FUNCTION
CASE ELSE
ERROR "Driver.Close : "+STR$(Retrn%)+" : Unknown Error"
END SELECT

END FUNCTION

FUNCTION Display.Ver() AS FLOAT

LOCAL Retrn%=Driver_SSD1963_8C(2)
Display.Ver=Retrn% / 100

END FUNCTION
'
'C:\Users\Peter\Dropbox\MPLABXProjects\SSD1963Loadable_8.X\dist\default\production\Driver_SSD1963_8C.bas
'
'Driver_SSD1963_8C 2015-08-20 06:59:53 UTC Author:Peter with CFuncGen Ver 2.1.1.0
'
CFunction Driver_SSD1963_8C
000001D9
'write_command_data
27bdfff8 afa60010 afa70014 27a20010 afa20000 308400ff 34840200 3c02bf88
ac446230 24030200 ac436234 ac436238 18a0000d 8fa40000 00001821 24060200
24870004 afa70000 80840000 34840300 ac446230 ac466234 ac466238 24630001
1465fff7 8fa40000 03e00008 27bd0008

'defineregion
2482ffff 00463021 24a2ffff 00471021 3c089d00 8d090094 8d230000 8d080098
8d080000 0103482b 11200003 01006021 00606021 01001821 3c089d00 8d0d0090
81a80015 24090001 1509000c 24070002 00805021 00c04821 81a30029 28630007
14600023 00a05821 00063027 00042027 008c4821 1000001e 00cc5021 15070008
24070003 00a05021 00404821 00063027 00c35821 00041027 10000015 00431021
1507000e 00021027 00c04821 00435821 00051027 00431021 81a30029 28630007
1060000b 00805021 00063027 00042027 008c4821 10000006 00cc5021 004c5021
00052827 00ac4821 00805821 00c01021 3c03bf88 2404022a ac646230 24080200
ac686234 ac686238 000a2202 34840300 ac646230 ac686234 ac686238 354a0300
ac6a6230 ac686234 ac686238 00092202 34840300 ac646230 ac686234 ac686238
35290300 ac696230 ac686234 ac686238 2404022b ac646230 ac686234 ac686238
000b2202 34840300 ac646230 ac686234 ac686238 356b0300 ac6b6230 ac686234
ac686238 00022202 34840300 ac646230 ac686234 ac686238 34420300 ac626230
ac686234 ac686238 2402022c ac626230 ac686234 ac686238 03e00008 00000000

'DrawRectangle_SSD1963
27bdffe0 afbf001c afb10018 afb00014 0086102a 14400004 8fb00030 00801021
00c02021 00403021 00a7102a 14400005 28820000 00a01021 00e02821 00403821
28820000 0002200b 3c029d00 8c420094 8c430000 0083402b 2462ffff 0048200a
28c20000 0002300b 00c3102b 2463ffff 0062300a 28a20000 0002280b 3c029d00
8c420098 8c430000 00a3402b 2462ffff 0048280a 28e20000 0002380b 00e01021
00e3382b 2463ffff 0067100a 24070001 00e41823 00663021 00e53823 00e23821
70e68802 0411FF5E 00000000 7e053c00 34a50300 7e063a00 321000ff 36100300
10b00005 34c60300 1620001e 2624ffff 1000002c 8fbf001c 14a6fffb 3c02bf88
ac456230 24030200 ac436234 ac436238 ac436234 ac436238 ac436234 ac436238
2631ffff 1220001e 2631ffff 3c03bf88 24020200 2404ffff ac626234 ac626238
ac626234 ac626238 ac626234 ac626238 2631ffff 1624fff8 8fbf001c 10000012
8fb10018 3c02bf88 24030200 2407ffff ac456230 ac436234 ac436238 ac466230
ac436234 ac436238 ac506230 ac436234 ac436238 2484ffff 1487fff5 00000000
8fbf001c 8fb10018 8fb00014 03e00008 27bd0020

'DrawBitmap_SSD1963
27bdffa8 afbf0054 afbe0050 afb7004c afb60048 afb50044 afb40040 afb3003c
afb20038 afb10034 afb00030 afa40058 afa5005c 00c09021 afa70064 8fb00068
8fb7006c 8fb40070 8fb30074 3c029d00 8c430094 8c710000 8c420098 8c420000
afa20018 00171403 34420300 afa20010 0017f203 37de0300 36f70300 0014b403
36d60300 0014aa03 36b50300 72063002 72073802 0411FEFD 00000000 8fa20064
1840006a 36940300 02007821 8fa3005c afa3001c 00121023 afa20024 8fa30064
70721002 2442ffff afa20014 afb20028 00007021 afa00020 24180001 3c05bf88
24060200 10000055 8fb90010 0440001f 0051202b 5080001e 24630001 0522001c
24630001 5160001a 24630001 91a40000 008c2024 1080000c 00000000 acb96230
aca66234 aca66238 acbe6230 aca66234 aca66238 acb76230 aca66234 aca66238
1000000b 24630001 acb66230 aca66234 aca66238 acb56230 aca66234 aca66238
acb46230 aca66234 aca66238 24630001 1470ffde 24420001 24e70001 2508ffff
10f20010 014f5021 00ee1021 24430007 284d0000 006d100b 000268c3 026d6821
000817c3 00021742 01026021 318c0007 01826023 01986004 01401021 1000ffcb
00001821 8fa20010 24420001 afa20010 14500004 25290001 10000009 8fa20020
afa00010 1a40fff7 8faa0058 8fa80014 00003821 8fa30018 1000ffe3 0123582b
24420001 afa20020 8fa3001c 006f1821 afa3001c 8fa20014 8fa30024 00431021
afa20014 8fa20028 01c27021 8fa30020 8fa20064 10620006 8fbf0054 1e00ffe8
8fa9001c 1000ffee 8fa20020 8fbf0054 8fbe0050 8fb7004c 8fb60048 8fb50044
8fb40040 8fb3003c 8fb20038 8fb10034 8fb00030 03e00008 27bd0058

'CloseDriver
27bdffb8 afbf0044 afb20040 afb1003c afb00038 3c029d00 8c420090 80440028
2403007a 14830031 24020001 3c029d00 8c430048 ac600000 8c43004c ac600000
8c430094 ac600000 8c430098 ac600000 24030019 afa30010 2403001a afa30014
2403001b afa30018 24030024 afa3001c 24030025 afa30020 24030026 afa30024
24040002 afa40028 24030003 afa3002c afa40030 afa30034 8c430090 8c420010
8064002a 00002821 0040f809 00003021 27b00010 27b20038 3c119d00 8e220010
8e040000 00002821 0040f809 00003021 26100004 5612fffa 8e220010 3c029d00
8c420090 a0400028 00001021 8fbf0044 8fb20040 8fb1003c 8fb00038 03e00008
27bd0048

'main
27bdff98 afbf0064 afb60060 afb5005c afb40058 afb30054 afb20050 afb1004c
afb00048 00a0a821 00c0b021 00e0a021 8c820000 24030001 14430008 8c840004
14800007 24030002 0411FFAC 00000000 00402021 100001ef 00022fc3 24030002
14430003 24020019 108001e9 24040066 afa20028 2402001a afa2002c 2402001b
afa20030 24020024 afa20034 24020025 afa20038 24020026 afa2003c 24020002
afa20040 24020003 afa20044 27b20028 27b30048 3c119d00 8e500000 8e220010
02002021 24050008 0040f809 00003021 8e220014 02002021 0040f809 00002821
26520004 5653fff5 8e500000 3c109d00 8e020010 24040004 24050008 0040f809
00003021 3c11bf88 24020100 ae226238 8e020010 24040005 24050008 0040f809
00003021 24020200 ae226238 8e020010 8ec40000 24050008 0040f809 00003021
8e020014 8ec40000 0040f809 24050001 8e020090 8ec30000 a043002a 3c029d00
24420764 3c169d00 26d60230 02c2182b 10600004 02c2b023 8ea30000 10000003
02c3b021 8ea30000 02c3b021 3c039d00 246303e4 0062202b 10800004 00621023
8ea40000 10000003 0044a821 8ea40000 0044a821 26910008 8e220004 1c40000a
241201e0 14400006 24120110 8e820008 2c420005 50400004 241201e0 24120110
10000002 241301e0 24130320 3c109d00 8e020090 8e830000 a0430015 8e030090
8e020014 8064002a 0040f809 24050001 8e020004 0040f809 24042710 8e030090
8e020014 8064002a 0040f809 00002821 8e020004 0040f809 24042710 8e030090
8e020014 8064002a 0040f809 24050001 8e020004 0040f809 24042710 8e220004
1c400010 8e830008 54400005 24020054 2c640005 1080000b 00000000 24020054
afa20010 240400e2 24050003 24060023 24070002 0411FD81 00000000 1000001a
240400e0 5c400010 24020004 14400005 24020054 2c630006 1060000b 24020004
24020054 afa20010 240400e2 24050003 2406001e 24070002 0411FD70 00000000
10000009 240400e0 afa20010 240400e2 24050003 24060023 24070002 0411FD67
00000000 240400e0 24050001 24060001 0411FD62 00000000 3c109d00 8e020004
0040f809 24042710 240400e0 24050001 24060003 0411FD59 00000000 8e020004
0040f809 24042710 24040001 00002821 0411FD52 00000000 8e020004 3c040001
0040f809 348486a0 8e220004 1c40003a 8e830008 54400005 240200ff 2c640005
10800035 00000000 240200ff afa20010 240400e6 24050003 24060001 2407001f
0411FD3E 00000000 24020001 afa20010 240300df afa30014 afa20018 2402000f
afa2001c afa00020 240400b0 24050007 24060020 00003821 0411FD30 00000000
afa00010 24020008 afa20014 2402002b afa20018 afa0001c 24100002 afb00020
afa00024 240400b4 24050008 24060002 24070013 0411FD21 00000000 afa00010
24020004 afa20014 2402000c afa20018 afa0001c afb00020 240400b6 24050007
24060001 24070020 0411FD14 00000000 10000054 240400ba 5c40001f 240200e0
14400005 240200ff 2c630006 1060001a 240200e0 240200ff afa20010 240400e6
24050003 24060003 240700ff 0411FD03 00000000 24020003 afa20010 2402001f
afa20014 24020001 afa20018 240200df afa2001c afa00020 240400b0 24050007
24060024 00003821 0411FCF4 00000000 10000018 afa00010 afa20010 240400e6
24050003 24060004 24070093 0411FCEB 00000000 24020003 afa20010 2402001f
afa20014 24020001 afa20018 240200df afa2001c afa00020 240400b0 24050007
00003021 00003821 0411FCDC 00000000 afa00010 2402002e afa20014 24020030
afa20018 afa0001c 2402000f afa20020 afa00024 240400b4 24050008 24060003
240700a0 0411FCCD 00000000 afa00010 24020010 afa20014 afa20018 afa0001c
24020008 afa20020 240400b6 24050007 24060002 2407000d 0411FCC0 00000000
240400ba 24050001 2406000f 0411FCBB 00000000 240400b8 24050002 24060007
24070001 0411FCB5 00000000 24040036 24050001 00003021 0411FCB0 00000000
240400f0 24050001 00003021 0411FCAB 00000000 2404003a 24050001 24060070
0411FCA6 00000000 24040026 24050001 24060001 0411FCA1 00000000 3c109d00
8e020004 0040f809 24042710 24040029 00002821 0411FC99 00000000 24020001
afa20010 240200f0 afa20014 afa00018 afa0001c 240400be 24050006 24060006
240700f0 0411FC8D 00000000 240400d0 24050001 2406000d 0411FC88 00000000
8e020090 80420015 24030002 1443000c 24030004 8e230004 1c600016 240600e0
14600014 240600a0 8e830008 2c630006 14600011 24030001 1000000f 240600e0
1443000c 240600a0 8e230004 5c600017 24060020 14600015 24060060 8e830008
2c630006 14600012 24030003 10000010 24060020 24030001 5443000d 24030003
8e220004 5c400015 24060040 14400013 00003021 8e820008 2c420006 14400010
24040036 1000000e 24060040 24030003 1443000b 24040036 8e220004 5c400008
24060080 14400006 240600c0 8e820008 2c420006 50400001 24060080 24040036
24050001 0411FC4D 00000000 3c029d00 8c420090 90420015 30420001 10400006
3c029d00 8c430094 ac730000 8c420098 10000005 ac520000 8c430098 ac730000
8c420094 ac520000 3c109d00 8e020048 ac560000 8e020048 8e030094 8c660000
8e030098 8c670000 afa00010 8c420000 00002021 00002821 24c6ffff 0040f809
24e7ffff 8e02004c ac550000 8e020090 2403007a a0430028 8e020090 8e830008
a0430029 00002021 10000002 00002821 00002821 00801021 00a01821 8fbf0064
8fb60060 8fb5005c 8fb40058 8fb30054 8fb20050 8fb1004c 8fb00048 03e00008
27bd0068
End CFunction 'MIPS32 M4K

Edited by matherp 2015-08-21
 
Print this page


To reply to this topic, you need to log in.

The Back Shed's forum code is written, and hosted, in Australia.
© JAQ Software 2025