Jump to content
IGNORED

FlappyBird test


tonma

Recommended Posts

That is ok. The game may even sound better with less noise.

 

Edit: do you have a method for erasing the high score? This would be nice to have for "factory resetting" the cart after testing.

Yep, I need to add this. I can put it on Option1.

How can I test the Option1 Button ? I try old code like kbhit() but doesn't seem to work.

 

I have a problem with the sound effect. Sometimes the sound Coin goes bad. I try to play song outside the tgi_busy loop but without sucess.

 

I put this little demo for testing. No music, flap sound, coin sound when you get point and whip sound when you die.

The coin sound crash sometime. The others works.

soundtest.zip

Edited by tonma
  • Like 2
Link to comment
Share on other sites

Yep, I need to add this. I can put it on Option1.

How can I test the Option1 Button ? I try old code like kbhit() but doesn't seem to work.

 

I have a problem with the sound effect. Sometimes the sound Coin goes bad. I try to play song outside the tgi_busy loop but without sucess.

 

I put this little demo for testing. No music, flap sound, coin sound when you get point and whip sound when you die.

The coin sound crash sometime. The others works.

Strange.

 

I shorted the sound a bit.

coin.zip

  • Like 1
Link to comment
Share on other sites

Testing kbhit() and reading the character with cgetc() should work.

And you need to include conio.h

 

The mess with the sounds could come from IRQ routines.

 

Perhaps you could pause the music engine before making changes like:

    lynx_snd_pause();
    lynx_snd_play(0, musicptr.music0);
    lynx_snd_continue();
Edited by karri
  • Like 1
Link to comment
Share on other sites

Yep, I need to add this. I can put it on Option1.

How can I test the Option1 Button ? I try old code like kbhit() but doesn't seem to work.

 

I have a problem with the sound effect. Sometimes the sound Coin goes bad. I try to play song outside the tgi_busy loop but without sucess.

 

I put this little demo for testing. No music, flap sound, coin sound when you get point and whip sound when you die.

The coin sound crash sometime. The others works.

Also option 2 + Start should flip the screen. Maybe someone wanna hold it with the buttons on top?

Link to comment
Share on other sites

Getting the three buttons correct was done some years ago with the help of a few old timers.

 

The kbhit() cgetc() combination has the correct touch and feel for the Lynx. It will properly return the right character for further processing.

 

It is a bit tricky to get the timing and operations exact by just reading the bits from the hardware. So we created a minikeyboard in cc65 to get the feel right.

 

Opt 1 = '1'

Pause = 'P' // Toggle Pause

Opt 2 = '2'

Pause + Opt 1 = 'R' // Restart Lynx

Pause + Opt 2 = 'F' // Toggle Flip screen

Opt 1 + Opt 2 = '3'

Pause + Opt 1 + Opt 2 = '?'

 

The last two codes are probably never used for anything.

Link to comment
Share on other sites

Strange.

 

I shorted the sound a bit. coin.zip

It's look like the first version (coin.zip). I'll try the whip2. Well the problem may come from my code, I will make a simple version with only the sounds.

 

I tried sound pause & continue but the game freeze the second time I use it.

 

Thanks for conio.h, I always forgot the include. I need to change the mednafen config, because the key mapping is weird. Can't have Opt1 in emulator.

 

Also option 2 + Start should flip the screen. Maybe someone wanna hold it with the buttons on top?

 

I always thinking, It was a hardware function, not software :-D

 

And yes, I'll be the first to use " Opt 1 + Opt 2 = '3' " for erasing the eeprom.

  • Like 1
Link to comment
Share on other sites

Changing the mappings for mednafen is trivial.

 

Alt Shift 1

 

Then press up up down down left left right right q q q q w w w w SPACE SPACE z z z z x x x x

 

Now the cursor keys are configured as joypad. Fire is z and x. Opt 1 is q, Opt 2 is w, Pause is SPACE.

 

I hope to have time today to fine tune the sound effects on a real Lynx.

 

Omg. Look what I found:

 

post-2099-0-47981900-1483610003_thumb.jpg

Edited by karri
  • Like 2
Link to comment
Share on other sites

:-o Very cool picture. I love it.

 

Arrrgh the alt shit 1 doesn't work. Lot of linux user as the same problem, I'll change the value in the config file.

 

The flip screen working, I've add it.

 

The new sound whip2 doesn't work with me. Or maybe I need to put the 3 sounds with the music in one file. The instruments or patterns can conflict with each other ?

Edited by tonma
Link to comment
Share on other sites

A test version.

 

flapsfx : no music but sound, new version with flipscreen (yes I've made it : Pause + Opt 2), highscore and eeprom erase (opt1 + opt2) and the others things : new difficulty, flap sooner, ...

 

flapsfx2 : only sound : BTN A / B : music / flap, KEY LEFT / RIGHT : coin / whip

 

 

flapsfx.zip

Link to comment
Share on other sites

I tried to put all the sounds into one file.

 

Channel 0 - music

Channel 1 - flap

Channel 2 - coin

Channel 3 - whip

 

I hope this helps...

 

I also found out that modifying the music between pause / continue is not a good idea. So I assume you just have to give play commands at every event.

chickendance.zip

Edited by karri
  • Like 1
Link to comment
Share on other sites

ooooo... :-o With the exception of Zaku, this is the first time I have seen a board as thin as an official release. Did you make that by hand?

 

 

It did take a while to find chips thin enough to make it work. The eeprom for the high score is a bit tiny.

 

Basically this is part of my blankcart project. Trying to create an affordable cart for hobby releases.

 

The feel is not really comparable to Zaku plastics or Alpine Games laser sintered plastics. On the other hand ABS costs only 33% of the material used in laser sintered carts.

 

The thickness of the cart is only 2.6mm and it fits both Lynx model 1 and model 2.

  • Like 2
Link to comment
Share on other sites

Nice.

 

The background sprite is TYPE_NORMAL when it should be TYPE_BACKGROUND. The tree trunks that are black are flickering as they are transparent.

/* SPRCTL0 $FC80 */
#define BPP_4            0xC0
#define BPP_3            0x80
#define BPP_2            0x40
#define BPP_1            0x00
#define HFLIP            0x20
#define VFLIP            0x10
#define TYPE_SHADOW      0x07
#define TYPE_XOR         0x06
#define TYPE_NONCOLL     0x05
#define TYPE_NORMAL      0x04
#define TYPE_BOUNDARY    0x03
#define TYPE_BSHADOW     0x02
#define TYPE_BACKNONCOLL 0x01
#define TYPE_BACKGROUND  0x00

I am just burning the code to the cart. Fingers crossed....

Link to comment
Share on other sites

The game sounds and plays really well. The eeprom did not save the high score. I have to try it with some other game to see if the chip is different.

 

The eeprom works with MegaPak. So there may be a problem with the library routines.

 

I wonder if you could use the older eeprom library.

unsigned __fastcall__ lynx_eeprom_read (unsigned char cell);
unsigned __fastcall__ lynx_eeprom_erase (unsigned char cell);
unsigned __fastcall__ lynx_eeprom_write (unsigned char cell, unsigned val);

Plain "unsigned" means 16 bit unsigned int.

 

In the old driver you could only program bits that were '1' to '0'.

 

So the correct way was to first erase the cell to all bits '1' and then write the data.

 

At the intro screen the colours are correct. But when Flappy starts flying the tree trunks in the background start flickering. They appear to be black - index 0. I wonder if you could re-colour them to dark brown - index 11?

 

I just tested the cart in Lynx II with McWill's screen and a Lynx I with original screen. Everything works except eeprom.

Edited by karri
Link to comment
Share on other sites

The game sounds and plays really well. The eeprom did not save the high score. I have to try it with some other game to see if the chip is different.

 

The eeprom works with MegaPak. So there may be a problem with the library routines.

 

I wonder if you could use the older eeprom library.

unsigned __fastcall__ lynx_eeprom_read (unsigned char cell);
unsigned __fastcall__ lynx_eeprom_erase (unsigned char cell);
unsigned __fastcall__ lynx_eeprom_write (unsigned char cell, unsigned val);

Plain "unsigned" means 16 bit unsigned int.

 

In the old driver you could only program bits that were '1' to '0'.

 

So the correct way was to first erase the cell to all bits '1' and then write the data.

 

At the intro screen the colours are correct. But when Flappy starts flying the tree trunks in the background start flickering. They appear to be black - index 0. I wonder if you could re-colour them to dark brown - index 11?

 

I just tested the cart in Lynx II with McWill's screen and a Lynx I with original screen. Everything works except eeprom.

 

Aaaarrrgh I mess all my code to find why I have this glitche.

 

Seem it's pen problem , like the F and E. When I remove the collision system with "tgi_setcollisiondetection(0);"; no gltiche.

I try with handy, only see flickering with this emulator

 

I'll try to change color to index 11

 

My code :

SCB_REHV_PAL sprrobot1 = 
{
  BPP_4 | TYPE_NONCOLL | PACKED,	
  REHV, 0x01,
  0,
  robot1,
  60, 32, 0x0200, 0x0200,
  { 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF }
};


SCB_REHV_PAL sprbg = 
{
  BPP_4 | TYPE_NONCOLL| PACKED,	
  REHV, 0x00,
  0,
  toki2,
  0, 0, 0x0100, 0x0100,
  { 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF }
};

SCB_REHV_PAL sprsol = 
{
  BPP_4 | TYPE_NONCOLL | PACKED,	
  REHV, 0x00,
  0,
  sol,
  128, 0, 0x0100, 0x0100,
  { 0x01,0x23,0x45,0x67,0x89,0xAB,0xCD,0xEF }
};

If I change type_noncoll with normal / background flappy change color with pen F And I can't use non_coll for the game, only for intro.

 

 

I try for the eeprom but have conflct with :

unsigned __fastcall__ lynx_eeprom_erase (unsigned char cell);

 

I have :

main.c(14): Error: Conflicting types for `lynx_eeprom_erase'

My code :

unsigned __fastcall__ lynx_eeprom_read (unsigned char cell);
//unsigned __fastcall__ lynx_eeprom_erase (unsigned char cell);
unsigned __fastcall__ lynx_eeprom_write (unsigned char cell, unsigned val);


mynameH = lynx_eeprom_read(0);

while (1) {
if (myname > mynameH) {
		lynx_eeprom_write(0,myname);
}

if (kbhit())
{
key = cgetc();
if (key == '3')	 {
lynx_eeprom_write(0,1);
lynx_eeprom_erase(0);

}
}

I can add picture if needed.

 

Picture add.

2 first screen : Sprite Normal and BG = type_background. The white of flappy change and flickering in bg

Right picture : Sprite Normal and BG = type_noncollide. no flickering but the white of flappy change.

So I musn't use the E and F color

post-44532-0-69985100-1483709708_thumb.png

Edited by tonma
  • Like 1
Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...