Home
JAQForum Ver 24.01
Log In or Join  
Active Topics
Local Time 08:03 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 : MM2: (not MM+) Pictures from SD card

Author Message
matherp
Guru

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

Code to follow once I've generalised and tidied it up.




Ducks on my pond, 320x240 image displayed in 2.3 seconds

Thanks of course to Peter Carnegie (G8JCF) for his brilliant SD card routines for the MX170 Micromite. Shown on the 44-pin version but will work just as well on the 28-pin chip.

Edited by matherp 2015-08-15
 
OA47

Guru

Joined: 11/04/2012
Location: Australia
Posts: 982
Posted: 12:44am 14 Aug 2015
Copy link to clipboard 
Print this post

It just gets better..........................

Great work guys
GM
 
matherp
Guru

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

OK: Here is the code:

To use the code you need to transform your pictures into an RGB565 file. This is a two-step process, first convert your pictures into an appropriately sized .BMP file. Then convert this to the actual RGB565 file that will be used in the program. This is done using a simple program created by ChaN, the same genius responsible for the SD card routines that PeterC has used and the author of the full FatFS routines that have become the de-facto standard throughout the embedded development space.

2015-08-14_111537_bmp2bin.zip

This file contains the bmp2bin conversion program (also available on ChaN's website ) and the two picture files used in my code below:

The bmp2bin program is run in a DOS box (Accessories/Command Prompt) so I find it convenient to keep it on the root directory of the SD card. Then once you have copied your .BMP files to the SD card you can open a DOS box and set the directory to the SD card (e.g. F:<cr>) and run the program "bmp2bin myfile.bmp"; no options are required.

This will create the file myfile.bin on the SD card ready to be plugged into the Micromite and used by the program. The SD card slot on my ILI9341 display works perfectly with PeterC's SD card code.

The bin file format created by bmp2bin is a 4 byte header giving the width and height of the picture, followed by the picture data in binary RGB565 format. Working this way means the code in the MM is kept to an absolute minimum and the picture will draw at the fastest possible speed.

The code, of course, assumes the display has been initialised before use using the normal OPTION LCDPANEL command. All normal MM drawing routines will continue to work before and after a picture is displayed.

The drawing subroutine is simplicity itself to use:
DisplayPicture("bss.bin",100,70)
says display the picture "bss.bin" with the top-left corner at coordinates 100,70.
the coordinates are optional and 0,0 used if not specified.

The SD card routines are unchanged from PeterC's version 1.7

If you are only using the SD card for displaying pictures you can delete most of the Basic wrappers for the SD card handling routines. Check the DisplayPicture subroutine code for which ones need keeping.

Enjoy


OPTION EXPLICIT
OPTION DEFAULT NONE
CPU 48
'
'PIC32MX170 28 Pin SD Card wiring
' Chip Select can be any digital output pin define in Constant SD_CS%
' SPI2
'MOSI Pin 24
'MISO Pin 6
'SCLK PIN 26
'
'PIC32MX170 44 Pin wiring
' Chip Select can be any digital output pin define in Constant SD_CS%
' SPI2
'MOSI Pin 11
'MISO Pin 23
'SCLK PIN 15
'
CONST SD_CS%=4 ' Chip select pin for the SD card
'
DIM AddrOfRam%=0 'Holds the address returned by Driver.Init
'
' Main program
'
CLS
DisplayPicture("bss.bin",100,70) ' draw a picture starting at x=100, y=70
Pause 10000
CLS
DisplayPicture("duck.bin") ' draw a picture starting at x=0, y=0
END
'
'***************************************************************************************************
'
' Display a picture from the SD card
' Code should work on any of the MM2 supported displays ILI9341, ST7735, ILI9163
' Picture must be in RGB565 format with the first 4 bytes specifying the picture size
' Use bmp2bin to create the picture file from an appropriately sized .BMP file
'
' Parameters are:
' PIC$ = filename of the picture to be displayed
' StartX% = X coordinate of the top left of the picture
' StartY% = Y coordinate of the top left of the picture
'
' Note: the routine checks that the picture is not too big for the screen and reports an error if it is
'
Sub DisplayPicture(PIC$, StartX%, StartY%)
LOCAL Buffer$
LOCAL Result%=-1
LOCAL NumBytes%

Result%=File.Driver.Open(SD_CS%,AddrOfRam%)
PError "Failed to OPEN the Driver. Please Power Cycle system",Result%,1
Result%=File.Open(PIC$,1)
PError "Failed to Open file "+PIC$,Result%,1
'Read the first 4 bytes
Buffer$=STRING$(4," ")
Result%=File.Read(Buffer$,NumBytes%)
PError "Failed to Read file",Result%,0
LOCAL width%=asc(left$(Buffer$,1))+256*asc(mid$(buffer$,2,1))
LOCAL height%=asc(MID$(Buffer$,3,1))+256*asc(mid$(buffer$,4,1))
if (StartX%+width%>MM.HRES) OR (StartY%+height%>MM.VRES) then
print "Picture too big"
else
Result%= SetRegion(StartX%, StartY%, width%, height%)
Buffer$=STRING$(240,chr$(0))
do
Result%=Driver.SDCard(4,Buffer$,NumBytes%)
if numbytes%<>0 then Result%=DisplayBuffer(Buffer$)
loop while NumBytes%<>0
Result%= CompleteDisplay()
endif
Result%=File.Close()
PError "Failed to Close File",Result%,0
Result%=File.Driver.Close()
PError "Failed to Close Driver",Result%,0
IF Result%<>0 THEN
PRINT "Please issue CPU Restart command at MMBasic command prompt"
ENDIF
END sub

'*************************************************
'
' Print Error Message if Code% is NON-Zero
' END if Hard% is NON-Zero
'
'
SUB PError(Msg$,Code%,Hard%)
IF Code%=0 THEN EXIT SUB
PRINT "Error : ";Msg$;". Error Code:";Code% AND &Hff
IF Hard%<>0 THEN END
END SUB

SUB DoTrace(Msg$, Result%, Numbytes%)
END SUB


'***********************************************
'
' CUNCTION FAT Filesystem Driver
'
' (c) Copyright Peter Carnegie 2015
'
' File.Driver.Init Initialise the Driver
' File.Driver.Open Open the Driver, Init S/W, Init H/W, Mount disk
' File.Driver.Close Close the Driver and release all resources
' File.Disk.Init Initialise the Disk Sub-System
' File.Disk.Mount Mount the disk into the filesystem
' File.Open Open File specifying Writing Mode
' File.Close Close File
' File.Read Read from File
' File.Write Write to File
' File.Flush Flush bytes to disk
' File.Seek Move READ/WRITE pointer to position
' File.Ver Return Driver Version
' File.Length Returns length of File in Bytes
'
' The CFunction can of course be called directly from user code
' These MMBasic wrapper functions just make things neater and tidier !
'
'
'***********************************************


'***********************************************
'
' Initialise the FAT FileSystem Device Driver
'
' Returns the address of the persistent driver memory
'
'
FUNCTION File.Driver.Init(Addr%) AS INTEGER

'Get address of the CFunction Driver itself
LOCAL AddrOfSDCard%=PEEK(CFUNADDR Driver.SDCard)

LOCAL Result%=Driver.SDCard(0,AddrOfSDCard%,Addr%)

File.Driver.Init=Result%

IF TRACE%<>0 THEN
PRINT "Persistent RAM starts at &H";HEX$(Addr%)
ENDIF

DoTrace("Initialise Driver")

END FUNCTION


'***********************************************
'
' Initialise the Disk
'
' Returns 0 if Successful
'
' CSPin% contains the pin to be used for Chip Select
'
'
FUNCTION File.Disk.Init(CSPin%) AS INTEGER

LOCAL Result%=Driver.SDCard(1,CSPin%)
File.Disk.Init=Result%

DoTrace("Initialise Disk")

END FUNCTION


'***********************************************
'
' Mount the disk
'
' Returns 0 if succesful else non-zero
'
'
FUNCTION File.Mount.Disk() AS INTEGER

LOCAL Result%=Driver.SDCard(2)
File.Mount.Disk=Result%

DoTrace("Mount Disk",Result%)

END FUNCTION


'***********************************************
' Driver Open
'
' Initialises the Driver software framework
' Initialises the driver h/w interface and sets up
' the FAT32 filesystem
' Mounts the disk into the filesystem
'
' File>Driver.Open may be called instead of calling the
' individual driver calls if the disk is already
' inserted into the SDCard holder
'
'
FUNCTION File.Driver.Open(CSPin%,Addr%) AS INTEGER

'Get address of the CFunction Driver itself
LOCAL AddrOfSDCard%=PEEK(CFUNADDR Driver.SDCard)

LOCAL Result%=Driver.SDCard(11,AddrOfSDCard%,CSPin%,Addr%)
File.Driver.Open=Result%

DoTrace("Driver Open",Result%)

END FUNCTION


'***********************************************
'
' Open File
'
' Path$ Name of file to be Opened
' Mode% If set to 1, then automatically flush to disk
' every File.Write
'
' Returns 0 if succesful else non-zero
'
'
FUNCTION File.Open(Path$, Mode%) AS INTEGER

LOCAL Result%=Driver.SDCard(3,Path$,Mode%)
File.Open=Result%

DoTrace("Open File",Result%)

END FUNCTION


'***********************************************
'
' Read File - Sequential
'
' Returns 0 if succesful else non-zero
' On Entry
'
' On Exit
' Buffer$ will contain the bytes read in from disk
' NumBytes% will contain the number of bytes actually read
' If NumBytes%=0 then End Of File has been reached
'
' Use File.Seek to position the write pointer
'
FUNCTION File.Read(Buffer$, NumBytes%) AS INTEGER

LOCAL Result%=Driver.SDCard(4,Buffer$,NumBytes%)
File.Read=Result%

DoTrace("Read File",Result%)

END FUNCTION


'***********************************************
'
' Write File - Sequential
'
' Returns 0 if succesful else non-zero
' On Entry
' Buffer$ contains the bytes to be written
'
' On Exit
' NumBytes% will contain the number of bytes actually written
'
' Use File.Seek to position the write pointer
'
FUNCTION File.Write(Buffer$,NumBytes%) AS INTEGER

NumBytes%=-1

LOCAL Result%=Driver.SDCard(5,Buffer$,NumBytes%)
File.Write=Result%

DoTrace("Write File",Result%,NumBytes%)

END FUNCTION


'***********************************************
'
' Flush Data to disk
'
' Returns 0 if succesful else non-zero
'
'
FUNCTION File.Flush() AS INTEGER

LOCAL Buffer$=""
LOCAL Offset%=0
LOCAL BytesWritten%=-1

LOCAL Result%=Driver.SDCard(5,Buffer$,BytesWritten%)
File.Flush=Result%

DoTrace("Write File (Flush)",Result%,BytesWritten%)

END FUNCTION


'***********************************************
'
' Close File
'
' Returns 0 if succesful else non-zero
' Flushes any unwritten bytes to the physical disk
'
'
FUNCTION File.Close() AS INTEGER

LOCAL Result%=Driver.SDCard(6)
File.Close=Result%

DoTrace("Close File",Result%)

END FUNCTION


'***********************************************
'
' Drive Close
'
' Returns 0 if succesful else non-zero
' Unconfigures SPI
' Unconfigures CS pin
' FREEs up persistent RAM
'
'
FUNCTION File.Driver.Close() AS INTEGER

LOCAL Result%=0
Result%=Driver.SDCard(7)
File.Driver.Close=Result%

DoTrace("Close Driver",Result%)

END FUNCTION


'***********************************************
'
' File Seek
'
' Returns 0 if succesful else non-zero
' Moves Reading/Writing offset to Position%
'
'
FUNCTION File.Seek(Position%) AS INTEGER

LOCAL Result%=Driver.SDCard(8,Position%)
File.Seek=Result%

DoTrace("File Seek ",Result%)

END FUNCTION


'***********************************************
'
' Driver Version
'
' Returns Driver Version as a FLOAT, eg 1.5
'
' The least significant digit indicates the SPI port in use
'
'
FUNCTION File.Ver() AS FLOAT

LOCAL Result%=Driver.SDCard(9)
File.Ver=Result% / 1000

END FUNCTION


'***********************************************
'
' Length of File
'
' Returns Length of File in Length%
' Returns 0 if OK, non-zero otherwise
'
'
FUNCTION File.Length(Length%) AS INTEGER

LOCAL Result%=Driver.SDCard(10,Length%)
File.Length=Result%

DoTrace("File Length ",Result%)

END FUNCTION



'******************************************************************************
'Created : 2015-08-13 16:31:50 UTC
'Author : Peter Carnegie
'Generator : CFuncGen Ver 2.1.5.0
'
CFUNCTION Driver.SDCard
0000069B
10c00006 00801021 00862021 a0450000 24420001 5444fffe a0450000 03e00008
00000000
2407ffff 24c6ffff 10c70008 00001021 80830000 80a20000 00621023 14400003
24840001 1000fff7 24a50001 03e00008 00000000
27bdffe0 afbf001c 3c029d00 8c42008c 8c420000 2c830002 1460001e 8c420060
8c430014 0083182b 1060001c 24030003 8c450000 14a3001e 000429c2 8c420018
3086007f 27a40010 00a22821 00063080 24070004 04110565 00000000 14400010
24030001 93a30013 00031e00 93a20012 00021400 00621825 93a20010 00621825
93a20011 00021200 00621825 10000004 7c63d800 10000002 24030001 24030001
00601021 8fbf001c 03e00008 27bd0020 1000ffff 00000000
3c029d00 8c42008c 8c420000 8c430060 2484fffe 8c650014 24a5fffe 0085282b
10a00005 00001021 8c650008 8c620020 70851802 00621021 03e00008 00000000
90830015 00031a00 90820014 00621825 00031c00 9082001b 00021200 9084001a
00441025 03e00008 00621025
27bdffe8 afbf0014 afb00010 00808021 3c029d00 8c42008c 8c420000 8c430060
ac800000 8c840008 24050001 1085000c 24020001 8c650014 0085282b 10a00009
8fbf0014 50800001 8c64001c ae04000c 0411FFD0 00000000 ae020010 00001021
8fbf0014 8fb00010 03e00008 27bd0018
27bdffe0 afbf001c afb20018 afb10014 afb00010 00808021 3c029d00 8c42008c
8c420000 8c520060 8c910000 26310001 3231ffff 12200027 24020003 8c830010
50600025 8fbf001c 3222000f 54400020 ae110000 24630001 ac830010 8c84000c
14800007 00111902 8e430010 0223182b 14600016 24020003 10000017 8fbf001c
8e420008 2442ffff 00621024 54400010 ae110000 0411FF75 00000000 00402021
2c430002 1460000b 24020001 8e430014 0083182b 10600007 24020003 ae04000c
0411FF98 00000000 ae020010 ae110000 00001021 8fbf001c 8fb20018 8fb10014
8fb00010 03e00008 27bd0020
27bdffe0 afbf001c afb20018 afb10014 afb00010 00808821 00a09021 0411FFA1
00000000 14400020 00408021 8e260000 30c6000f 02402021 8e250010 00063140
24070020 041104C9 00000000 0002802b 16000016 02001021 92420000 50400012
24100003 9242000b 30420008 14400008 02202021 02402021 8e250004 2406000b
0411FF32 00000000 10400007 02202021 0411FFA0 00000000 1040ffe4 00408021
10000002 02001021 02001021 8fbf001c 8fb20018 8fb10014 8fb00010 03e00008
27bd0020
27bdffe0 afbf001c afb20018 afb10014 afb00010 00a08021 3c029d00 8c42008c
8c520000 8c910004 02202021 24050020 2406000b 0411FF0B 00000000 8e090000
00002021 00001821 24080008 240a002f 2407002e 240b0008 01231021 80450000
30a200ff 24630001 2c460021 14c0001e 306300ff 504a001d 01231821 10470003
0088302b 14c00008 00000000 550b0017 01231821 54470015 01231821 01602021
1000ffed 2408000b 04a10005 2445ff9f 8e450048 00a21021 9042ff80 2445ff9f
30a500ff 2ca5001a 10a00003 02242821 2442ffe0 304200ff a0a20000 24840001
1000ffdd 308400ff 01231821 ae030000 2c420021 a222000b 00001021 8fbf001c
8fb20018 8fb10014 8fb00010 03e00008 27bd0020
27bdffe0 afbf001c afb10018 afb00014 00808021 afa60028 80c20000 24030020
14430006 00a08821 24c60001 afa60028 80c20000 5043fffd 24c60001 2403002f
54430004 ae000008 24c60001 afa60028 ae000008 8fa20028 90420000 2c420020
10400006 02002021 0411FF18 00000000 10000019 a2200000 02002021 27a50028
0411FF9A 00000000 14400013 02002021 02202821 0411FF64 00000000 1440000f
8fbf001c 8e030004 9063000b 5460000c 8fb10018 9222000b 30420010 10400005
02202021 0411FEF6 00000000 1000ffea ae020008 24020003 8fbf001c 8fb10018
8fb00014 03e00008 27bd0020
27bdffe0 afbf001c afb10018 afb00014 00808021 00a08821 240601fe 24070002
04110421 00000000 14400018 24030003 92040001 00042200 92020000 00822025
7c042620 2402aa55 14820010 24030002 02002021 02202821 24060052 24070002
04110411 00000000 14400008 24030001 92030001 00031a00 92020000 00621825
7c031e20 38634146 0003182b 00601021 8fbf001c 8fb10018 8fb00014 03e00008
27bd0020
27bdffb8 afbf0044 afb20040 afb1003c afb00038 00808821 3c029d00 8c42008c
8c500000 ae000060 8e04003c 04110364 00000000 30420001 1440006a 24030002
27a40010 00002821 0411FFC4 00000000 24030001 1443001a 00009021 27a40010
00002821 240601be 24070010 041103E5 00000000 1440005b 24030001 93a20014
10400058 24030006 93b2001b 00129600 93a2001a 00021400 02429025 93a20018
02429025 93a20019 00021200 02429025 27a40010 02402821 0411FFA8 00000000
24040003 10440047 24030001 14400045 24030006 27a40010 02402821 2406000d
24070024 041103C7 00000000 1440003d 24030001 93a2001a 00021200 93a30019
00431025 1440000c 93a30013 93a3002a 00031e00 93a20029 00021400 00621025
93a30027 00431025 93a30028 00031a00 00431025 93a30013 70431002 93a60012
00063200 93a30011 00c33025 02469021 ae320018 93a50010 ae250008 93a30015
00031a00 93a40014 00641825 ae230010 93a40017 00042200 93a70016 00872025
1480000b 00031902 93a70026 00073e00 93a40025 00042400 00e42025 93a70023
00872025 93a70024 00073a00 00872025 00862023 00822023 00832023 0085001b
00a001f4 00002812 24a50002 ae250014 3404fff7 00a4282b 10a00009 24040003
24030006 00601021 8fbf0044 8fb20040 8fb1003c 8fb00038 03e00008 27bd0048
ae240000 93a50032 00052e00 93a40031 00042400 00a42025 93a5002f 00852025
93a50030 00052a00 00852025 ae24001c 02439021 02421021 ae220020 ae200004
ae110060 1000ffe7 00001821
27bdffa0 afbf005c afb10058 afb00054 00803021 3c029d00 8c42008c 8c420000
8c510060 12200024 24100005 ae200004 27a20024 afa20014 27a40010 27a50030
0411FEF8 00000000 1440001b 00408021 93a20030 10400017 93a2003b 30420010
54400015 24100003 27a40030 0411FE15 00000000 ae22002c 93a3004f 00031e00
93a2004e 00021400 00621025 93a3004c 00431025 93a3004d 00031a00 00431025
ae220028 ae200024 24020001 10000002 ae220004 24100003 02001021 8fbf005c
8fb10058 8fb00054 03e00008 27bd0060
27bdffd0 afbf002c afb60028 afb50024 afb40020 afb3001c afb20018 afb10014
afb00010 0080a821 00c09821 3c029d00 8c42008c 8c420000 8c500060 acc00000
12000049 24020005 8e030004 30630001 10600045 24020004 8e120028 8e020024
02429023 0245102b 00a2900a 1240003e 00001021 0080a021 24160200 8e020024
304301ff 5460001e 8e060024 8e110008 2631ffff 00021a42 02238824 323100ff
5620000e 8e040030 54400003 8e040030 10000003 8e02002c 0411FD90 00000000
2c430002 50600004 ae020030 ae000004 10000025 24020001 8e040030 0411FDB5
00000000 14400004 00518821 ae000004 1000001d 24020001 ae110034 8e060024
30c601ff 02c61023 0052882b 0251100a 00408821 00002021 0295200b 8e050034
00403821 041102F0 00000000 50400004 8e020024 ae000004 1000000b 24020001
00511021 ae020024 02519023 8e620000 00511021 12400003 ae620000 1000ffc7
0291a021 00001021 8fbf002c 8fb60028 8fb50024 8fb40020 8fb3001c 8fb20018
8fb10014 8fb00010 03e00008 27bd0030
27bdffd0 afbf002c afb60028 afb50024 afb40020 afb3001c afb20018 afb10014
afb00010 00a09021 00c09821 0080a021 3c029d00 8c42008c 8c420000 8c500060
acc00000 12000077 24020005 8e030004 30640001 10800073 24020004 14a00011
30630040 5060000a 8e030004 00002021 00002821 04110306 00000000 50400004
8e030004 ae000004 10000066 24020001 2402ffbf 00621024 ae020004 10000061
00001021 54600006 8e030028 8e030024 2402fe00 00621024 ae020024 8e030028
8e020024 00621023 0052182b 10600004 24150200 10400053 00409021 24150200
2416ffbf 8e020024 304301ff 54600028 8e110024 8e110008 2631ffff 00021a42
02238824 323100ff 5620000e 8e040030 54400003 8e040030 10000003 8e02002c
0411FD12 00000000 2c430002 50600004 ae020030 ae000004 1000003a 24020001
8e040030 0411FD37 00000000 14400004 00512821 ae000004 10000032 24020001
ae050034 00002021 041102C9 00000000 50400004 8e020004 ae000004 10000029
24020001 34420040 ae020004 8e110024 323101ff 02b18823 0232102b 0242880a
02802021 02202821 041102B9 00000000 50400004 8e020024 ae000004 10000019
24020001 00511021 ae020024 8e620000 00511021 ae620000 8e020024 304201ff
5440000d 02519023 00002021 00002821 041102A7 00000000 50400004 8e020004
ae000004 10000007 24020001 00561024 ae020004 02519023 1640ffb2 0291a021
00001021 8fbf002c 8fb60028 8fb50024 8fb40020 8fb3001c 8fb20018 8fb10014
8fb00010 03e00008 27bd0030
27bdffe0 afbf001c afb00018 3c029d00 8c42008c 8c500000 00002021 00002821
27a60010 0411FF63 00000000 ae000060 8fbf001c 8fb00018 03e00008 27bd0020
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 3c029d00 8c42008c
8c420000 8c500060 1200004d 24020005 8e030004 30630001 10600049 24020004
8e020028 0044902b 0092100a 00409021 8e030024 ae000024 12400041 00001021
8e110008 10600012 00118a40 2463ffff 2642ffff 0051001b 022001f4 00001012
0071001b 022001f4 00002012 0044102b 54400008 8e04002c 00111023 00431824
ae030024 02439023 10000003 8e040030 8e04002c ae040030 0232102b 10400017
00119823 02519023 0411FC85 00000000 00402021 2c420002 54400006 ae000004
8e020014 0082102b 54400004 ae040030 ae000004 1000001a 24020001 8e020024
00511021 ae020024 02531021 00511821 0223182b 5460ffec 00409021 8e020024
00529021 ae120024 0411FC9B 00000000 54400004 8e040008 ae000004 10000008
24020001 2484ffff 8e030024 00031a42 00831824 00431021 ae020034 00001021
8fbf0024 8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0028
00052840 0085001b 00a001f4 00001012 03e00008 2442ffff
27bdffe8 afbf0014 afb00010 3c029d00 8c43008c 8c700000 8c420010 3c03bf81
8c65f220 7ca5d800 3c030661 24630053 10a3000b 24040018 3c03bf81 8c64f220
7c84d800 3c030660 24630053 00832026 24030018 2405000b 00a4180b 00602021
24050008 0040f809 00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800
3c030661 24630053 10a3000b 24040006 3c03bf81 8c64f220 7c84d800 3c030660
24630053 00832026 24030006 24050017 00a4180b 00602021 24050002 0040f809
00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800 3c030661 24630053
10a3000b 2404001a 3c03bf81 8c64f220 7c84d800 3c030660 24630053 00832026
2403001a 2405000f 00a4180b 00602021 24050008 0040f809 00003021 3c02bf81
ac40f230 3c05aa99 24a56655 ac45f230 3c045566 348499aa ac44f230 3c03bf81
8c66f200 7c066b44 ac66f200 3c06bf81 8cc7fa90 24080004 7d071804 acc7fa90
3c06bf81 8cc7fb60 7d071804 acc7fb60 ac40f230 ac45f230 ac44f230 8c62f200
24040001 7c826b44 ac62f200 34038120 3c02bf80 ac435a00 3c029d00 8c420000
8c440000 3c050003 34a5d090 0411FF8E 00000000 3c03bf80 ac625a30 24020002
ae02003c 8fbf0014 8fb00010 03e00008 27bd0018
27bdffe8 afbf0014 afb00010 3c029d00 8c43008c 8c700000 8c420010 3c03bf81
8c65f220 7ca5d800 3c030661 24630053 10a3000b 24040018 3c03bf81 8c64f220
7c84d800 3c030660 24630053 00832026 24030018 2405000b 00a4180b 00602021
00002821 0040f809 00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800
3c030661 24630053 10a3000b 24040006 3c03bf81 8c64f220 7c84d800 3c030660
24630053 00832026 24030006 24050017 00a4180b 00602021 00002821 0040f809
00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800 3c030661 24630053
10a3000b 2404001a 3c03bf81 8c64f220 7c84d800 3c030660 24630053 00832026
2403001a 2405000f 00a4180b 00602021 00002821 0040f809 00003021 3c02bf81
ac40f230 3c05aa99 24a56655 ac45f230 3c045566 348499aa ac44f230 3c03bf81
8c66f200 7c066b44 ac66f200 3c06bf81 8cc7fb60 7c071804 acc7fb60 ac40f230
ac45f230 ac44f230 8c62f200 24040001 7c826b44 ac62f200 ae00003c 8fbf0014
8fb00010 03e00008 27bd0018
27bdffe8 afbf0014 3c029d00 8c420004 0040f809 24040064 8fbf0014 03e00008
27bd0018
308400ff 3c02bf80 ac445a20 3c03bf80 8c625a10 30420001 1040fffd 3c02bf80
8c425a20 03e00008 00000000
240300ff 3c02bf80 ac435a20 3c03bf80 8c625a10 30420001 1040fffd 3c02bf80
8c425a20 03e00008 304200ff
27bdffe0 afbf001c afb20018 afb10014 afb00010 309100ff 3c029d00 8c42008c
8c500000 7c111420 04410009 00a09021 24040077 00002821 0411FFF1 00000000
2c430002 1060002f 8fbf001c 3231007f 8e020058 8e030054 ac430000 0411FFDD
00000000 8e02005c 8e030054 ac430000 0411FFD8 00000000 02202021 0411FFCA
00000000 00122602 0411FFC7 00000000 7e443c00 0411FFC4 00000000 7e443a00
0411FFC1 00000000 324400ff 0411FFBE 00000000 24020040 12220006 24040095
3a310048 24020001 24030087 00402021 0071200a 0411FFB4 00000000 2410000a
0411FFBC 00000000 7c021c20 04610004 2610ffff 321000ff 1600fff9 00000000
8fbf001c 8fb20018 8fb10014 8fb00010 03e00008 27bd0020
27bdffd0 afbf002c afb40028 afb30024 afb20020 afb1001c afb00018 3c029d00
8c42008c 8c510000 0411FEB8 00000000 8e220058 8e230054 ac430000 2410000a
0411FF9E 00000000 2610ffff 321000ff 1600fffb 24040040 00002821 0411FFA2
00000000 24030001 1443005a 00009021 24040048 240501aa 0411FF9B 00000000
24030001 14430033 240400e9 27b40010 27b30014 02808021 0411FF88 00000000
a2020000 26100001 1613fffb 93a30012 24020001 14620047 00009021 93a30013
240200aa 54620044 a232004c 10000007 24102710 0411FF65 00000000 16000004
240400e9 10000039 00009021 240400e9 3c054000 0411FF7C 00000000 5440fff5
2610ffff 12000033 00009021 2404007a 00002821 0411FF74 00000000 5440002e
a232004c 0411FF65 00000000 a2820000 26940001 1674fffb 2402000c 93b20010
32520040 24030004 0072100a 10000021 00409021 00002821 0411FF63 00000000
2c420002 24030002 24120001 0062900b 240300e9 24130041 0062980b 10000005
24102710 0411FF39 00000000 52000011 00009021 02602021 00002821 0411FF52
00000000 5440fff7 2610ffff 52000009 00009021 24040050 24050200 0411FF4A
00000000 10000003 0002900b 10000002 a232004c a232004c 8e220058 8e230054
ac430000 0411FF35 00000000 3c029d00 8c420000 8c450000 00a02021 00052882
0411FE3C 00000000 3c03bf80 ac605a00 3c04bf80 ac825a30 34028120 ac625a00
2e420001 8fbf002c 8fb40028 8fb30024 8fb20020 8fb1001c 8fb00018 03e00008
27bd0030
27bdffd0 afbf002c afb50028 afb40024 afb30020 afb2001c afb10018 afb00014
00809021 00c09821 00e0a821 3c029d00 8c42008c 8c540000 9283004c 30630008
00051240 24040051 0043280a 0411FF15 00000000 14400029 24100001 34109c40
241100ff 0411FF04 00000000 14510005 2610ffff 1600fffb 00000000 1000001f
24100001 240300fe 1443001c 24100001 00138823 26310202 12600006 02358823
0411FEF5 00000000 2673ffff 1660fffc 00000000 12400009 02558021 0411FEEE
00000000 a2420000 26520001 1650fffb 00000000 10000004 00000000 26b5ffff
56a0ffff 26b5ffff 0411FEE3 00000000 2631ffff 1620fffc 00008021 8e820058
8e830054 ac430000 0411FEDB 00000000 02001021 8fbf002c 8fb50028 8fb40024
8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0030
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 00808021 3c029d00
8c42008c 10800012 8c510000 10a0004a 00009821 8e220044 10400047 00859021
92040000 26100001 0411FEB2 00000000 8e220044 2442ffff 1212003e ae220044
5440fff8 92040000 1000003b 00009821 50a00014 8e300044 9223004c 30630008
00051240 24040058 0043280a 0411FEB7 00000000 14400030 24130001 240400ff
0411FE9C 00000000 240400fe 0411FE99 00000000 24020200 ae220044 10000026
00009821 26100002 12000008 2610ffff 2412ffff 00002021 0411FE8E 00000000
2610ffff 1612fffc 00002021 0411FE94 00000000 3042001f 24030005 1443000e
24130001 10000005 24101388 0411FE78 00000000 10000002 2610ffff 241200ff
0411FE87 00000000 10520003 2e130001 1600fff6 24130001 8e220058 8e230054
ac430000 0411FE7E 00000000 10000003 02601021 00009821 02601021 8fbf0024
8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0028
27bdffe0 afbf001c afb10018 afb00014 00808821 3c109d00 8e02003c 0040f809
24040064 8e03008c ac620000 00002021 00001821 24050019 00042080 00442021
ac800000 24630001 1465fffb 00602021 3c039d00 8c63008c 8c630000 24040064
ac640040 3c049d00 24841a6c 3c059d00 24a51ea0 00a4302b 10c00004 00a42023
00918821 10000003 ac710048 00918821 ac710048 8fbf001c 8fb10018 8fb00014
03e00008 27bd0020
27bdffe0 afbf001c afb20018 afb10014 afb00010 3c109d00 8e02008c 8c510000
ae240050 8e020028 0040f809 00809021 24030001 00431004 ae220054 8e020024
02402021 0040f809 24050006 ae220058 8e020024 02402021 0040f809 24050005
ae22005c 8e020010 02402021 24050008 0040f809 00003021 8e220058 8e230054
ac430000 0411FE77 00000000 8fbf001c 8fb20018 8fb10014 8fb00010 03e00008
27bd0020
27bdffe8 afbf0014 3c029d00 8c42008c 8c440000 0411FAFA 00000000 304200ff
8fbf0014 03e00008 27bd0018
27bdffc8 afbf0034 afb50030 afb4002c afb30028 afb20024 afb10020 afb0001c
00a08021 00c09021 8c820000 8c830004 24040009 14440003 00e08821 106000b8
24140642 2404000b 1444001a 00432025 14600018 2414ffff 3c029d00 8c42008c
8c420000 144000b1 2415ffff 8e040000 0411FF85 00000000 ae220000 ae200004
8e440000 0411FFAA 00000000 10400004 00000000 0040a021 100000a4 0000a821
0411FFCC 00000000 0040a021 1000009f 0000a821 1480000f 3c049d00 3c029d00
8c42008c 8c420000 2414ffff 14400097 2415ffff 8e040000 0411FF6B 00000000
ae420000 ae400004 0000a021 1000008f 0000a821 8c84008c 8c910000 2414ffff
1220008a 2415ffff 24040001 14440008 24040002 14600006 0000a821 8e040000
0411FF83 00000000 10000080 0040a021 14440007 24040003 14600005 0000a821
0411FFA4 00000000 10000078 0040a021 14440016 24040004 14600014 00000000
82020000 26040001 00821021 a0400001 82030001 24020020 14620005 24030020
24840001 80820000 5043fffe 24840001 0411FB23 00000000 8e430000 ae230038
305400ff 10000061 0000a821 1444000e 24040005 1460000c 27a60010 26040001
92050000 0411FB4A 00000000 8fa30010 a2030000 ae430000 ae400004 305400ff
10000052 0000a821 1444001d 24040006 1460001b 26130001 02602021 92050000
27a60010 0411FB9E 00000000 304200ff 10400004 8fa30010 0040a021 10000043
0000a821 ae430000 ae400004 8e230038 30630001 50600008 0040a021 02602021
00002821 27a60010 0411FB8D 00000000 304200ff 0040a021 10000034 0000a821
14440007 24040007 14600005 0000a821 0411FC16 00000000 1000002c 305400ff
54440014 24040008 54600012 24040008 0411FCF8 00000000 3c109d00 8e020010
8e240050 00002821 0040f809 00003021 8e03008c 8e020044 0040f809 8c640000
8e02008c ac400000 0000a021 10000017 0000a821 14440008 2404000a 14600006
0000a821 8e040000 0411FC08 00000000 1000000e 305400ff 1444000b 2414ffff
5460000a 2415ffff 8e220028 ae020000 ae000004 0000a021 10000004 0000a821
10000002 0000a821 2415ffff 02801021 02a01821 8fbf0034 8fb50030 8fb4002c
8fb30028 8fb20024 8fb10020 8fb0001c 03e00008 27bd0038
41909a80 808f418e 49454545 8f8e4949 4f929290 55554f99 9b9a9959 9f9e9d9c
554f4941 a7a6a5a5 abaaa9a8 afae21ac b3b2b1b0 b7b6b5b4 bbbab9b8 bfbebdbc
c3c2c1c0 c7c6c5c4 cbcac9c8 cfcecdcc d3d2d1d0 d7d6d5d4 dbdad9d8 dfdedddc
e3e2e1e0 e7e6e5e4 ebeae9e8 efeeedec f3f2f1f0 f7f6f5f4 fbfaf9f8 fffefdfc
END CFUNCTION 'MIPS32 M4K
'
CFunction SetRegion
00000000
27bdffc0 afbf003c afbe0038 afb70034 afb60030 afb5002c afb40028 afb30024
afb20020 afb1001c afb00018 8c930000 8cb40000 8cde0000 8ce70000 afa70010
3c109d00 8e020090 80510029 80520028 8e020028 0040f809 02202021 0040a821
8e020028 0040f809 02402021 0040b821 8e020024 02202021 0040f809 24050005
0040b021 8e020024 02202021 0040f809 24050006 8e020024 02402021 0040f809
24050006 00408821 8e020024 02402021 0040f809 24050005 24030001 02a3a804
aed50000 02e3b804 ac570000 2404002a 3c03bf80 ac645820 3c04bf80 8c835810
30630080 1060fffd 3c03bf80 8c645820 ae370000 00132203 ac645820 3c04bf80
8c835810 30630080 1060fffd 3c03bf80 8c645820 ae370000 ac735820 3c04bf80
8c835810 30630080 1060fffd 3c03bf80 8c645820 ae370000 2673ffff 027ef021
001e2203 ac645820 3c04bf80 8c835810 30630080 1060fffd 3c03bf80 8c645820
ae370000 ac7e5820 3c04bf80 8c835810 30630080 1060fffd 3c03bf80 8c645820
ac570000 2404002b ac645820 3c04bf80 8c835810 30630080 1060fffd 3c03bf80
8c645820 ae370000 00142203 ac645820 3c04bf80 8c835810 30630080 1060fffd
3c03bf80 8c645820 ae370000 ac745820 3c04bf80 8c835810 30630080 1060fffd
3c03bf80 8c645820 ae370000 2694ffff 8fa40010 0284a021 00142203 ac645820
3c04bf80 8c835810 30630080 1060fffd 3c03bf80 8c645820 ae370000 ac745820
3c04bf80 8c835810 30630080 1060fffd 3c03bf80 8c645820 ac570000 2402002c
ac625820 8c625810 30420080 1040fffd 3c02bf80 8c425820 ae370000 3c029d00
8c420090 80420028 00021fc3 8fbf003c 8fbe0038 8fb70034 8fb60030 8fb5002c
8fb40028 8fb30024 8fb20020 8fb1001c 8fb00018 03e00008 27bd0040
End CFunction 'MIPS32 M4K
'
'DisplayBuffer 2015-08-14 12:16:15 UTC Author:Peter with CFuncGen Ver 2.1.1.0
'
CFunction DisplayBuffer
00000000
90820000 18400018 00021fc3 24060001 3c03bf80 00803821 90850002 ac655820
8c655810 30a50080 10a0fffd 00000000 8c655820 90e50001 ac655820 8c655810
30a50080 10a0fffd 00000000 8c655820 24c60002 0046282a 10a0ffee 24840002
03e00008 00021fc3 03e00008 00000000
End CFunction 'MIPS32 M4K
'
'CompleteDisplay 2015-08-14 12:16:15 UTC Author:Peter with CFuncGen Ver 2.1.1.0
'
CFunction CompleteDisplay
00000000
27bdffe0 afbf001c afb20018 afb10014 afb00010 3c109d00 8e020090 80510029
8e020028 0040f809 02202021 00409021 8e020024 02202021 0040f809 24050006
24030001 02439004 ac520000 8fbf001c 8fb20018 8fb10014 8fb00010 03e00008
27bd0020
End CFunction 'MIPS32 M4K
'
Edited by matherp 2015-08-15
 
WhiteWizzard
Guru

Joined: 05/04/2013
Location: United Kingdom
Posts: 2938
Posted: 05:51am 14 Aug 2015
Copy link to clipboard 
Print this post

Hi Peter,

Just wondering if you will be working on displaying video soon

Seriously - this is great stuff

WW
 
viscomjim
Guru

Joined: 08/01/2014
Location: United States
Posts: 925
Posted: 08:29am 14 Aug 2015
Copy link to clipboard 
Print this post

This IS great!!!!!! Can't wait to try...
 
Frank N. Furter
Guru

Joined: 28/05/2012
Location: Germany
Posts: 947
Posted: 11:43pm 15 Aug 2015
Copy link to clipboard 
Print this post

Hi Peter,

that's really absolutely fantastic!!!

THANK YOU VERY, VERY MUCH!!!!

Frank
 
Chris Roper
Senior Member

Joined: 19/05/2015
Location: South Africa
Posts: 280
Posted: 12:17am 16 Aug 2015
Copy link to clipboard 
Print this post

Next up "ISAM" the IBM Indexed Sequential Access Method, a method for indexing data for fast retrieval.

Well wishful thinking on my part :)

But with ISAM we could run Datalog's, Databases, store and retrieve config data, anything that could fit in fixed length records.

Think Tape storage or punch-card for those of you who grew up in the GUI and High-speed Disk era :)

Cheers
Chris

http://caroper.blogspot.com/
 
matherp
Guru

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

  Quote  Next up "ISAM"


That is easy enough as all the code is available

Just needs the slog work of a Cfunction wrapper.
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 03:48am 16 Aug 2015
Copy link to clipboard 
Print this post

Eureka - struggled a bit but finally got it Peter. Mind you, it must have been a typical English day when you took the duck photo - it's pretty dark on my 2.4" ili9341 screen, but it's definitely there.

I had to use a barebones 170 because Mik's SMD backpack (that I've been using) has Pin 6 (the SPI2 MISO) hardwired to the panel's Pin 3 (CS). I've now got the SD card CS on Pin 23 and changed the panel's OPTION setup command to use CS on Pin 15. Pins 23 & 15 don't seem to have too much important on them - says he, ducking!

Now, just gotta find some nice bright photos!

Greg
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 08:26pm 17 Aug 2015
Copy link to clipboard 
Print this post

Here's a better one, uM2 SD card on the the ILI9431 screen. Little cousin to Geoff's big tiger on the 5" uM+ screen.

Greg


 
matherp
Guru

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

Here is another version that eliminates the need to use bmp2bin.

This version will read a standard binary .PPM picture file (portable pixmap format) directly and display it.

Any decent photo program should be able to save a picture as a .PPM, sample attached.

2015-08-18_180103_P1040051.zip

Note that there are two variants of the .PPM: binary and ascii. The ascii files are huge so I haven't catered for them. The program checks the file structure is correct and posts an error if it isn't.

The advantage of the .PPM is that it is full 24-bit colour so if I can work out how to display files using a loadable driver version of the SSD1963 we can get full colour output from SD card on the uM2.


OPTION EXPLICIT
OPTION DEFAULT NONE
CPU 48
'
'PIC32MX170 28 Pin SD Card wiring
' Chip Select can be any digital output pin define in Constant SD_CS%
' SPI2
'MOSI Pin 24
'MISO Pin 6
'SCLK PIN 26
'
'PIC32MX170 44 Pin wiring
' Chip Select can be any digital output pin define in Constant SD_CS%
' SPI2
'MOSI Pin 11
'MISO Pin 23
'SCLK PIN 15
'
CONST SD_CS%=10 ' Chip select pin for the SD card
'
DIM AddrOfRam%=0 'Holds the address returned by Driver.Init
'
' Main program
'
CLS
DisplayPicture("P1040051.ppm") ' draw a picture starting at x=0, y=0
END
'
'***************************************************************************************************
'
' Display a picture from the SD card
' Code should work on any of the MM2 supported displays ILI9341, ST7735, ILI9163
' Picture must be in binary PPM format
'
' Parameters are:
' PIC$ = filename of the picture to be displayed
' StartX% = X coordinate of the top left of the picture
' StartY% = Y coordinate of the top left of the picture
'
' Note: the routine checks that the picture is not too big for the screen and reports an error if it is
'
Sub DisplayPicture(PIC$, StartX%, StartY%)
LOCAL Buffer$,addbuffer$ length 3
LOCAL Result%=-1
LOCAL NumBytes%,a%
Result%=File.Driver.Open(SD_CS%,AddrOfRam%)
PError "Failed to OPEN the Driver. Please Power Cycle system",Result%,1
Result%=File.Open(PIC$,1)
PError "Failed to Open file "+PIC$,Result%,1
'Read the first 128 bytes
Buffer$=STRING$(128," ")
Result%=File.Read(Buffer$,NumBytes%)
PError "Failed to Read file",Result%,0
a%=instr(buffer$,chr$(10)) ' look for the first CR
if left$(buffer$,a%-1)="P6" then
buffer$=right$(buffer$,len(buffer$)-a%)
a%=instr(buffer$,chr$(10)) ' look for the second CR
buffer$=right$(buffer$,len(buffer$)-a%)
a%=instr(buffer$,chr$(32)) ' look for the space between dimensions
local width%=val(left$(buffer$,a%-1))
buffer$=right$(buffer$,len(buffer$)-a%)
a%=instr(buffer$,chr$(10)) ' look for the third CR
LOCAL height%=val(left$(buffer$,a%-1))
buffer$=right$(buffer$,len(buffer$)-a%)
a%=instr(buffer$,chr$(10)) ' look for the fourth CR
buffer$=right$(buffer$,len(buffer$)-a%)
a%=len(buffer$) mod 3
addBuffer$=STRING$(3-a%," ") ' we need to make sure we have a number of bytes divisible by three in the buffer
Result%=File.Read(addBuffer$,NumBytes%)
buffer$=buffer$+addbuffer$
if (StartX%+width%>MM.HRES) OR (StartY%+height%>MM.VRES) then
print "Picture too big", width%," x",height%
else
Result%= SetRegion(StartX%, StartY%, width%, height%)
Result%=DisplayBuffer(Buffer$)
Buffer$=STRING$(240,chr$(0))
do
Result%=Driver.SDCard(4,Buffer$,NumBytes%)
if numbytes%<>0 then Result%=DisplayBuffer(Buffer$)
loop while NumBytes%<>0
Result%= CompleteDisplay()
endif
else
Print "Invalid File Format"
endif

Result%=File.Close()
PError "Failed to Close File",Result%,0
Result%=File.Driver.Close()
PError "Failed to Close Driver",Result%,0
IF Result%<>0 THEN
PRINT "Please issue CPU Restart command at MMBasic command prompt"
ENDIF
END sub

'*************************************************
'
' Print Error Message if Code% is NON-Zero
' END if Hard% is NON-Zero
'
'
SUB PError(Msg$,Code%,Hard%)
IF Code%=0 THEN EXIT SUB
PRINT "Error : ";Msg$;". Error Code:";Code% AND &Hff
IF Hard%<>0 THEN END
END SUB

SUB DoTrace(Msg$, Result%, Numbytes%)
END SUB


'***********************************************
'
' CUNCTION FAT Filesystem Driver
'
' (c) Copyright Peter Carnegie 2015
'
' File.Driver.Open Open the Driver, Init S/W, Init H/W, Mount disk
' File.Driver.Close Close the Driver and release all resources
' File.Open Open File specifying Writing Mode
' File.Close Close File
' File.Read Read from File
'
' The CFunction can of course be called directly from user code
' These MMBasic wrapper functions just make things neater and tidier !
'
'
'***********************************************



'***********************************************
' Driver Open
'
' Initialises the Driver software framework
' Initialises the driver h/w interface and sets up
' the FAT32 filesystem
' Mounts the disk into the filesystem
'
' File>Driver.Open may be called instead of calling the
' individual driver calls if the disk is already
' inserted into the SDCard holder
'
'
FUNCTION File.Driver.Open(CSPin%,Addr%) AS INTEGER

'Get address of the CFunction Driver itself
LOCAL AddrOfSDCard%=PEEK(CFUNADDR Driver.SDCard)

LOCAL Result%=Driver.SDCard(11,AddrOfSDCard%,CSPin%,Addr%)
File.Driver.Open=Result%

DoTrace("Driver Open",Result%)

END FUNCTION


'***********************************************
'
' Open File
'
' Path$ Name of file to be Opened
' Mode% If set to 1, then automatically flush to disk
' every File.Write
'
' Returns 0 if succesful else non-zero
'
'
FUNCTION File.Open(Path$, Mode%) AS INTEGER

LOCAL Result%=Driver.SDCard(3,Path$,Mode%)
File.Open=Result%

DoTrace("Open File",Result%)

END FUNCTION


'***********************************************
'
' Read File - Sequential
'
' Returns 0 if succesful else non-zero
' On Entry
'
' On Exit
' Buffer$ will contain the bytes read in from disk
' NumBytes% will contain the number of bytes actually read
' If NumBytes%=0 then End Of File has been reached
'
' Use File.Seek to position the write pointer
'
FUNCTION File.Read(Buffer$, NumBytes%) AS INTEGER

LOCAL Result%=Driver.SDCard(4,Buffer$,NumBytes%)
File.Read=Result%

DoTrace("Read File",Result%)

END FUNCTION

'***********************************************
'
' Close File
'
' Returns 0 if succesful else non-zero
' Flushes any unwritten bytes to the physical disk
'
'
FUNCTION File.Close() AS INTEGER

LOCAL Result%=Driver.SDCard(6)
File.Close=Result%

DoTrace("Close File",Result%)

END FUNCTION


'***********************************************
'
' Drive Close
'
' Returns 0 if succesful else non-zero
' Unconfigures SPI
' Unconfigures CS pin
' FREEs up persistent RAM
'
'
FUNCTION File.Driver.Close() AS INTEGER

LOCAL Result%=0
Result%=Driver.SDCard(7)
File.Driver.Close=Result%

DoTrace("Close Driver",Result%)

END FUNCTION

'******************************************************************************
'Created : 2015-08-13 16:31:50 UTC
'Author : Peter Carnegie
'Generator : CFuncGen Ver 2.1.5.0
'
CFUNCTION Driver.SDCard
0000069B
10c00006 00801021 00862021 a0450000 24420001 5444fffe a0450000 03e00008
00000000
2407ffff 24c6ffff 10c70008 00001021 80830000 80a20000 00621023 14400003
24840001 1000fff7 24a50001 03e00008 00000000
27bdffe0 afbf001c 3c029d00 8c42008c 8c420000 2c830002 1460001e 8c420060
8c430014 0083182b 1060001c 24030003 8c450000 14a3001e 000429c2 8c420018
3086007f 27a40010 00a22821 00063080 24070004 04110565 00000000 14400010
24030001 93a30013 00031e00 93a20012 00021400 00621825 93a20010 00621825
93a20011 00021200 00621825 10000004 7c63d800 10000002 24030001 24030001
00601021 8fbf001c 03e00008 27bd0020 1000ffff 00000000
3c029d00 8c42008c 8c420000 8c430060 2484fffe 8c650014 24a5fffe 0085282b
10a00005 00001021 8c650008 8c620020 70851802 00621021 03e00008 00000000
90830015 00031a00 90820014 00621825 00031c00 9082001b 00021200 9084001a
00441025 03e00008 00621025
27bdffe8 afbf0014 afb00010 00808021 3c029d00 8c42008c 8c420000 8c430060
ac800000 8c840008 24050001 1085000c 24020001 8c650014 0085282b 10a00009
8fbf0014 50800001 8c64001c ae04000c 0411FFD0 00000000 ae020010 00001021
8fbf0014 8fb00010 03e00008 27bd0018
27bdffe0 afbf001c afb20018 afb10014 afb00010 00808021 3c029d00 8c42008c
8c420000 8c520060 8c910000 26310001 3231ffff 12200027 24020003 8c830010
50600025 8fbf001c 3222000f 54400020 ae110000 24630001 ac830010 8c84000c
14800007 00111902 8e430010 0223182b 14600016 24020003 10000017 8fbf001c
8e420008 2442ffff 00621024 54400010 ae110000 0411FF75 00000000 00402021
2c430002 1460000b 24020001 8e430014 0083182b 10600007 24020003 ae04000c
0411FF98 00000000 ae020010 ae110000 00001021 8fbf001c 8fb20018 8fb10014
8fb00010 03e00008 27bd0020
27bdffe0 afbf001c afb20018 afb10014 afb00010 00808821 00a09021 0411FFA1
00000000 14400020 00408021 8e260000 30c6000f 02402021 8e250010 00063140
24070020 041104C9 00000000 0002802b 16000016 02001021 92420000 50400012
24100003 9242000b 30420008 14400008 02202021 02402021 8e250004 2406000b
0411FF32 00000000 10400007 02202021 0411FFA0 00000000 1040ffe4 00408021
10000002 02001021 02001021 8fbf001c 8fb20018 8fb10014 8fb00010 03e00008
27bd0020
27bdffe0 afbf001c afb20018 afb10014 afb00010 00a08021 3c029d00 8c42008c
8c520000 8c910004 02202021 24050020 2406000b 0411FF0B 00000000 8e090000
00002021 00001821 24080008 240a002f 2407002e 240b0008 01231021 80450000
30a200ff 24630001 2c460021 14c0001e 306300ff 504a001d 01231821 10470003
0088302b 14c00008 00000000 550b0017 01231821 54470015 01231821 01602021
1000ffed 2408000b 04a10005 2445ff9f 8e450048 00a21021 9042ff80 2445ff9f
30a500ff 2ca5001a 10a00003 02242821 2442ffe0 304200ff a0a20000 24840001
1000ffdd 308400ff 01231821 ae030000 2c420021 a222000b 00001021 8fbf001c
8fb20018 8fb10014 8fb00010 03e00008 27bd0020
27bdffe0 afbf001c afb10018 afb00014 00808021 afa60028 80c20000 24030020
14430006 00a08821 24c60001 afa60028 80c20000 5043fffd 24c60001 2403002f
54430004 ae000008 24c60001 afa60028 ae000008 8fa20028 90420000 2c420020
10400006 02002021 0411FF18 00000000 10000019 a2200000 02002021 27a50028
0411FF9A 00000000 14400013 02002021 02202821 0411FF64 00000000 1440000f
8fbf001c 8e030004 9063000b 5460000c 8fb10018 9222000b 30420010 10400005
02202021 0411FEF6 00000000 1000ffea ae020008 24020003 8fbf001c 8fb10018
8fb00014 03e00008 27bd0020
27bdffe0 afbf001c afb10018 afb00014 00808021 00a08821 240601fe 24070002
04110421 00000000 14400018 24030003 92040001 00042200 92020000 00822025
7c042620 2402aa55 14820010 24030002 02002021 02202821 24060052 24070002
04110411 00000000 14400008 24030001 92030001 00031a00 92020000 00621825
7c031e20 38634146 0003182b 00601021 8fbf001c 8fb10018 8fb00014 03e00008
27bd0020
27bdffb8 afbf0044 afb20040 afb1003c afb00038 00808821 3c029d00 8c42008c
8c500000 ae000060 8e04003c 04110364 00000000 30420001 1440006a 24030002
27a40010 00002821 0411FFC4 00000000 24030001 1443001a 00009021 27a40010
00002821 240601be 24070010 041103E5 00000000 1440005b 24030001 93a20014
10400058 24030006 93b2001b 00129600 93a2001a 00021400 02429025 93a20018
02429025 93a20019 00021200 02429025 27a40010 02402821 0411FFA8 00000000
24040003 10440047 24030001 14400045 24030006 27a40010 02402821 2406000d
24070024 041103C7 00000000 1440003d 24030001 93a2001a 00021200 93a30019
00431025 1440000c 93a30013 93a3002a 00031e00 93a20029 00021400 00621025
93a30027 00431025 93a30028 00031a00 00431025 93a30013 70431002 93a60012
00063200 93a30011 00c33025 02469021 ae320018 93a50010 ae250008 93a30015
00031a00 93a40014 00641825 ae230010 93a40017 00042200 93a70016 00872025
1480000b 00031902 93a70026 00073e00 93a40025 00042400 00e42025 93a70023
00872025 93a70024 00073a00 00872025 00862023 00822023 00832023 0085001b
00a001f4 00002812 24a50002 ae250014 3404fff7 00a4282b 10a00009 24040003
24030006 00601021 8fbf0044 8fb20040 8fb1003c 8fb00038 03e00008 27bd0048
ae240000 93a50032 00052e00 93a40031 00042400 00a42025 93a5002f 00852025
93a50030 00052a00 00852025 ae24001c 02439021 02421021 ae220020 ae200004
ae110060 1000ffe7 00001821
27bdffa0 afbf005c afb10058 afb00054 00803021 3c029d00 8c42008c 8c420000
8c510060 12200024 24100005 ae200004 27a20024 afa20014 27a40010 27a50030
0411FEF8 00000000 1440001b 00408021 93a20030 10400017 93a2003b 30420010
54400015 24100003 27a40030 0411FE15 00000000 ae22002c 93a3004f 00031e00
93a2004e 00021400 00621025 93a3004c 00431025 93a3004d 00031a00 00431025
ae220028 ae200024 24020001 10000002 ae220004 24100003 02001021 8fbf005c
8fb10058 8fb00054 03e00008 27bd0060
27bdffd0 afbf002c afb60028 afb50024 afb40020 afb3001c afb20018 afb10014
afb00010 0080a821 00c09821 3c029d00 8c42008c 8c420000 8c500060 acc00000
12000049 24020005 8e030004 30630001 10600045 24020004 8e120028 8e020024
02429023 0245102b 00a2900a 1240003e 00001021 0080a021 24160200 8e020024
304301ff 5460001e 8e060024 8e110008 2631ffff 00021a42 02238824 323100ff
5620000e 8e040030 54400003 8e040030 10000003 8e02002c 0411FD90 00000000
2c430002 50600004 ae020030 ae000004 10000025 24020001 8e040030 0411FDB5
00000000 14400004 00518821 ae000004 1000001d 24020001 ae110034 8e060024
30c601ff 02c61023 0052882b 0251100a 00408821 00002021 0295200b 8e050034
00403821 041102F0 00000000 50400004 8e020024 ae000004 1000000b 24020001
00511021 ae020024 02519023 8e620000 00511021 12400003 ae620000 1000ffc7
0291a021 00001021 8fbf002c 8fb60028 8fb50024 8fb40020 8fb3001c 8fb20018
8fb10014 8fb00010 03e00008 27bd0030
27bdffd0 afbf002c afb60028 afb50024 afb40020 afb3001c afb20018 afb10014
afb00010 00a09021 00c09821 0080a021 3c029d00 8c42008c 8c420000 8c500060
acc00000 12000077 24020005 8e030004 30640001 10800073 24020004 14a00011
30630040 5060000a 8e030004 00002021 00002821 04110306 00000000 50400004
8e030004 ae000004 10000066 24020001 2402ffbf 00621024 ae020004 10000061
00001021 54600006 8e030028 8e030024 2402fe00 00621024 ae020024 8e030028
8e020024 00621023 0052182b 10600004 24150200 10400053 00409021 24150200
2416ffbf 8e020024 304301ff 54600028 8e110024 8e110008 2631ffff 00021a42
02238824 323100ff 5620000e 8e040030 54400003 8e040030 10000003 8e02002c
0411FD12 00000000 2c430002 50600004 ae020030 ae000004 1000003a 24020001
8e040030 0411FD37 00000000 14400004 00512821 ae000004 10000032 24020001
ae050034 00002021 041102C9 00000000 50400004 8e020004 ae000004 10000029
24020001 34420040 ae020004 8e110024 323101ff 02b18823 0232102b 0242880a
02802021 02202821 041102B9 00000000 50400004 8e020024 ae000004 10000019
24020001 00511021 ae020024 8e620000 00511021 ae620000 8e020024 304201ff
5440000d 02519023 00002021 00002821 041102A7 00000000 50400004 8e020004
ae000004 10000007 24020001 00561024 ae020004 02519023 1640ffb2 0291a021
00001021 8fbf002c 8fb60028 8fb50024 8fb40020 8fb3001c 8fb20018 8fb10014
8fb00010 03e00008 27bd0030
27bdffe0 afbf001c afb00018 3c029d00 8c42008c 8c500000 00002021 00002821
27a60010 0411FF63 00000000 ae000060 8fbf001c 8fb00018 03e00008 27bd0020
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 3c029d00 8c42008c
8c420000 8c500060 1200004d 24020005 8e030004 30630001 10600049 24020004
8e020028 0044902b 0092100a 00409021 8e030024 ae000024 12400041 00001021
8e110008 10600012 00118a40 2463ffff 2642ffff 0051001b 022001f4 00001012
0071001b 022001f4 00002012 0044102b 54400008 8e04002c 00111023 00431824
ae030024 02439023 10000003 8e040030 8e04002c ae040030 0232102b 10400017
00119823 02519023 0411FC85 00000000 00402021 2c420002 54400006 ae000004
8e020014 0082102b 54400004 ae040030 ae000004 1000001a 24020001 8e020024
00511021 ae020024 02531021 00511821 0223182b 5460ffec 00409021 8e020024
00529021 ae120024 0411FC9B 00000000 54400004 8e040008 ae000004 10000008
24020001 2484ffff 8e030024 00031a42 00831824 00431021 ae020034 00001021
8fbf0024 8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0028
00052840 0085001b 00a001f4 00001012 03e00008 2442ffff
27bdffe8 afbf0014 afb00010 3c029d00 8c43008c 8c700000 8c420010 3c03bf81
8c65f220 7ca5d800 3c030661 24630053 10a3000b 24040018 3c03bf81 8c64f220
7c84d800 3c030660 24630053 00832026 24030018 2405000b 00a4180b 00602021
24050008 0040f809 00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800
3c030661 24630053 10a3000b 24040006 3c03bf81 8c64f220 7c84d800 3c030660
24630053 00832026 24030006 24050017 00a4180b 00602021 24050002 0040f809
00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800 3c030661 24630053
10a3000b 2404001a 3c03bf81 8c64f220 7c84d800 3c030660 24630053 00832026
2403001a 2405000f 00a4180b 00602021 24050008 0040f809 00003021 3c02bf81
ac40f230 3c05aa99 24a56655 ac45f230 3c045566 348499aa ac44f230 3c03bf81
8c66f200 7c066b44 ac66f200 3c06bf81 8cc7fa90 24080004 7d071804 acc7fa90
3c06bf81 8cc7fb60 7d071804 acc7fb60 ac40f230 ac45f230 ac44f230 8c62f200
24040001 7c826b44 ac62f200 34038120 3c02bf80 ac435a00 3c029d00 8c420000
8c440000 3c050003 34a5d090 0411FF8E 00000000 3c03bf80 ac625a30 24020002
ae02003c 8fbf0014 8fb00010 03e00008 27bd0018
27bdffe8 afbf0014 afb00010 3c029d00 8c43008c 8c700000 8c420010 3c03bf81
8c65f220 7ca5d800 3c030661 24630053 10a3000b 24040018 3c03bf81 8c64f220
7c84d800 3c030660 24630053 00832026 24030018 2405000b 00a4180b 00602021
00002821 0040f809 00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800
3c030661 24630053 10a3000b 24040006 3c03bf81 8c64f220 7c84d800 3c030660
24630053 00832026 24030006 24050017 00a4180b 00602021 00002821 0040f809
00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800 3c030661 24630053
10a3000b 2404001a 3c03bf81 8c64f220 7c84d800 3c030660 24630053 00832026
2403001a 2405000f 00a4180b 00602021 00002821 0040f809 00003021 3c02bf81
ac40f230 3c05aa99 24a56655 ac45f230 3c045566 348499aa ac44f230 3c03bf81
8c66f200 7c066b44 ac66f200 3c06bf81 8cc7fb60 7c071804 acc7fb60 ac40f230
ac45f230 ac44f230 8c62f200 24040001 7c826b44 ac62f200 ae00003c 8fbf0014
8fb00010 03e00008 27bd0018
27bdffe8 afbf0014 3c029d00 8c420004 0040f809 24040064 8fbf0014 03e00008
27bd0018
308400ff 3c02bf80 ac445a20 3c03bf80 8c625a10 30420001 1040fffd 3c02bf80
8c425a20 03e00008 00000000
240300ff 3c02bf80 ac435a20 3c03bf80 8c625a10 30420001 1040fffd 3c02bf80
8c425a20 03e00008 304200ff
27bdffe0 afbf001c afb20018 afb10014 afb00010 309100ff 3c029d00 8c42008c
8c500000 7c111420 04410009 00a09021 24040077 00002821 0411FFF1 00000000
2c430002 1060002f 8fbf001c 3231007f 8e020058 8e030054 ac430000 0411FFDD
00000000 8e02005c 8e030054 ac430000 0411FFD8 00000000 02202021 0411FFCA
00000000 00122602 0411FFC7 00000000 7e443c00 0411FFC4 00000000 7e443a00
0411FFC1 00000000 324400ff 0411FFBE 00000000 24020040 12220006 24040095
3a310048 24020001 24030087 00402021 0071200a 0411FFB4 00000000 2410000a
0411FFBC 00000000 7c021c20 04610004 2610ffff 321000ff 1600fff9 00000000
8fbf001c 8fb20018 8fb10014 8fb00010 03e00008 27bd0020
27bdffd0 afbf002c afb40028 afb30024 afb20020 afb1001c afb00018 3c029d00
8c42008c 8c510000 0411FEB8 00000000 8e220058 8e230054 ac430000 2410000a
0411FF9E 00000000 2610ffff 321000ff 1600fffb 24040040 00002821 0411FFA2
00000000 24030001 1443005a 00009021 24040048 240501aa 0411FF9B 00000000
24030001 14430033 240400e9 27b40010 27b30014 02808021 0411FF88 00000000
a2020000 26100001 1613fffb 93a30012 24020001 14620047 00009021 93a30013
240200aa 54620044 a232004c 10000007 24102710 0411FF65 00000000 16000004
240400e9 10000039 00009021 240400e9 3c054000 0411FF7C 00000000 5440fff5
2610ffff 12000033 00009021 2404007a 00002821 0411FF74 00000000 5440002e
a232004c 0411FF65 00000000 a2820000 26940001 1674fffb 2402000c 93b20010
32520040 24030004 0072100a 10000021 00409021 00002821 0411FF63 00000000
2c420002 24030002 24120001 0062900b 240300e9 24130041 0062980b 10000005
24102710 0411FF39 00000000 52000011 00009021 02602021 00002821 0411FF52
00000000 5440fff7 2610ffff 52000009 00009021 24040050 24050200 0411FF4A
00000000 10000003 0002900b 10000002 a232004c a232004c 8e220058 8e230054
ac430000 0411FF35 00000000 3c029d00 8c420000 8c450000 00a02021 00052882
0411FE3C 00000000 3c03bf80 ac605a00 3c04bf80 ac825a30 34028120 ac625a00
2e420001 8fbf002c 8fb40028 8fb30024 8fb20020 8fb1001c 8fb00018 03e00008
27bd0030
27bdffd0 afbf002c afb50028 afb40024 afb30020 afb2001c afb10018 afb00014
00809021 00c09821 00e0a821 3c029d00 8c42008c 8c540000 9283004c 30630008
00051240 24040051 0043280a 0411FF15 00000000 14400029 24100001 34109c40
241100ff 0411FF04 00000000 14510005 2610ffff 1600fffb 00000000 1000001f
24100001 240300fe 1443001c 24100001 00138823 26310202 12600006 02358823
0411FEF5 00000000 2673ffff 1660fffc 00000000 12400009 02558021 0411FEEE
00000000 a2420000 26520001 1650fffb 00000000 10000004 00000000 26b5ffff
56a0ffff 26b5ffff 0411FEE3 00000000 2631ffff 1620fffc 00008021 8e820058
8e830054 ac430000 0411FEDB 00000000 02001021 8fbf002c 8fb50028 8fb40024
8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0030
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 00808021 3c029d00
8c42008c 10800012 8c510000 10a0004a 00009821 8e220044 10400047 00859021
92040000 26100001 0411FEB2 00000000 8e220044 2442ffff 1212003e ae220044
5440fff8 92040000 1000003b 00009821 50a00014 8e300044 9223004c 30630008
00051240 24040058 0043280a 0411FEB7 00000000 14400030 24130001 240400ff
0411FE9C 00000000 240400fe 0411FE99 00000000 24020200 ae220044 10000026
00009821 26100002 12000008 2610ffff 2412ffff 00002021 0411FE8E 00000000
2610ffff 1612fffc 00002021 0411FE94 00000000 3042001f 24030005 1443000e
24130001 10000005 24101388 0411FE78 00000000 10000002 2610ffff 241200ff
0411FE87 00000000 10520003 2e130001 1600fff6 24130001 8e220058 8e230054
ac430000 0411FE7E 00000000 10000003 02601021 00009821 02601021 8fbf0024
8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0028
27bdffe0 afbf001c afb10018 afb00014 00808821 3c109d00 8e02003c 0040f809
24040064 8e03008c ac620000 00002021 00001821 24050019 00042080 00442021
ac800000 24630001 1465fffb 00602021 3c039d00 8c63008c 8c630000 24040064
ac640040 3c049d00 24841a6c 3c059d00 24a51ea0 00a4302b 10c00004 00a42023
00918821 10000003 ac710048 00918821 ac710048 8fbf001c 8fb10018 8fb00014
03e00008 27bd0020
27bdffe0 afbf001c afb20018 afb10014 afb00010 3c109d00 8e02008c 8c510000
ae240050 8e020028 0040f809 00809021 24030001 00431004 ae220054 8e020024
02402021 0040f809 24050006 ae220058 8e020024 02402021 0040f809 24050005
ae22005c 8e020010 02402021 24050008 0040f809 00003021 8e220058 8e230054
ac430000 0411FE77 00000000 8fbf001c 8fb20018 8fb10014 8fb00010 03e00008
27bd0020
27bdffe8 afbf0014 3c029d00 8c42008c 8c440000 0411FAFA 00000000 304200ff
8fbf0014 03e00008 27bd0018
27bdffc8 afbf0034 afb50030 afb4002c afb30028 afb20024 afb10020 afb0001c
00a08021 00c09021 8c820000 8c830004 24040009 14440003 00e08821 106000b8
24140642 2404000b 1444001a 00432025 14600018 2414ffff 3c029d00 8c42008c
8c420000 144000b1 2415ffff 8e040000 0411FF85 00000000 ae220000 ae200004
8e440000 0411FFAA 00000000 10400004 00000000 0040a021 100000a4 0000a821
0411FFCC 00000000 0040a021 1000009f 0000a821 1480000f 3c049d00 3c029d00
8c42008c 8c420000 2414ffff 14400097 2415ffff 8e040000 0411FF6B 00000000
ae420000 ae400004 0000a021 1000008f 0000a821 8c84008c 8c910000 2414ffff
1220008a 2415ffff 24040001 14440008 24040002 14600006 0000a821 8e040000
0411FF83 00000000 10000080 0040a021 14440007 24040003 14600005 0000a821
0411FFA4 00000000 10000078 0040a021 14440016 24040004 14600014 00000000
82020000 26040001 00821021 a0400001 82030001 24020020 14620005 24030020
24840001 80820000 5043fffe 24840001 0411FB23 00000000 8e430000 ae230038
305400ff 10000061 0000a821 1444000e 24040005 1460000c 27a60010 26040001
92050000 0411FB4A 00000000 8fa30010 a2030000 ae430000 ae400004 305400ff
10000052 0000a821 1444001d 24040006 1460001b 26130001 02602021 92050000
27a60010 0411FB9E 00000000 304200ff 10400004 8fa30010 0040a021 10000043
0000a821 ae430000 ae400004 8e230038 30630001 50600008 0040a021 02602021
00002821 27a60010 0411FB8D 00000000 304200ff 0040a021 10000034 0000a821
14440007 24040007 14600005 0000a821 0411FC16 00000000 1000002c 305400ff
54440014 24040008 54600012 24040008 0411FCF8 00000000 3c109d00 8e020010
8e240050 00002821 0040f809 00003021 8e03008c 8e020044 0040f809 8c640000
8e02008c ac400000 0000a021 10000017 0000a821 14440008 2404000a 14600006
0000a821 8e040000 0411FC08 00000000 1000000e 305400ff 1444000b 2414ffff
5460000a 2415ffff 8e220028 ae020000 ae000004 0000a021 10000004 0000a821
10000002 0000a821 2415ffff 02801021 02a01821 8fbf0034 8fb50030 8fb4002c
8fb30028 8fb20024 8fb10020 8fb0001c 03e00008 27bd0038
41909a80 808f418e 49454545 8f8e4949 4f929290 55554f99 9b9a9959 9f9e9d9c
554f4941 a7a6a5a5 abaaa9a8 afae21ac b3b2b1b0 b7b6b5b4 bbbab9b8 bfbebdbc
c3c2c1c0 c7c6c5c4 cbcac9c8 cfcecdcc d3d2d1d0 d7d6d5d4 dbdad9d8 dfdedddc
e3e2e1e0 e7e6e5e4 ebeae9e8 efeeedec f3f2f1f0 f7f6f5f4 fbfaf9f8 fffefdfc
END CFUNCTION 'MIPS32 M4K
'
'SetRegion 2015-08-18 17:12:47 UTC Author:Peter with CFuncGen Ver 2.1.1.0
'
CFunction SetRegion
00000000
27bdffc0 afbf003c afbe0038 afb70034 afb60030 afb5002c afb40028 afb30024
afb20020 afb1001c afb00018 8c930000 8cb40000 8cde0000 8ce70000 afa70010
3c109d00 8e020090 80510029 80520028 8e020028 0040f809 02202021 0040a821
8e020028 0040f809 02402021 0040b821 8e020024 02202021 0040f809 24050005
0040b021 8e020024 02202021 0040f809 24050006 8e020024 02402021 0040f809
24050006 00408821 8e020024 02402021 0040f809 24050005 24030001 02a3a804
aed50000 02e3b804 ac570000 2404002a 3c03bf80 ac645820 3c04bf80 8c835810
30630080 1060fffd 3c03bf80 8c645820 ae370000 00132203 ac645820 3c04bf80
8c835810 30630080 1060fffd 3c03bf80 8c645820 ae370000 ac735820 3c04bf80
8c835810 30630080 1060fffd 3c03bf80 8c645820 ae370000 2673ffff 027ef021
001e2203 ac645820 3c04bf80 8c835810 30630080 1060fffd 3c03bf80 8c645820
ae370000 ac7e5820 3c04bf80 8c835810 30630080 1060fffd 3c03bf80 8c645820
ac570000 2404002b ac645820 3c04bf80 8c835810 30630080 1060fffd 3c03bf80
8c645820 ae370000 00142203 ac645820 3c04bf80 8c835810 30630080 1060fffd
3c03bf80 8c645820 ae370000 ac745820 3c04bf80 8c835810 30630080 1060fffd
3c03bf80 8c645820 ae370000 2694ffff 8fa40010 0284a021 00142203 ac645820
3c04bf80 8c835810 30630080 1060fffd 3c03bf80 8c645820 ae370000 ac745820
3c04bf80 8c835810 30630080 1060fffd 3c03bf80 8c645820 ac570000 2402002c
ac625820 8c625810 30420080 1040fffd 3c02bf80 8c425820 ae370000 3c029d00
8c420090 80420028 00021fc3 8fbf003c 8fbe0038 8fb70034 8fb60030 8fb5002c
8fb40028 8fb30024 8fb20020 8fb1001c 8fb00018 03e00008 27bd0040
End CFunction 'MIPS32 M4K
'
'DisplayBuffer 2015-08-18 17:12:47 UTC Author:Peter with CFuncGen Ver 2.1.1.0
'
CFunction DisplayBuffer
00000000
90820000 18400020 00021fc3 24060001 3c03bf80 90870001 00073a00 30e7f800
90850002 000528c0 30a5ffe0 00e53825 90850003 000528c2 00e53825 00072a03
ac655820 8c655810 30a50080 10a0fffd 00000000 8c655820 ac675820 8c655810
30a50080 10a0fffd 00000000 8c655820 24c60003 0046282a 10a0ffe6 24840003
03e00008 00021fc3 03e00008 00000000
End CFunction 'MIPS32 M4K
'
'CompleteDisplay 2015-08-18 17:12:47 UTC Author:Peter with CFuncGen Ver 2.1.1.0
'
CFunction CompleteDisplay
00000000
27bdffe0 afbf001c afb20018 afb10014 afb00010 3c109d00 8e020090 80510029
8e020028 0040f809 02202021 00409021 8e020024 02202021 0040f809 24050006
24030001 02439004 ac520000 8fbf001c 8fb20018 8fb10014 8fb00010 03e00008
27bd0020
End CFunction 'MIPS32 M4K
Edited by matherp 2015-08-19
 
BobD

Guru

Joined: 07/12/2011
Location: Australia
Posts: 935
Posted: 09:49am 18 Aug 2015
Copy link to clipboard 
Print this post

Peter, your plane in the image?

IrfanView is one free program that will display and save PPM format. Its default is to save as binary but it can save as ASCII. It has an options panel for the save dialog. It's a very useful image display and manipulation program which will handle many formats.

One problem which many free programs have, is it comes with some crapware. It is easily avoided when installing. Select "Other download sites" to get it and you will find a site that you know. Get the plugins also.
 
matherp
Guru

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

  Quote  Peter, your plane in the image?


Yes. TB10 to keep me going while I build (slowly!!!!!)

I use a very old copy (2000 vintage) of PaintShopPro which does everything I need, but I know IrfanView gets good press.
 
paceman
Guru

Joined: 07/10/2011
Location: Australia
Posts: 1329
Posted: 04:39pm 18 Aug 2015
Copy link to clipboard 
Print this post

I used Format Factory and it worked fine - no ads on the version I've got and it has a 320x240 file out. The input files were 24bit .jpg's. I didn't change the 24bit at all and "bmp2bin" worked fine.

Greg
 
matherp
Guru

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

One last version:




Sorry about the poor picture of a picture.

This uses the new 44-pin uM2 8-bit databus, 24-bit colour loadable SSD1963 driver.

This driver has been specially written to be compatible with Peter Carnegie's SD card routines for the uM2. Other loadable drivers are not currently compatible with the SD card routines.

The code supports 4.3", 5", and 7" SSD1963 displays - seen here at 800x480 resolution on a 5" display.

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.

There is a 480 x 272 sample picture attached (all pictures must be in binary .PPM format). Unfortunately the 800 x 480 image shown is bigger than the BB will allow. It takes about 9.5 seconds to update the screen with a 800x480x24-bit colour image.

2015-08-19_112330_P1.zip

The code is very simple so I look forward to someone posting a fully worked digital picture frame


OPTION EXPLICIT
OPTION DEFAULT NONE
CPU 48
CONST Size!=5.0 ' Set display size
CONST SD_CS%=10 ' Chip select pin for the SD card
const LCD_RS=19 ' Reset Pin for SSD1963

'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
dim Retrn%=Display.Open(19,Orientation%,Size!)
'
'PIC32MX170 44 Pin wiring
' Chip Select can be any digital output pin, define in Constant SD_CS%
' SPI2
'MOSI Pin 11
'MISO Pin 23
'SCLK PIN 15
'
'
DIM AddrOfRam%=0 'Holds the address returned by Driver.Init
'
' Main program
'
DisplayPicture("P1.ppm") ' draw a picture starting at x=0, y=0
END
'
'***************************************************************************************************
'
' Display a picture from the SD card
' Code should work on any of the MM2 supported displays ILI9341, ST7735, ILI9163
' Picture must be in binary PPM format
'
' Parameters are:
' PIC$ = filename of the picture to be displayed
' StartX% = X coordinate of the top left of the picture
' StartY% = Y coordinate of the top left of the picture
'
' Note: the routine checks that the picture is not too big for the screen and reports an error if it is
'
Sub DisplayPicture(PIC$, StartX%, StartY%)
LOCAL Buffer$,addbuffer$ length 3
LOCAL Result%=-1
LOCAL NumBytes%,a%
Result%=File.Driver.Open(SD_CS%,AddrOfRam%)
PError "Failed to OPEN the Driver. Please Power Cycle system",Result%,1
Result%=File.Open(PIC$,1)
PError "Failed to Open file "+PIC$,Result%,1
'Read the first 128 bytes
Buffer$=STRING$(128," ")
Result%=File.Read(Buffer$,NumBytes%)
PError "Failed to Read file",Result%,0
a%=instr(buffer$,chr$(10)) ' look for the first CR
if left$(buffer$,a%-1)="P6" then
buffer$=right$(buffer$,len(buffer$)-a%)
a%=instr(buffer$,chr$(10)) ' look for the second CR
buffer$=right$(buffer$,len(buffer$)-a%)
a%=instr(buffer$,chr$(32)) ' look for the space between dimensions
local width%=val(left$(buffer$,a%-1))
buffer$=right$(buffer$,len(buffer$)-a%)
a%=instr(buffer$,chr$(10)) ' look for the third CR
LOCAL height%=val(left$(buffer$,a%-1))
buffer$=right$(buffer$,len(buffer$)-a%)
a%=instr(buffer$,chr$(10)) ' look for the fourth CR
buffer$=right$(buffer$,len(buffer$)-a%)
a%=len(buffer$) mod 3
addBuffer$=STRING$(3-a%," ") ' we need to make sure we have a number of bytes divisible by three in the buffer
Result%=File.Read(addBuffer$,NumBytes%)
buffer$=buffer$+addbuffer$
if (StartX%+width%>MM.HRES) OR (StartY%+height%>MM.VRES) then
print "Picture too big", width%," x",height%
else
Result%= DefineRegion(StartX%, StartY%, width%, height%)
Result%=Displayregion(Buffer$)
Buffer$=STRING$(240,chr$(0))
do
Result%=Driver.SDCard(4,Buffer$,NumBytes%)
if numbytes%<>0 then Result%=DisplayRegion(Buffer$)
loop while NumBytes%<>0
endif
else
Print "Invalid File Format"
endif

Result%=File.Close()
PError "Failed to Close File",Result%,0
Result%=File.Driver.Close()
PError "Failed to Close Driver",Result%,0
IF Result%<>0 THEN
PRINT "Please issue CPU Restart command at MMBasic command prompt"
ENDIF
END sub
'
'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
'
FUNCTION Display.Open(RST%,Orient%,Size!) as integer

LOCAL Pindefs%(1)
LOCAL DisplayMetrics%(2)
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
'*************************************************
'
' Print Error Message if Code% is NON-Zero
' END if Hard% is NON-Zero
'
'
SUB PError(Msg$,Code%,Hard%)
IF Code%=0 THEN EXIT SUB
PRINT "Error : ";Msg$;". Error Code:";Code% AND &Hff
IF Hard%<>0 THEN END
END SUB

SUB DoTrace(Msg$, Result%, Numbytes%)
END SUB


'***********************************************
'
' CUNCTION FAT Filesystem Driver
'
' (c) Copyright Peter Carnegie 2015
'
' File.Driver.Open Open the Driver, Init S/W, Init H/W, Mount disk
' File.Driver.Close Close the Driver and release all resources
' File.Open Open File specifying Writing Mode
' File.Close Close File
' File.Read Read from File
'
' The CFunction can of course be called directly from user code
' These MMBasic wrapper functions just make things neater and tidier !
'
'
'***********************************************

'***********************************************
' Driver Open
'
' Initialises the Driver software framework
' Initialises the driver h/w interface and sets up
' the FAT32 filesystem
' Mounts the disk into the filesystem
'
' File>Driver.Open may be called instead of calling the
' individual driver calls if the disk is already
' inserted into the SDCard holder
'
'
FUNCTION File.Driver.Open(CSPin%,Addr%) AS INTEGER

'Get address of the CFunction Driver itself
LOCAL AddrOfSDCard%=PEEK(CFUNADDR Driver.SDCard)

LOCAL Result%=Driver.SDCard(11,AddrOfSDCard%,CSPin%,Addr%)
File.Driver.Open=Result%

DoTrace("Driver Open",Result%)

END FUNCTION


'***********************************************
'
' Open File
'
' Path$ Name of file to be Opened
' Mode% If set to 1, then automatically flush to disk
' every File.Write
'
' Returns 0 if succesful else non-zero
'
'
FUNCTION File.Open(Path$, Mode%) AS INTEGER

LOCAL Result%=Driver.SDCard(3,Path$,Mode%)
File.Open=Result%

DoTrace("Open File",Result%)

END FUNCTION


'***********************************************
'
' Read File - Sequential
'
' Returns 0 if succesful else non-zero
' On Entry
'
' On Exit
' Buffer$ will contain the bytes read in from disk
' NumBytes% will contain the number of bytes actually read
' If NumBytes%=0 then End Of File has been reached
'
' Use File.Seek to position the write pointer
'
FUNCTION File.Read(Buffer$, NumBytes%) AS INTEGER

LOCAL Result%=Driver.SDCard(4,Buffer$,NumBytes%)
File.Read=Result%

DoTrace("Read File",Result%)

END FUNCTION

'***********************************************
'
' Close File
'
' Returns 0 if succesful else non-zero
' Flushes any unwritten bytes to the physical disk
'
'
FUNCTION File.Close() AS INTEGER

LOCAL Result%=Driver.SDCard(6)
File.Close=Result%

DoTrace("Close File",Result%)

END FUNCTION


'***********************************************
'
' Drive Close
'
' Returns 0 if succesful else non-zero
' Unconfigures SPI
' Unconfigures CS pin
' FREEs up persistent RAM
'
'
FUNCTION File.Driver.Close() AS INTEGER

LOCAL Result%=0
Result%=Driver.SDCard(7)
File.Driver.Close=Result%

DoTrace("Close Driver",Result%)

END FUNCTION

'******************************************************************************
'Created : 2015-08-13 16:31:50 UTC
'Author : Peter Carnegie
'Generator : CFuncGen Ver 2.1.5.0
'
CFUNCTION Driver.SDCard
0000069B
10c00006 00801021 00862021 a0450000 24420001 5444fffe a0450000 03e00008
00000000
2407ffff 24c6ffff 10c70008 00001021 80830000 80a20000 00621023 14400003
24840001 1000fff7 24a50001 03e00008 00000000
27bdffe0 afbf001c 3c029d00 8c42008c 8c420000 2c830002 1460001e 8c420060
8c430014 0083182b 1060001c 24030003 8c450000 14a3001e 000429c2 8c420018
3086007f 27a40010 00a22821 00063080 24070004 04110565 00000000 14400010
24030001 93a30013 00031e00 93a20012 00021400 00621825 93a20010 00621825
93a20011 00021200 00621825 10000004 7c63d800 10000002 24030001 24030001
00601021 8fbf001c 03e00008 27bd0020 1000ffff 00000000
3c029d00 8c42008c 8c420000 8c430060 2484fffe 8c650014 24a5fffe 0085282b
10a00005 00001021 8c650008 8c620020 70851802 00621021 03e00008 00000000
90830015 00031a00 90820014 00621825 00031c00 9082001b 00021200 9084001a
00441025 03e00008 00621025
27bdffe8 afbf0014 afb00010 00808021 3c029d00 8c42008c 8c420000 8c430060
ac800000 8c840008 24050001 1085000c 24020001 8c650014 0085282b 10a00009
8fbf0014 50800001 8c64001c ae04000c 0411FFD0 00000000 ae020010 00001021
8fbf0014 8fb00010 03e00008 27bd0018
27bdffe0 afbf001c afb20018 afb10014 afb00010 00808021 3c029d00 8c42008c
8c420000 8c520060 8c910000 26310001 3231ffff 12200027 24020003 8c830010
50600025 8fbf001c 3222000f 54400020 ae110000 24630001 ac830010 8c84000c
14800007 00111902 8e430010 0223182b 14600016 24020003 10000017 8fbf001c
8e420008 2442ffff 00621024 54400010 ae110000 0411FF75 00000000 00402021
2c430002 1460000b 24020001 8e430014 0083182b 10600007 24020003 ae04000c
0411FF98 00000000 ae020010 ae110000 00001021 8fbf001c 8fb20018 8fb10014
8fb00010 03e00008 27bd0020
27bdffe0 afbf001c afb20018 afb10014 afb00010 00808821 00a09021 0411FFA1
00000000 14400020 00408021 8e260000 30c6000f 02402021 8e250010 00063140
24070020 041104C9 00000000 0002802b 16000016 02001021 92420000 50400012
24100003 9242000b 30420008 14400008 02202021 02402021 8e250004 2406000b
0411FF32 00000000 10400007 02202021 0411FFA0 00000000 1040ffe4 00408021
10000002 02001021 02001021 8fbf001c 8fb20018 8fb10014 8fb00010 03e00008
27bd0020
27bdffe0 afbf001c afb20018 afb10014 afb00010 00a08021 3c029d00 8c42008c
8c520000 8c910004 02202021 24050020 2406000b 0411FF0B 00000000 8e090000
00002021 00001821 24080008 240a002f 2407002e 240b0008 01231021 80450000
30a200ff 24630001 2c460021 14c0001e 306300ff 504a001d 01231821 10470003
0088302b 14c00008 00000000 550b0017 01231821 54470015 01231821 01602021
1000ffed 2408000b 04a10005 2445ff9f 8e450048 00a21021 9042ff80 2445ff9f
30a500ff 2ca5001a 10a00003 02242821 2442ffe0 304200ff a0a20000 24840001
1000ffdd 308400ff 01231821 ae030000 2c420021 a222000b 00001021 8fbf001c
8fb20018 8fb10014 8fb00010 03e00008 27bd0020
27bdffe0 afbf001c afb10018 afb00014 00808021 afa60028 80c20000 24030020
14430006 00a08821 24c60001 afa60028 80c20000 5043fffd 24c60001 2403002f
54430004 ae000008 24c60001 afa60028 ae000008 8fa20028 90420000 2c420020
10400006 02002021 0411FF18 00000000 10000019 a2200000 02002021 27a50028
0411FF9A 00000000 14400013 02002021 02202821 0411FF64 00000000 1440000f
8fbf001c 8e030004 9063000b 5460000c 8fb10018 9222000b 30420010 10400005
02202021 0411FEF6 00000000 1000ffea ae020008 24020003 8fbf001c 8fb10018
8fb00014 03e00008 27bd0020
27bdffe0 afbf001c afb10018 afb00014 00808021 00a08821 240601fe 24070002
04110421 00000000 14400018 24030003 92040001 00042200 92020000 00822025
7c042620 2402aa55 14820010 24030002 02002021 02202821 24060052 24070002
04110411 00000000 14400008 24030001 92030001 00031a00 92020000 00621825
7c031e20 38634146 0003182b 00601021 8fbf001c 8fb10018 8fb00014 03e00008
27bd0020
27bdffb8 afbf0044 afb20040 afb1003c afb00038 00808821 3c029d00 8c42008c
8c500000 ae000060 8e04003c 04110364 00000000 30420001 1440006a 24030002
27a40010 00002821 0411FFC4 00000000 24030001 1443001a 00009021 27a40010
00002821 240601be 24070010 041103E5 00000000 1440005b 24030001 93a20014
10400058 24030006 93b2001b 00129600 93a2001a 00021400 02429025 93a20018
02429025 93a20019 00021200 02429025 27a40010 02402821 0411FFA8 00000000
24040003 10440047 24030001 14400045 24030006 27a40010 02402821 2406000d
24070024 041103C7 00000000 1440003d 24030001 93a2001a 00021200 93a30019
00431025 1440000c 93a30013 93a3002a 00031e00 93a20029 00021400 00621025
93a30027 00431025 93a30028 00031a00 00431025 93a30013 70431002 93a60012
00063200 93a30011 00c33025 02469021 ae320018 93a50010 ae250008 93a30015
00031a00 93a40014 00641825 ae230010 93a40017 00042200 93a70016 00872025
1480000b 00031902 93a70026 00073e00 93a40025 00042400 00e42025 93a70023
00872025 93a70024 00073a00 00872025 00862023 00822023 00832023 0085001b
00a001f4 00002812 24a50002 ae250014 3404fff7 00a4282b 10a00009 24040003
24030006 00601021 8fbf0044 8fb20040 8fb1003c 8fb00038 03e00008 27bd0048
ae240000 93a50032 00052e00 93a40031 00042400 00a42025 93a5002f 00852025
93a50030 00052a00 00852025 ae24001c 02439021 02421021 ae220020 ae200004
ae110060 1000ffe7 00001821
27bdffa0 afbf005c afb10058 afb00054 00803021 3c029d00 8c42008c 8c420000
8c510060 12200024 24100005 ae200004 27a20024 afa20014 27a40010 27a50030
0411FEF8 00000000 1440001b 00408021 93a20030 10400017 93a2003b 30420010
54400015 24100003 27a40030 0411FE15 00000000 ae22002c 93a3004f 00031e00
93a2004e 00021400 00621025 93a3004c 00431025 93a3004d 00031a00 00431025
ae220028 ae200024 24020001 10000002 ae220004 24100003 02001021 8fbf005c
8fb10058 8fb00054 03e00008 27bd0060
27bdffd0 afbf002c afb60028 afb50024 afb40020 afb3001c afb20018 afb10014
afb00010 0080a821 00c09821 3c029d00 8c42008c 8c420000 8c500060 acc00000
12000049 24020005 8e030004 30630001 10600045 24020004 8e120028 8e020024
02429023 0245102b 00a2900a 1240003e 00001021 0080a021 24160200 8e020024
304301ff 5460001e 8e060024 8e110008 2631ffff 00021a42 02238824 323100ff
5620000e 8e040030 54400003 8e040030 10000003 8e02002c 0411FD90 00000000
2c430002 50600004 ae020030 ae000004 10000025 24020001 8e040030 0411FDB5
00000000 14400004 00518821 ae000004 1000001d 24020001 ae110034 8e060024
30c601ff 02c61023 0052882b 0251100a 00408821 00002021 0295200b 8e050034
00403821 041102F0 00000000 50400004 8e020024 ae000004 1000000b 24020001
00511021 ae020024 02519023 8e620000 00511021 12400003 ae620000 1000ffc7
0291a021 00001021 8fbf002c 8fb60028 8fb50024 8fb40020 8fb3001c 8fb20018
8fb10014 8fb00010 03e00008 27bd0030
27bdffd0 afbf002c afb60028 afb50024 afb40020 afb3001c afb20018 afb10014
afb00010 00a09021 00c09821 0080a021 3c029d00 8c42008c 8c420000 8c500060
acc00000 12000077 24020005 8e030004 30640001 10800073 24020004 14a00011
30630040 5060000a 8e030004 00002021 00002821 04110306 00000000 50400004
8e030004 ae000004 10000066 24020001 2402ffbf 00621024 ae020004 10000061
00001021 54600006 8e030028 8e030024 2402fe00 00621024 ae020024 8e030028
8e020024 00621023 0052182b 10600004 24150200 10400053 00409021 24150200
2416ffbf 8e020024 304301ff 54600028 8e110024 8e110008 2631ffff 00021a42
02238824 323100ff 5620000e 8e040030 54400003 8e040030 10000003 8e02002c
0411FD12 00000000 2c430002 50600004 ae020030 ae000004 1000003a 24020001
8e040030 0411FD37 00000000 14400004 00512821 ae000004 10000032 24020001
ae050034 00002021 041102C9 00000000 50400004 8e020004 ae000004 10000029
24020001 34420040 ae020004 8e110024 323101ff 02b18823 0232102b 0242880a
02802021 02202821 041102B9 00000000 50400004 8e020024 ae000004 10000019
24020001 00511021 ae020024 8e620000 00511021 ae620000 8e020024 304201ff
5440000d 02519023 00002021 00002821 041102A7 00000000 50400004 8e020004
ae000004 10000007 24020001 00561024 ae020004 02519023 1640ffb2 0291a021
00001021 8fbf002c 8fb60028 8fb50024 8fb40020 8fb3001c 8fb20018 8fb10014
8fb00010 03e00008 27bd0030
27bdffe0 afbf001c afb00018 3c029d00 8c42008c 8c500000 00002021 00002821
27a60010 0411FF63 00000000 ae000060 8fbf001c 8fb00018 03e00008 27bd0020
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 3c029d00 8c42008c
8c420000 8c500060 1200004d 24020005 8e030004 30630001 10600049 24020004
8e020028 0044902b 0092100a 00409021 8e030024 ae000024 12400041 00001021
8e110008 10600012 00118a40 2463ffff 2642ffff 0051001b 022001f4 00001012
0071001b 022001f4 00002012 0044102b 54400008 8e04002c 00111023 00431824
ae030024 02439023 10000003 8e040030 8e04002c ae040030 0232102b 10400017
00119823 02519023 0411FC85 00000000 00402021 2c420002 54400006 ae000004
8e020014 0082102b 54400004 ae040030 ae000004 1000001a 24020001 8e020024
00511021 ae020024 02531021 00511821 0223182b 5460ffec 00409021 8e020024
00529021 ae120024 0411FC9B 00000000 54400004 8e040008 ae000004 10000008
24020001 2484ffff 8e030024 00031a42 00831824 00431021 ae020034 00001021
8fbf0024 8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0028
00052840 0085001b 00a001f4 00001012 03e00008 2442ffff
27bdffe8 afbf0014 afb00010 3c029d00 8c43008c 8c700000 8c420010 3c03bf81
8c65f220 7ca5d800 3c030661 24630053 10a3000b 24040018 3c03bf81 8c64f220
7c84d800 3c030660 24630053 00832026 24030018 2405000b 00a4180b 00602021
24050008 0040f809 00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800
3c030661 24630053 10a3000b 24040006 3c03bf81 8c64f220 7c84d800 3c030660
24630053 00832026 24030006 24050017 00a4180b 00602021 24050002 0040f809
00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800 3c030661 24630053
10a3000b 2404001a 3c03bf81 8c64f220 7c84d800 3c030660 24630053 00832026
2403001a 2405000f 00a4180b 00602021 24050008 0040f809 00003021 3c02bf81
ac40f230 3c05aa99 24a56655 ac45f230 3c045566 348499aa ac44f230 3c03bf81
8c66f200 7c066b44 ac66f200 3c06bf81 8cc7fa90 24080004 7d071804 acc7fa90
3c06bf81 8cc7fb60 7d071804 acc7fb60 ac40f230 ac45f230 ac44f230 8c62f200
24040001 7c826b44 ac62f200 34038120 3c02bf80 ac435a00 3c029d00 8c420000
8c440000 3c050003 34a5d090 0411FF8E 00000000 3c03bf80 ac625a30 24020002
ae02003c 8fbf0014 8fb00010 03e00008 27bd0018
27bdffe8 afbf0014 afb00010 3c029d00 8c43008c 8c700000 8c420010 3c03bf81
8c65f220 7ca5d800 3c030661 24630053 10a3000b 24040018 3c03bf81 8c64f220
7c84d800 3c030660 24630053 00832026 24030018 2405000b 00a4180b 00602021
00002821 0040f809 00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800
3c030661 24630053 10a3000b 24040006 3c03bf81 8c64f220 7c84d800 3c030660
24630053 00832026 24030006 24050017 00a4180b 00602021 00002821 0040f809
00003021 3c029d00 8c420010 3c03bf81 8c65f220 7ca5d800 3c030661 24630053
10a3000b 2404001a 3c03bf81 8c64f220 7c84d800 3c030660 24630053 00832026
2403001a 2405000f 00a4180b 00602021 00002821 0040f809 00003021 3c02bf81
ac40f230 3c05aa99 24a56655 ac45f230 3c045566 348499aa ac44f230 3c03bf81
8c66f200 7c066b44 ac66f200 3c06bf81 8cc7fb60 7c071804 acc7fb60 ac40f230
ac45f230 ac44f230 8c62f200 24040001 7c826b44 ac62f200 ae00003c 8fbf0014
8fb00010 03e00008 27bd0018
27bdffe8 afbf0014 3c029d00 8c420004 0040f809 24040064 8fbf0014 03e00008
27bd0018
308400ff 3c02bf80 ac445a20 3c03bf80 8c625a10 30420001 1040fffd 3c02bf80
8c425a20 03e00008 00000000
240300ff 3c02bf80 ac435a20 3c03bf80 8c625a10 30420001 1040fffd 3c02bf80
8c425a20 03e00008 304200ff
27bdffe0 afbf001c afb20018 afb10014 afb00010 309100ff 3c029d00 8c42008c
8c500000 7c111420 04410009 00a09021 24040077 00002821 0411FFF1 00000000
2c430002 1060002f 8fbf001c 3231007f 8e020058 8e030054 ac430000 0411FFDD
00000000 8e02005c 8e030054 ac430000 0411FFD8 00000000 02202021 0411FFCA
00000000 00122602 0411FFC7 00000000 7e443c00 0411FFC4 00000000 7e443a00
0411FFC1 00000000 324400ff 0411FFBE 00000000 24020040 12220006 24040095
3a310048 24020001 24030087 00402021 0071200a 0411FFB4 00000000 2410000a
0411FFBC 00000000 7c021c20 04610004 2610ffff 321000ff 1600fff9 00000000
8fbf001c 8fb20018 8fb10014 8fb00010 03e00008 27bd0020
27bdffd0 afbf002c afb40028 afb30024 afb20020 afb1001c afb00018 3c029d00
8c42008c 8c510000 0411FEB8 00000000 8e220058 8e230054 ac430000 2410000a
0411FF9E 00000000 2610ffff 321000ff 1600fffb 24040040 00002821 0411FFA2
00000000 24030001 1443005a 00009021 24040048 240501aa 0411FF9B 00000000
24030001 14430033 240400e9 27b40010 27b30014 02808021 0411FF88 00000000
a2020000 26100001 1613fffb 93a30012 24020001 14620047 00009021 93a30013
240200aa 54620044 a232004c 10000007 24102710 0411FF65 00000000 16000004
240400e9 10000039 00009021 240400e9 3c054000 0411FF7C 00000000 5440fff5
2610ffff 12000033 00009021 2404007a 00002821 0411FF74 00000000 5440002e
a232004c 0411FF65 00000000 a2820000 26940001 1674fffb 2402000c 93b20010
32520040 24030004 0072100a 10000021 00409021 00002821 0411FF63 00000000
2c420002 24030002 24120001 0062900b 240300e9 24130041 0062980b 10000005
24102710 0411FF39 00000000 52000011 00009021 02602021 00002821 0411FF52
00000000 5440fff7 2610ffff 52000009 00009021 24040050 24050200 0411FF4A
00000000 10000003 0002900b 10000002 a232004c a232004c 8e220058 8e230054
ac430000 0411FF35 00000000 3c029d00 8c420000 8c450000 00a02021 00052882
0411FE3C 00000000 3c03bf80 ac605a00 3c04bf80 ac825a30 34028120 ac625a00
2e420001 8fbf002c 8fb40028 8fb30024 8fb20020 8fb1001c 8fb00018 03e00008
27bd0030
27bdffd0 afbf002c afb50028 afb40024 afb30020 afb2001c afb10018 afb00014
00809021 00c09821 00e0a821 3c029d00 8c42008c 8c540000 9283004c 30630008
00051240 24040051 0043280a 0411FF15 00000000 14400029 24100001 34109c40
241100ff 0411FF04 00000000 14510005 2610ffff 1600fffb 00000000 1000001f
24100001 240300fe 1443001c 24100001 00138823 26310202 12600006 02358823
0411FEF5 00000000 2673ffff 1660fffc 00000000 12400009 02558021 0411FEEE
00000000 a2420000 26520001 1650fffb 00000000 10000004 00000000 26b5ffff
56a0ffff 26b5ffff 0411FEE3 00000000 2631ffff 1620fffc 00008021 8e820058
8e830054 ac430000 0411FEDB 00000000 02001021 8fbf002c 8fb50028 8fb40024
8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0030
27bdffd8 afbf0024 afb30020 afb2001c afb10018 afb00014 00808021 3c029d00
8c42008c 10800012 8c510000 10a0004a 00009821 8e220044 10400047 00859021
92040000 26100001 0411FEB2 00000000 8e220044 2442ffff 1212003e ae220044
5440fff8 92040000 1000003b 00009821 50a00014 8e300044 9223004c 30630008
00051240 24040058 0043280a 0411FEB7 00000000 14400030 24130001 240400ff
0411FE9C 00000000 240400fe 0411FE99 00000000 24020200 ae220044 10000026
00009821 26100002 12000008 2610ffff 2412ffff 00002021 0411FE8E 00000000
2610ffff 1612fffc 00002021 0411FE94 00000000 3042001f 24030005 1443000e
24130001 10000005 24101388 0411FE78 00000000 10000002 2610ffff 241200ff
0411FE87 00000000 10520003 2e130001 1600fff6 24130001 8e220058 8e230054
ac430000 0411FE7E 00000000 10000003 02601021 00009821 02601021 8fbf0024
8fb30020 8fb2001c 8fb10018 8fb00014 03e00008 27bd0028
27bdffe0 afbf001c afb10018 afb00014 00808821 3c109d00 8e02003c 0040f809
24040064 8e03008c ac620000 00002021 00001821 24050019 00042080 00442021
ac800000 24630001 1465fffb 00602021 3c039d00 8c63008c 8c630000 24040064
ac640040 3c049d00 24841a6c 3c059d00 24a51ea0 00a4302b 10c00004 00a42023
00918821 10000003 ac710048 00918821 ac710048 8fbf001c 8fb10018 8fb00014
03e00008 27bd0020
27bdffe0 afbf001c afb20018 afb10014 afb00010 3c109d00 8e02008c 8c510000
ae240050 8e020028 0040f809 00809021 24030001 00431004 ae220054 8e020024
02402021 0040f809 24050006 ae220058 8e020024 02402021 0040f809 24050005
ae22005c 8e020010 02402021 24050008 0040f809 00003021 8e220058 8e230054
ac430000 0411FE77 00000000 8fbf001c 8fb20018 8fb10014 8fb00010 03e00008
27bd0020
27bdffe8 afbf0014 3c029d00 8c42008c 8c440000 0411FAFA 00000000 304200ff
8fbf0014 03e00008 27bd0018
27bdffc8 afbf0034 afb50030 afb4002c afb30028 afb20024 afb10020 afb0001c
00a08021 00c09021 8c820000 8c830004 24040009 14440003 00e08821 106000b8
24140642 2404000b 1444001a 00432025 14600018 2414ffff 3c029d00 8c42008c
8c420000 144000b1 2415ffff 8e040000 0411FF85 00000000 ae220000 ae200004
8e440000 0411FFAA 00000000 10400004 00000000 0040a021 100000a4 0000a821
0411FFCC 00000000 0040a021 1000009f 0000a821 1480000f 3c049d00 3c029d00
8c42008c 8c420000 2414ffff 14400097 2415ffff 8e040000 0411FF6B 00000000
ae420000 ae400004 0000a021 1000008f 0000a821 8c84008c 8c910000 2414ffff
1220008a 2415ffff 24040001 14440008 24040002 14600006 0000a821 8e040000
0411FF83 00000000 10000080 0040a021 14440007 24040003 14600005 0000a821
0411FFA4 00000000 10000078 0040a021 14440016 24040004 14600014 00000000
82020000 26040001 00821021 a0400001 82030001 24020020 14620005 24030020
24840001 80820000 5043fffe 24840001 0411FB23 00000000 8e430000 ae230038
305400ff 10000061 0000a821 1444000e 24040005 1460000c 27a60010 26040001
92050000 0411FB4A 00000000 8fa30010 a2030000 ae430000 ae400004 305400ff
10000052 0000a821 1444001d 24040006 1460001b 26130001 02602021 92050000
27a60010 0411FB9E 00000000 304200ff 10400004 8fa30010 0040a021 10000043
0000a821 ae430000 ae400004 8e230038 30630001 50600008 0040a021 02602021
00002821 27a60010 0411FB8D 00000000 304200ff 0040a021 10000034 0000a821
14440007 24040007 14600005 0000a821 0411FC16 00000000 1000002c 305400ff
54440014 24040008 54600012 24040008 0411FCF8 00000000 3c109d00 8e020010
8e240050 00002821 0040f809 00003021 8e03008c 8e020044 0040f809 8c640000
8e02008c ac400000 0000a021 10000017 0000a821 14440008 2404000a 14600006
0000a821 8e040000 0411FC08 00000000 1000000e 305400ff 1444000b 2414ffff
5460000a 2415ffff 8e220028 ae020000 ae000004 0000a021 10000004 0000a821
10000002 0000a821 2415ffff 02801021 02a01821 8fbf0034 8fb50030 8fb4002c
8fb30028 8fb20024 8fb10020 8fb0001c 03e00008 27bd0038
41909a80 808f418e 49454545 8f8e4949 4f929290 55554f99 9b9a9959 9f9e9d9c
554f4941 a7a6a5a5 abaaa9a8 afae21ac b3b2b1b0 b7b6b5b4 bbbab9b8 bfbebdbc
c3c2c1c0 c7c6c5c4 cbcac9c8 cfcecdcc d3d2d1d0 d7d6d5d4 dbdad9d8 dfdedddc
e3e2e1e0 e7e6e5e4 ebeae9e8 efeeedec f3f2f1f0 f7f6f5f4 fbfaf9f8 fffefdfc
END CFUNCTION 'MIPS32 M4K
'
'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
'
'defineregion 2015-08-20 07:04:47 UTC Author:Peter with CFuncGen Ver 2.1.1.0
'
CFunction defineregion
00000000
8c820000 2443ffff 8cc40000 00641821 8ca40000 2485ffff 8ce80000 00a82821
3c079d00 8ce60094 8cc60000 8ce70098 8ce70000 00e6402b 11000003 00e05821
00c05821 00e03021 3c079d00 8cec0090 81870015 24080001 14e8000c 24080002
00404021 00805021 81840029 28840007 14800022 00a04821 00034027 00021827
006b1821 1000001d 010b4021 54e80008 24080003 00804021 00031827 00665021
00021027 00464821 10000014 00a01821 14e8000d 00052827 00404021 00042027
00864821 81840029 28840007 1080000b 00a65021 00034027 00021827 006b1821
10000006 010b4021 00ab4021 00042027 00405021 00604821 008b1821 3c06bf88
2402022a acc26230 24070200 acc76234 acc76238 00081202 34420300 acc26230
acc76234 acc76238 35080300 acc86230 acc76234 acc76238 00031202 34420300
acc26230 acc76234 acc76238 34630300 acc36230 acc76234 acc76238 2402022b
acc26230 acc76234 acc76238 000a1202 34420300 acc26230 acc76234 acc76238
354a0300 acca6230 acc76234 acc76238 00091202 34420300 acc26230 acc76234
acc76238 35290300 acc96230 acc76234 acc76238 2402022c acc26230 acc76234
acc76238 3c029d00 8c420090 80420015 03e00008 00021fc3
End CFunction 'MIPS32 M4K
'
'DisplayRegion 2015-08-20 07:04:47 UTC Author:Peter with CFuncGen Ver 2.1.1.0
'
CFunction DisplayRegion
00000000
90820000 18400019 00021fc3 24060001 3c03bf88 24050200 90870001 34e70300
ac676230 ac656234 ac656238 90870002 34e70300 ac676230 ac656234 ac656238
90870003 34e70300 ac676230 ac656234 ac656238 24c60003 0046382a 10e0ffee
24840003 03e00008 00021fc3 03e00008 00000000
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