RETRO Pong Mod

@ taylorza, @ devhammer - Awesome! Thanks!

Just for reference there is also this library BurstSPI - Class to be able to send SPI data with almost no … | Mbed
that on supported processors will give you a lot higher data rate without having to directly access CPU registers.

1 Like

I just made a very simple quick and dirty test program to compare the performance of some of the primitives of both libraries.
The ST7735 appears to be two to three or even four times faster than the N18, depending on the primitives.
The ST7735 lib also has more/better features, so I advise all participants of the competition to use the N18 library!
(Only to give me a head-start on winning of course… :whistle: )

:open_mouth: WARNING - WARNING - WARNING :naughty:
If you’re sensitive to ugly coding techniques, lack of best practice, ignorance of proper design patterns, abuse of object orientation or to total disregards of any coding guidelines, then don’t - I repeat - DON’T look at this code:

Have fun :stuck_out_tongue:

P.S. Regardless the performance, I do think the N18 library has a much nicer font…

3 Likes

@ maxint - Agree on the font, but wow. A 3x difference in perf is pretty compelling.

Agree with you that all other contestants should stick with the N18 driver, just to be on the safe side. :slight_smile:

WHAT!!! You don’t like that cool authentic retro CGA Font, what is wrong with you man! :slight_smile:

Just kidding of course. I ran your test and it was the first time I saw the two fonts side by side, and whole heartedly agree with you and @ devhammer… I chose an ugly font.

I will look at putting in a nicer font, the good thing is that the linker ensures that fonts that are not used are not include in the final binary so I can put in a few fonts.

Thanks for doing the test by the way, I appreciate that and the feedback.

2 Likes

Oh, just in case my test-results weren’t explicit enough:
Thank you @ taylorza for creating this excellent library!
(I’m anxious to see your next version…)

A small suggestion while you are adding multiple fonts :wink:
I vaguely remember someone on the Spark platform adding multiple fonts to the Adafruit GFX library. As full anti-aliased truetype scaling was probably a bit too heavy, he included a prescaled larger font to improve on the standard blocky font-scaling…

P.S. Hopefully no other contestants will discover what you did to test the performance of your library on mBuino. It might give them wrong ideas on what’s possible and bring their ambitions to a whole new level…

RayCastingEngine - Ray casting engine implemented on the mBuino plat… | Mbed

It is a pleasure, I am glad that I have made a useful contribution.

I looked at the fonts and I will make the font system a little more versatile, right now I only support 8x8 fonts. So I will do a little more work on it to be able to support more font sizes.

2 Likes

A very useful contribution indeed. Faster, better and more features. What more could we want…

[quote=“taylorza”]I looked at the fonts and I will make the font system a little more versatile, right now I only support 8x8 fonts. So I will do a little more work on it to be able to support more font sizes.[/quote] Cool… Smart solution! Supporting different font dimensions allows for both a better small font as well as a smoothed out large font.

@ taylorza - do you mind making:

  • beginBatchCommand
  • writeBatchData
  • endBatchCommand

methods “protected” instead of “private”?

I would like to extend LCD_ST7735 in my RETRO library and add support for indexed and b/w bitmaps.

Done. If you have any issues, let me know.

1 Like

@ taylorza - I forgot to mention “clip” method as well. Thank you!

EDIT: and CMD_ constants :smiley:

Quick test of 1bit 16x32 image animation:

5 Likes

@ Architect - Nice! So, do I see Mario coming to RETRO?

1 Like

Thanks! I don’t know, it was just a quick test.

That animation made me dizzy:)

(it also made me want a Retro)

1 Like

@ mtylerjr - Sorry for making you dizzy.

@ Architect - That looks very cool! I just got home, I will make the other members protected shortly and let you know.

1 Like

Done. I guess I should have thought a little more about it when I exposed the other operations. If I have missed anything else let me know…

2 Likes

Thanks to Gus who has granted me permission to include the GHI font in the LCD_ST7735 library, I can now say I have a nice font as well.

The font engine has been slightly enhanced to support fonts in a more flexible way, but should not break any existing code if you update to the latest version. As time permits I will enhance this further, right now I don’t have the time to test the additional changes I want to introduce.

The new font is ‘font_oem’. I have kept the other font as well, if you do not reference it, it will not take any additional memory, but it has the advantage of providing all the extended characters as well as the standard ASCII printable characters.

4 Likes

Great work! Thank you (and GHI) for this contribution!
(unfortunately I could only find a +1 button above your post, and no +5…)

I just tried it out and it looks so much better! This new font takes less screen-space, so now it should be a breeze to fit ancient text adventures to the Retro’s 160x128 pixels…

The new version works perfect with my existing code and supposedly deprecated constants such as CHAR_WIDTH still work, so I didn’t have to change much. The new measureString method works well too. Can I assume you included that method to allow future implementation of proportional fonts?