config-gamebuino.h

Creations

Sorunome

1 year ago

With a file called config-gamebuino.h you can easily configure the library dependent per sketch! To use this feature simply create a file called "config-gamebuino.h" in the root of your sketch folder. After doing so, you will have to restart the arduino IDE to register the change. You will not have to restart it when just modifying config-gamebuino.h, only when creating.

Now, in this file you can do a lot of #define's to configure how certain stuff in the library compiles. Here are the defines, all are optional:

General Settings

  • FOLDER_NAME (string) - name of the folder in which the binary files will be located on the sd card, defaults to sketch name. Must be at least 4 chars long

Save Settings

  • SAVEBLOCK_NUM (int) - number of saveblocks (for a more detailed explenation, see my gb.save explenation), defaults to 64
  • SAVEFILE_NAME (string) - name of the savefile, defaults to "save.sav"
  • SAVECONF_DEFAULT_BLOBSIZE (int) - size of a save blob, if not specified differently via saveconf  (for a more detailed explenation, see my gb.save explenation), defaults to 32

Display Settings

  • DISPLAY_MODE (DISPLAY_MODE_RGB565, DISPLAY_MODE_INDEX, DISPLAY_MODE_INDEX_HALFRES) - mode of the display, defaults to DISPLAY_MODE_RGB565
  • DISPLAY_DEFAULT_BACKGROUND_COLOR (Color) - default background color of the display, defaults to Color::black
  • DISPLAY_DEFAULT_COLOR (Color) - default foreground color of the display, defaults to Color::white
  • DISPLAY_CONSTRUCTOR - An Image constructor to use for gb.display, default depends on DISPLAY_MODE

Record Settings

  • MAX_IMAGE_RECORDING (int) - Maximum number of images that can be recorded at the same time, defaults to 2

Sound Settings

  • SOUND_CHANNELS (int) - number of sound sources that can be played at the same time, defaults to 4
  • SOUND_FREQ (int) - frequency at which the interrupt runs, default is 44100

View full creation

ragnarok93

NEW 8 months ago

Ok, so I want to set up 160x128 16 colors high res mode, I made a config-gamebuino.h file in sketch folder, restart IDE and now what I have to write to set that mode ? I wrote something like this in config-gamebuino.h file - 

DISPLAY_MODE(DISPLAY_MODE_INDEX);

But this don't work. 

And do I have to write something in main code file ?


Thanks for response in advice :).

ragnarok93

NEW 8 months ago

delete this xd

Aurélien Rodot

8 months ago

You should share how you did instead, to help the future people having the same question. I won't delete your post ;)

Aurélien Rodot

NEW 8 months ago

ragnarok93 ragnarok93

You should share how you did instead, to help the future people having the same question. I won't delete your post ;)

ragnarok93

8 months ago

I mean I did double post so you could delete it :D. I still dont know how to do it tho ! :D.

ragnarok93

NEW 8 months ago

Aurélien Rodot Aurélien Rodot

I mean I did double post so you could delete it :D. I still dont know how to do it tho ! :D.

ragnarok93

NEW 8 months ago

Okay I got it, so in file config-gamebuino.h you have to write something like this -

#define DISPLAY_MODE(DISPLAY_MODE_INDEX);

@EDIT

But it stil don't change resolution to high-res 16 color :(. At least in online gamebuino META emulator :<.

Sorunome

8 months ago

#define DISPLAY_MODE DISPLAY_MODE_INDEX


And, as the post states, be sure to restart the arduino IDE after creating that file

Sorunome

NEW 8 months ago

ragnarok93 ragnarok93

#define DISPLAY_MODE DISPLAY_MODE_INDEX


And, as the post states, be sure to restart the arduino IDE after creating that file

ragnarok93

NEW 8 months ago

I did, but still this don't make change in resolution in online gamebuino META emulator :c.

Sorunome

8 months ago

 If it is only the emulator it might be an emulator bug. Try on real hardware ;)

Sorunome

NEW 8 months ago

ragnarok93 ragnarok93

 If it is only the emulator it might be an emulator bug. Try on real hardware ;)

ragnarok93

8 months ago

Im waiting for it ;). Today it was shipped ;).

ragnarok93

NEW 8 months ago

Sorunome Sorunome

Im waiting for it ;). Today it was shipped ;).

You must be logged in in order to post a message on the forum

Log in