Sat Aug 15, 2015 4:27 pm
Sat Aug 15, 2015 4:54 pm
Sat Aug 15, 2015 7:25 pm
Sun Aug 16, 2015 7:31 am
DF01:259: error: 'myTitleScreen' was not declared in this scope
DF01.ino: In function 'void loop()':
DF01:267: error: 'readBook' was not declared in this scope
DF01.ino:275: warning: only initialized variables can be placed into program memory area
DF01:280: error: 'printBook' was not declared in this scope
DF01:284: error: 'nextCaretOnScreen' was not declared in this scope
DF01:289: error: 'readBook' was not declared in this scope
DF01:294: error: 'prevCaretOnScreen' was not declared in this scope
DF01:297: error: 'seekBook' was not declared in this scope
DF01:302: error: 'nextCaretOnScreen' was not declared in this scope
DF01:308: error: 'readBook' was not declared in this scope
DF01:312: error: 'prevCaretOnScreen' was not declared in this scope
DF01:316: error: 'seekBook' was not declared in this scope
DF01:325: error: 'readBook' was not declared in this scope
DF01:327: error: 'testYourLuck' was not declared in this scope
DF01:330: error: 'showMenu' was not declared in this scope
Sun Aug 16, 2015 8:08 am
000006c4 1732 _Z18showAdventureSheetv
0000069e 1694 _Z18showEquipmentSheetv
000005be 1470 _ZN9Gamebuino8keyboardEPch
0000050c 1292 _Z13myTitleScreenPK19__FlashStringHelperS1_PKh
000003b4 948 _Z8showMenuv
00000376 886 _Z11numKeyboardh
00000326 806 _ZN7Display10drawBitmapEaaPKh
000002c4 708 _ZN9Gamebuino4menuEPKPKch
00000294 660 loop
00000282 642 font5x7
00000228 552 _Z12testYourLuckv
00000200 512 _displayBuffer
000001e4 484 _ZN5Sound10updateNoteEh
000001b0 432 _ZN7Display8drawCharEaahh
00000198 408 _ZN7Display5beginEaaaaa
00000182 386 font3x5
00000182 386 font3x3
00000174 372 _ZN9Gamebuino14displayBatteryEv
00000172 370 _ZN9Gamebuino6updateEv
0000015e 350 _ZN7Display16drawCircleHelperEaaah
00000150 336 _Z8seekBooki
00000130 304 _ZN9Gamebuino12readSettingsEv
0000010e 270 malloc
0000010c 268 _ZN5Sound13updatePatternEh
000000ff 255 eqp
000000fc 252 txt
000000fc 252 _Z9showAboutv
000000f2 242 setup
000000ec 236 _ZN7Display16fillCircleHelperEaaaha
000000ea 234 _ZN7Display9drawPixelEaa
000000e0 224 _ZN5Sound7commandEhhah
000000d0 208 _ZN9Backlight6updateEv
000000d0 208 _ZN9Gamebuino11updatePopupEv
000000ce 206 _ZN9Gamebuino5beginEv
000000c8 200 _ZN5Print11printNumberEmh
000000c8 200 _Z9printBookv
000000c4 196 _Z15removeEquipmenthh
000000c2 194 __mulsf3x
000000c0 192 analogWrite
000000c0 192 __addsf3x
000000bc 188 _ZN7Display13drawRoundRectEaaaaa
000000b2 178 delay
000000a8 168 digitalWrite
000000a6 166 digitalRead
00000096 150 _ZN9Gamebuino14pickRandomSeedEv
00000092 146 _Z3maplllll
00000090 144 __vector_16
0000008a 138 _ZN9Gamebuino10changeGameEv
00000087 135 gb
00000086 134 _ZN7Display6updateEv
00000080 128 _ZN7Battery6updateEv
00000080 128 _ZN5Print5printEli
0000007e 126 pinMode
0000007a 122 _ZN7Display5writeEh
0000007a 122 __floatunsisf
00000076 118 _ZN7Display13fillRoundRectEaaaaa
00000076 118 init
00000074 116 _ZN5Sound5beginEv
0000006a 106 _ZN7Display8fillRectEaaaa
0000006a 106 _ZN5Sound14generateOutputEv
0000005e 94 _ZN5Sound11updateTrackEh
00000058 88 __fixunssfsi
00000054 84 _ZN5Print5writeEPKhj
00000050 80 _ZN7Buttons6updateEv
0000004e 78 _Z10revertStathhh
0000004c 76 micros
0000004a 74 _Z8readBookv
00000048 72 __vector_11
00000046 70 _ZN5Print5printEPK19__FlashStringHelper
00000044 68 __fp_split3
00000044 68 analogRead
00000044 68 _Z6randoml
00000040 64 _ZN5Print7printlnEv
00000040 64 _ZN7Display7commandEh
00000040 64 _Z17nextCaretOnScreenv
0000003e 62 _ZN5Print7printlnEii
0000003c 60 _Z6randomll
0000003c 60 _ZN7Buttons6repeatEhh
0000003c 60 _ZN5Print7printlnEhi
00000038 56 _ZN7Display13drawFastVLineEaaa
00000038 56 _ZN5Print5writeEPKc
00000038 56 calloc
00000038 56 _ZN7Display13drawFastHLineEaaa
00000036 54 _ZN5Sound11playPatternEPKjh
00000036 54 _Z17prevCaretOnScreenv
0000002e 46 _ZN8SPIClass5beginEv
0000002a 42 _ZN9Gamebuino12setFrameRateEh
0000002a 42 _ZN7Display5clearEv
00000028 40 _ZN5Print7printlnEPK19__FlashStringHelper
00000026 38 _ZN5Print5printEii
00000026 38 _ZN7Display7setFontEPKh
00000024 36 _ZN5Sound11stopPatternEh
00000024 36 _ZN5Print5printEhi
00000022 34 __fp_round
00000022 34 _ZN8SPIClass15setClockDividerEh
00000022 34 _ZN5Print5printEji
00000022 34 _Z8initGamev
00000020 32 _ZN7Buttons5beginEv
0000001e 30 strncpy
0000001e 30 main
0000001e 30 _ZN5Print5printEmi
0000001c 28 millis
0000001a 26 _ZN5Sound9setVolumeEa
00000016 22 _ZN3PFFC1Ev
00000016 22 strcat
00000014 20 _ZN7Battery5beginEv
00000014 20 digital_pin_to_port_PGM
00000014 20 _ZN7Buttons7pressedEh
00000014 20 digital_pin_to_bit_mask_PGM
00000014 20 digital_pin_to_timer_PGM
00000012 18 _ZN8SPIClass11setBitOrderEh
00000012 18 srandom
00000010 16 _ZN9Gamebuino5popupEPK19__FlashStringHelperh
00000010 16 _Z10randomSeedj
00000010 16 _ZN5Print5printEc
0000000e 14 strcpy
0000000e 14 __fp_zero
0000000e 14 __fp_pscB
0000000e 14 memset
0000000e 14 __fp_pscA
0000000c 12 _ZN5Sound6playOKEv
0000000c 12 __fp_inf
0000000c 12 yd
0000000c 12 _ZN5Sound10playCancelEv
0000000c 12 _ZN5Sound8playTickEv
0000000a 10 port_to_mode_PGM
0000000a 10 random
0000000a 10 __fixsfsi
0000000a 10 __subsf3
0000000a 10 _ZN8SPIClass11setDataModeEh
0000000a 10 port_to_output_PGM
0000000a 10 port_to_input_PGM
0000000a 10 _ZN9Backlight3setEh
00000008 8 _ZTV7Display
00000008 8 _ZN5Sound13updatePatternEv
00000008 8 _ZN9Backlight5beginEv
00000008 8 _ZN5Sound11updateTrackEv
00000008 8 _ZN5Sound11stopPatternEv
00000008 8 _ZN5Sound10updateNoteEv
00000008 8 _ZN7Display8setColorEaa
00000008 8 _ZN7Display8setColorEa
00000006 6 random_r
00000006 6 __fp_nan
00000006 6 ES_menu1
00000006 6 _ZN5Print5printEPKc
00000004 4 timer0_overflow_count
00000004 4 AS_menu1
00000004 4 timer0_millis
00000004 4 ES_menu2
00000004 4 AS_menu2
00000004 4 __mulsf3
00000002 2 crline
00000002 2 ldverr
00000002 2 _ZN3PFF8dir_pathE
00000002 2 par
00000002 2 __brkval
00000002 2 poffset
00000002 2 __brkval_maximum
00000002 2 __flp
Sun Aug 16, 2015 10:37 am
jonnection wrote:Amazingly fast work Nicolas
I downloaded the code and wanted to examine it to see if I would be able to get any ideas how to reduce memory use (in Operation Fox I had to do absolutely everything to get it to the 30kb size)
But, at least on this crappy old computer I have with me right now with Arduino ide 1.0.4 I am unable to compile the code
Are you sure that you compiled this package on your computer ? Perhaps there is some new features in Arduino IDE that make it work but at leas IDE 1.0.4 gave these errors.
Anyhow, I got it to compile by chucking everything into 1 ino file. Looking at it right now.
Sun Aug 16, 2015 10:43 am
jonnection wrote:Here is where your memory is going.
[...]
Sun Aug 16, 2015 10:46 am
jonnection wrote:(In case someone wants to do this for their own projects:
- put on verbose compile from Arduino IDE
- go to the .tmp folder it shows where it generates the output files
- find the .cpp.elf file
- avr-objdump -t gamename.cpp.elf > gamename.map
- open gamename.map in your favourite editor)
Sun Aug 16, 2015 6:54 pm
jonnection wrote:Here is where your memory is going.
(In case someone wants to do this for their own projects:
- put on verbose compile from Arduino IDE
- go to the .tmp folder it shows where it generates the output files
- find the .cpp.elf file
- avr-objdump -t gamename.cpp.elf > gamename.map
- open gamename.map in your favourite editor)
... looks like adventuresheet and equipmentsheet are bit of memory hogs
I noticed there is a lot of if (val<10) print(F("0"));
Consider replacing with a single myPrint function that handles 00 numbers. A call to single function vs. repeating same code many times can save you a lot of memory.
Also chuck away gamebuino keyboard and consider using a "Caps only" font for the 5x7 font or not using a big font at all.
If your game in the end has no sound, you might chuck away the sound functions also.
Keep up the amazing work !
- Code:
000006c4 1732 _Z18showAdventureSheetv
0000069e 1694 _Z18showEquipmentSheetv
000005be 1470 _ZN9Gamebuino8keyboardEPch
0000050c 1292 _Z13myTitleScreenPK19__FlashStringHelperS1_PKh
000003b4 948 _Z8showMenuv
00000376 886 _Z11numKeyboardh
00000326 806 _ZN7Display10drawBitmapEaaPKh
000002c4 708 _ZN9Gamebuino4menuEPKPKch
00000294 660 loop
00000282 642 font5x7
00000228 552 _Z12testYourLuckv
00000200 512 _displayBuffer
000001e4 484 _ZN5Sound10updateNoteEh
000001b0 432 _ZN7Display8drawCharEaahh
00000198 408 _ZN7Display5beginEaaaaa
00000182 386 font3x5
00000182 386 font3x3
00000174 372 _ZN9Gamebuino14displayBatteryEv
00000172 370 _ZN9Gamebuino6updateEv
0000015e 350 _ZN7Display16drawCircleHelperEaaah
00000150 336 _Z8seekBooki
00000130 304 _ZN9Gamebuino12readSettingsEv
0000010e 270 malloc
0000010c 268 _ZN5Sound13updatePatternEh
000000ff 255 eqp
000000fc 252 txt
000000fc 252 _Z9showAboutv
000000f2 242 setup
000000ec 236 _ZN7Display16fillCircleHelperEaaaha
000000ea 234 _ZN7Display9drawPixelEaa
000000e0 224 _ZN5Sound7commandEhhah
000000d0 208 _ZN9Backlight6updateEv
000000d0 208 _ZN9Gamebuino11updatePopupEv
000000ce 206 _ZN9Gamebuino5beginEv
000000c8 200 _ZN5Print11printNumberEmh
000000c8 200 _Z9printBookv
000000c4 196 _Z15removeEquipmenthh
000000c2 194 __mulsf3x
000000c0 192 analogWrite
000000c0 192 __addsf3x
000000bc 188 _ZN7Display13drawRoundRectEaaaaa
000000b2 178 delay
000000a8 168 digitalWrite
000000a6 166 digitalRead
00000096 150 _ZN9Gamebuino14pickRandomSeedEv
00000092 146 _Z3maplllll
00000090 144 __vector_16
0000008a 138 _ZN9Gamebuino10changeGameEv
00000087 135 gb
00000086 134 _ZN7Display6updateEv
00000080 128 _ZN7Battery6updateEv
00000080 128 _ZN5Print5printEli
0000007e 126 pinMode
0000007a 122 _ZN7Display5writeEh
0000007a 122 __floatunsisf
00000076 118 _ZN7Display13fillRoundRectEaaaaa
00000076 118 init
00000074 116 _ZN5Sound5beginEv
0000006a 106 _ZN7Display8fillRectEaaaa
0000006a 106 _ZN5Sound14generateOutputEv
0000005e 94 _ZN5Sound11updateTrackEh
00000058 88 __fixunssfsi
00000054 84 _ZN5Print5writeEPKhj
00000050 80 _ZN7Buttons6updateEv
0000004e 78 _Z10revertStathhh
0000004c 76 micros
0000004a 74 _Z8readBookv
00000048 72 __vector_11
00000046 70 _ZN5Print5printEPK19__FlashStringHelper
00000044 68 __fp_split3
00000044 68 analogRead
00000044 68 _Z6randoml
00000040 64 _ZN5Print7printlnEv
00000040 64 _ZN7Display7commandEh
00000040 64 _Z17nextCaretOnScreenv
0000003e 62 _ZN5Print7printlnEii
0000003c 60 _Z6randomll
0000003c 60 _ZN7Buttons6repeatEhh
0000003c 60 _ZN5Print7printlnEhi
00000038 56 _ZN7Display13drawFastVLineEaaa
00000038 56 _ZN5Print5writeEPKc
00000038 56 calloc
00000038 56 _ZN7Display13drawFastHLineEaaa
00000036 54 _ZN5Sound11playPatternEPKjh
00000036 54 _Z17prevCaretOnScreenv
0000002e 46 _ZN8SPIClass5beginEv
0000002a 42 _ZN9Gamebuino12setFrameRateEh
0000002a 42 _ZN7Display5clearEv
00000028 40 _ZN5Print7printlnEPK19__FlashStringHelper
00000026 38 _ZN5Print5printEii
00000026 38 _ZN7Display7setFontEPKh
00000024 36 _ZN5Sound11stopPatternEh
00000024 36 _ZN5Print5printEhi
00000022 34 __fp_round
00000022 34 _ZN8SPIClass15setClockDividerEh
00000022 34 _ZN5Print5printEji
00000022 34 _Z8initGamev
00000020 32 _ZN7Buttons5beginEv
0000001e 30 strncpy
0000001e 30 main
0000001e 30 _ZN5Print5printEmi
0000001c 28 millis
0000001a 26 _ZN5Sound9setVolumeEa
00000016 22 _ZN3PFFC1Ev
00000016 22 strcat
00000014 20 _ZN7Battery5beginEv
00000014 20 digital_pin_to_port_PGM
00000014 20 _ZN7Buttons7pressedEh
00000014 20 digital_pin_to_bit_mask_PGM
00000014 20 digital_pin_to_timer_PGM
00000012 18 _ZN8SPIClass11setBitOrderEh
00000012 18 srandom
00000010 16 _ZN9Gamebuino5popupEPK19__FlashStringHelperh
00000010 16 _Z10randomSeedj
00000010 16 _ZN5Print5printEc
0000000e 14 strcpy
0000000e 14 __fp_zero
0000000e 14 __fp_pscB
0000000e 14 memset
0000000e 14 __fp_pscA
0000000c 12 _ZN5Sound6playOKEv
0000000c 12 __fp_inf
0000000c 12 yd
0000000c 12 _ZN5Sound10playCancelEv
0000000c 12 _ZN5Sound8playTickEv
0000000a 10 port_to_mode_PGM
0000000a 10 random
0000000a 10 __fixsfsi
0000000a 10 __subsf3
0000000a 10 _ZN8SPIClass11setDataModeEh
0000000a 10 port_to_output_PGM
0000000a 10 port_to_input_PGM
0000000a 10 _ZN9Backlight3setEh
00000008 8 _ZTV7Display
00000008 8 _ZN5Sound13updatePatternEv
00000008 8 _ZN9Backlight5beginEv
00000008 8 _ZN5Sound11updateTrackEv
00000008 8 _ZN5Sound11stopPatternEv
00000008 8 _ZN5Sound10updateNoteEv
00000008 8 _ZN7Display8setColorEaa
00000008 8 _ZN7Display8setColorEa
00000006 6 random_r
00000006 6 __fp_nan
00000006 6 ES_menu1
00000006 6 _ZN5Print5printEPKc
00000004 4 timer0_overflow_count
00000004 4 AS_menu1
00000004 4 timer0_millis
00000004 4 ES_menu2
00000004 4 AS_menu2
00000004 4 __mulsf3
00000002 2 crline
00000002 2 ldverr
00000002 2 _ZN3PFF8dir_pathE
00000002 2 par
00000002 2 __brkval
00000002 2 poffset
00000002 2 __brkval_maximum
00000002 2 __flp
Sun Aug 16, 2015 6:59 pm