Free Sprites

Libraries, utilities, bootloaders...

Re: Free Sprites

Postby HTel » Thu May 29, 2014 9:38 pm

4 colors, that is 2 bit... and it works... I thought gamebuino is only 1 bit. Wow I'm a new to this!
HTel
 
Posts: 30
Joined: Tue May 27, 2014 4:47 pm

Re: Free Sprites

Postby adekto » Thu May 29, 2014 11:00 pm

HTel wrote:4 colors, that is 2 bit... and it works... I thought gamebuino is only 1 bit. Wow I'm a new to this!


yea no thats all kinds of wrong, chip is 8bits and images are ether 1(somthing) or 0(nothing) upfront u say what it is

if u want to use Drakker system ur going to need a extra library, if someone is up for making that but it make images size allot bigger
User avatar
adekto
 
Posts: 448
Joined: Tue Feb 25, 2014 9:47 pm
Location: belgium

Re: Free Sprites

Postby Drakker » Thu May 29, 2014 11:46 pm

And this is not going to happen until I get my Gamebuinos... so late July at the earliest. Most likely in August.
User avatar
Drakker
 
Posts: 297
Joined: Sun Mar 30, 2014 2:54 am
Location: Québec, Canada

Re: Free Sprites

Postby jonnection » Fri May 30, 2014 9:01 am

Drakker wrote:And this is not going to happen until I get my Gamebuinos... so late July at the earliest. Most likely in August.


I got a Nokia LCD breakout (2.5 USD) and a SDcard breakout (1.9 USD) from Ebay on 6.5. I'm testing code on my Fauxbuino already. Granted I had some extra parts ready (the MCU, crystals, caps and tact switches), but you could bypass all that by simply get an Arduino Nano and wiring it up. It took me 2 days to solder everything in place, but you don't have to, just use a solderless breadboard and some wires. Rodot has provided exceptionally clear schematics, following them is easy.

Leave out the LiPo and and other complicated stuff, disable the battery and backlight monitoring from settings.c and you have a dev kit in no time.

Just saying that you can get the necessary parts in 2 weeks if you want. I missed the indiegogo so I had no other option.
User avatar
jonnection
 
Posts: 317
Joined: Sun May 04, 2014 8:21 pm

Re: Free Sprites

Postby Drakker » Fri May 30, 2014 1:29 pm

Yeah, except I will not have much free time until them, so it's not really worth it for me to invest in a development system, that I will use for such a short time. I'm (finally) moving to a house this week end, we have some renovation to do, and it's summer, which means I'd rather spend my time outside with my son. So waiting until late July to get my Gamebuinos will not be a problem for me.
User avatar
Drakker
 
Posts: 297
Joined: Sun Mar 30, 2014 2:54 am
Location: Québec, Canada

Re: Free Sprites

Postby Hark0 » Tue Jul 29, 2014 6:28 pm

Myndale wrote:










Oh my god!!! :shock: ;)

Where is my postman?!?!

(Installing Windows on VirtualBox AND all necessary software for Gamebuino :mrgreen: )
User avatar
Hark0
 
Posts: 55
Joined: Wed Apr 09, 2014 4:45 am
Location: Cornella de Llobregat, Barcelona

Re: Free Sprites

Postby erico » Tue Jul 29, 2014 7:50 pm

He probably took a detour down to brasil to deliver my package first Harko...I will tell him to hurry back to spain! ;)
User avatar
erico
 
Posts: 671
Joined: Thu Mar 27, 2014 9:29 pm
Location: Brazil

Re: Free Sprites

Postby Hark0 » Wed Jul 30, 2014 5:20 am

erico wrote:He probably took a detour down to brasil to deliver my package first Harko...I will tell him to hurry back to spain! ;)


Hahahahahaha :lol:
User avatar
Hark0
 
Posts: 55
Joined: Wed Apr 09, 2014 4:45 am
Location: Cornella de Llobregat, Barcelona

Re: Free Sprites

Postby Hark0 » Thu Jul 31, 2014 9:26 am

Myndale wrote:I just tested this and I'm able to do full-screen displays at around 300FPS. What I am noticing is that even at these extremely high frame rates I'm getting a small amount of flicker at certain rates and virtually none at others. 3ms is significantly above the persistence of the liquid crystal, so what appears to be happening is that the display updates are aliasing with the 5110 refresh circuitry. Clamping the refresh rate to a more sane value should fix it but I'll have to check the LCD's datasheet to determine what the ideal rate should be.

Sadly, my tests seem to indicate that flicker-free 4-color grey-scale isn't going to be possible...the 5110 update circuitry just isn't fast enough to support it :(

So in summary: full-screen 3-color grey-scale will be possible, and with sufficiently optimized code you'll have plenty of cycles to space.

Here's my test code for anyone that wants to confirm my findings:

Code: Select all
#define PIN_SCE   A1
#define PIN_RESET A0
#define PIN_DC    A2
#define PIN_SDIN  11
#define PIN_SCLK  13

#define PORT_SCLK PORTB
#define SCLK_BIT  5
#define PORT_SDIN PORTB
#define SDIN_BIT  3

#define LCD_C     LOW
#define LCD_D     HIGH

#define LCD_X     84
#define LCD_Y     48

void LcdInitialise(void)
{
  pinMode(PIN_SCE, OUTPUT);
  pinMode(PIN_RESET, OUTPUT);
  pinMode(PIN_DC, OUTPUT);
  pinMode(PIN_SDIN, OUTPUT);
  pinMode(PIN_SCLK, OUTPUT);
  digitalWrite(PIN_RESET, LOW);
  digitalWrite(PIN_RESET, HIGH);
  LcdWrite(LCD_C, 0x21 );  // LCD Extended Commands.
  LcdWrite(LCD_C, 0xB9 );  // Set LCD Vop (Contrast).
  LcdWrite(LCD_C, 0x04 );  // Set Temp coefficent. //0x04
  LcdWrite(LCD_C, 0x14 );  // LCD bias mode 1:48. //0x13
  LcdWrite(LCD_C, 0x0C );  // LCD in normal mode.
  LcdWrite(LCD_C, 0x20 );
  LcdWrite(LCD_C, 0x0C );
}

void LcdClear(void)
{
  for (int index = 0; index < LCD_X * LCD_Y / 8; index++)
  {
    LcdWrite(LCD_D, 0x00);
  }
}

void LcdWrite(byte dc, byte data)
{
  digitalWrite(PIN_DC, dc);
  digitalWrite(PIN_SCE, LOW);
  shiftOut(PIN_SDIN, PIN_SCLK, MSBFIRST, data);
  digitalWrite(PIN_SCE, HIGH);
}

void gotoXY(int x, int y)
{
  LcdWrite( 0, 0x80 | x);  // Column.
  LcdWrite( 0, 0x40 | y);  // Row. 
}

void setup(void)
{
  LcdInitialise();
  LcdClear();
  Serial.begin(9600);
  pinMode(PIN_SDIN, OUTPUT);
  pinMode(PIN_SCLK, OUTPUT);
}

#define bitOut(val, bit)             \
  if (val & (1 << bit))              \
    PORT_SDIN |= _BV(SDIN_BIT);      \
  else                               \
    PORT_SDIN &= ~_BV(SDIN_BIT);     \
  PORT_SCLK |= _BV(SCLK_BIT);        \
  PORT_SCLK &= ~_BV(SCLK_BIT);

void byteOut(uint8_t val)
{
  bitOut(val, 0);
  bitOut(val, 1);
  bitOut(val, 2);
  bitOut(val, 3);
  bitOut(val, 4);
  bitOut(val, 5);
  bitOut(val, 6);
  bitOut(val, 7);
}


void loop(void)
{
  for (int i=0; i<135; i++)
  {
    gotoXY(0,0);
    for (int i=0; i<42; i++)
    {
      digitalWrite(PIN_DC, LCD_D);
      digitalWrite(PIN_SCE, LOW);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      digitalWrite(PIN_SCE, HIGH);
    }
   
    // 1
    gotoXY(0,0);
    for (int i=0; i<42; i++)
    {
      digitalWrite(PIN_DC, LCD_D);
      digitalWrite(PIN_SCE, LOW);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      byteOut(0xaa);
      byteOut(0x55);
      digitalWrite(PIN_SCE, HIGH);
    }
   
  }
 
  Serial.println("This string causes the TX pin to flash so I can see how long that took.");
}



I copy/paste your code to SDK... compiled fine... black screen on emulator.... none errors... it's due screen emulation?
User avatar
Hark0
 
Posts: 55
Joined: Wed Apr 09, 2014 4:45 am
Location: Cornella de Llobregat, Barcelona

Previous

Return to Software Development

Who is online

Users browsing this forum: No registered users and 25 guests

cron