Arduboy FX library

Just demonstrating a FX program is burned and what happens when the program doesn’t find FX chip.

  • If the EEPROM configuration is set to auto start the game will play
  • If the EEPROM configuration is set to start with bootloader then USB logo is shown untill you press A or B to start the game.

*the USB logo will be shown also when an non initialized cart / FX chip is present.


A nice side effect of being able to press B button to start a game also is that when you press B you are able to change the system sound settings (when supported by the program ofcourse)

@veritazz Yes it’s the latest concept logo.

1 Like

I guess, you wouldn’t actually run into a situation where you remove the flash cart because it will be soldered in, so you’d theoretically never see the USB boot logo, right?

Yes The only case when you would see the USB logo is

  • when the cart is empty
  • when someone corrupted the carts contents


In case you want a different icon. Here’s the original 16x24 image:


1 Like

Hey @Mr.Blinky can we move the link to your python utilities to the head post of the threads where it is relevant? I think this one might be a good one.

1 Like

Okay I’ve added a link to head post here.


3 posts were merged into an existing topic: Using Python

I asked for 60 animated bouncing balls demo :slight_smile:

yes there’s always some overhead for each ‘tile’

How big do you want those balls? :slight_smile:

1 Like


55 of them.

as masked sprites with with 60 moving background tiles (of which 45 are visable) running smoothly at 60fps (with USB cable disconnected)

You’ll need to run this on hardware because of the “AR” detection (and maybe the glitch)

drawballs-test.arduboy (11.8 KB)


Here’s a video @bateske

I’m sure I can get to 60 with some more optimizing :slight_smile:



This is great, can the balls be animated with frames??

Are the balls being streamed from external memory? Since they are all the same are you using the same memory pointer in ram or anything?

Could all of the sprites be different and animated and still have this same level of performance?

1 Like

Is the music coming from the Arduboy? How did you manage this demo so fast? You are a magician?

Looks awesome.


All the sprites (masked bitmaps) and background tiles (self masked) are drawn from the flash cart


void Cart::drawBitmap(
    int16_t x, 
    int16_t y,
    uint24_t address,
    uint8_t frame,
    uint8_t mode

you can have 256 frames for a sprite. Only if the width or width are different (or 256 isn’t enough ) you need to specify a different address.

Sprites and tiles can have any width and height from 1 up to 32767 pixels

No Sorry. Just playing some AY-8910 Speccy demo tunes in the background

1 Like

So good! Can you share the code? Could you help me turn it into a demo where each sprite is unique animated?

It would be a great demo to have 4 frame animations of 55 different kind of monsters that fit in your pocket. :slight_smile:

Showing that to other game developers I feel would get them psyched about the hardware.

I’ll share the code after tidying it up a bit. @bateske It’s on Github now

No problem got the sprites ?


Added link to source.

HELP WANTED: finding enough 16x16 animated sprites :grinning:

1 Like

Hey, just saw the Cart:wait() expands to:

in      r0, 0x2d
sbrs    r0, 7
rjmp    .-6

and in the datasheet there is an example to do it like that:

  sbis  SPSR, SPIF
  rjmp wait

Do you think we can do the same or is it related to my toolchain that it does expand differently?

Hmmm, SPSR is 0x2d and therefore not in the lower IO address space, thus sbis cannot be used. Strange to see this example in the datasheet for the 16u4 and 32u4. There is a sloppy note under “Code Examples”… :angry:

They probably copy and paste the examples across multiple datasheets.


Actually it could just be an oversight.
I checked the ATmega328P datasheet (picked a chip at random) and they give:

; Wait for transmission complete
in r16, SPSR
sbrs r16, SPIF
rjmp Wait_Transmit

So it’s possible that it’s a mistake on the datasheet.

Though the 328P’s datasheet is more recent (after Atmel was acquired by Microchip).

1 Like

I was just about to write that. I saw the examples in the datasheet too. It’s sloppy of them.
At one time I actually changed to sbis and facepalmed my self making me remember thats why I used 3 instructions :smile:

1 Like