Jump to content
Serguei2

broken pipe and syntax error

Recommended Posts

CCI started acting funny after my computer crashed.

 

Here the error:

Quote

sdcpp.exe: fatal error: when writing output to : Broken pipe
C:\robin\ColecoVision\robin>sdcc -mz80 -c --std-c99 --oldralloc  sound2.c 
sound2.c:23: syntax error: token -> 'snd_table' ; column 23

 

And the source:

Quote

#include <coleco.h>
#include <getput1.h>

const byte sound1[] = {
 0x40,0xAB,0x01,0x08,0x42,0xAB,0x71,0x08,0x18,0x11,0x50,
};
const byte sound2[] = {
 0x80,0x5A,0x00,0x08,0x82,0x5A,0x70,0x08,0x18,0x11,0x90,
};
const byte sound3[] = {
 0xC0,0x20,0xF0,0x10,0xD0,0x00,0x00,0x03,0x08,0x02,0x73,0x08,0x18,0x11,0x10,
};
const byte sound0[]={
 0x02,0x33,0x0c,0x1c,0x11,0x10
};
const byte noise1[]={
 0x00,0x33,0x0c,0x1c,0x11,0x10
};
const byte sound4[]={
 0x00,0x39,0xF0,0x10,0xD0,0x00,0x00,0x07,0x08,0x02,0x77,0x08,0x18,0x11,0x10,
 0xC0,0x20,0xF0,0x10,0xD0,0x00,0x00,0x07,0x08,0x02,0x77,0x08,0x18,0x11,0x10,
};
const sound_t snd_table[] = {
  {sound1,SOUNDAREA1},
  {sound2,SOUNDAREA2},
  {sound3,SOUNDAREA6},
  {sound0,SOUNDAREA4},
  {sound4,SOUNDAREA6},
  {noise1,SOUNDAREA4},
};

const byte gtsNAME[] = {
  0xFE, 0x20, 0xFE, 0x20, 0xFE, 0x20, 0xFE, 0x20, 0xFE, 0x20, 0xFE, 0x20, 0x85, 0x20, 0xFF};

const byte gtsPATTERN[] = {
  0xFE, 0x00, 0xFE, 0x00, 0x89, 0x00, 0x01, 0x1C, 0x38, 0x82, 0x18, 0x02, 0x00, 0x18, 0x18,
  0x82, 0x66, 0x85, 0x00, 0x21, 0x44, 0xFE, 0x44, 0x44, 0xFE, 0x44, 0x00, 0x18, 0x3E, 0x60, 0x3C,
  0x06, 0x7C, 0x18, 0x00, 0xFF, 0x81, 0xB9, 0xA5, 0xB9, 0xA5, 0x81, 0xFF, 0x3C, 0x66, 0x3C, 0x38,
  0x67, 0x66, 0x3F, 0x00, 0x06, 0x0C, 0x18, 0x84, 0x00, 0x01, 0x0C, 0x18, 0x82, 0x30, 0x04, 0x18,
  0x0C, 0x00, 0x30, 0x18, 0x82, 0x0C, 0x08, 0x18, 0x30, 0x00, 0x00, 0x66, 0x3C, 0xFF, 0x3C, 0x66,
  0x82, 0x00, 0x81, 0x18, 0x02, 0x7E, 0x18, 0x18, 0x86, 0x00, 0x81, 0x18, 0x00, 0x30, 0x82, 0x00,
  0x00, 0x7E, 0x88, 0x00, 0x81, 0x18, 0x81, 0x00, 0x10, 0x03, 0x06, 0x0C, 0x18, 0x30, 0x60, 0x00,
  0x3C, 0x66, 0xCE, 0xD6, 0xE6, 0xCC, 0x78, 0x00, 0x18, 0x38, 0x83, 0x18, 0x2C, 0x1C, 0x30, 0x0E,
  0x1E, 0x36, 0x06, 0xFC, 0xC0, 0xFE, 0x00, 0x0E, 0x1E, 0x36, 0x06, 0x3C, 0x86, 0xFE, 0x00, 0x0E,
  0x1E, 0x36, 0x66, 0xFE, 0x06, 0x06, 0x00, 0x1E, 0x3E, 0x70, 0xE0, 0xFC, 0x0E, 0xFE, 0x00, 0x0E,
  0x1E, 0x30, 0x60, 0xDE, 0xF2, 0xFE, 0x00, 0x7E, 0xC6, 0x0C, 0x82, 0x18, 0x18, 0x1C, 0x30, 0x1E,
  0x3E, 0x66, 0x66, 0xFC, 0xC6, 0xFE, 0x00, 0x3C, 0x66, 0xCE, 0xFE, 0x06, 0x0C, 0x38, 0x00, 0x00,
  0x18, 0x18, 0x00, 0x00, 0x18, 0x18, 0x82, 0x00, 0x0C, 0x18, 0x00, 0x00, 0x18, 0x18, 0x30, 0x0E,
  0x18, 0x30, 0x60, 0x30, 0x18, 0x0E, 0x82, 0x00, 0x02, 0x7E, 0x00, 0x7E, 0x82, 0x00, 0x0F, 0x70,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E, 0x00, 0x26, 0x82, 0x66, 0x22, 0xE6, 0x6C, 0x38, 0x00,
  0x62, 0xC6, 0xC6, 0xD6, 0xFE, 0xEE, 0xC4, 0x00, 0x26, 0x66, 0xEC, 0x38, 0x7C, 0xEE, 0xC6, 0x00,
  0x26, 0x66, 0xEC, 0x38, 0x18, 0x18, 0x1C, 0x30, 0x3E, 0x66, 0xCC, 0x18, 0x32, 0x66, 0xFE, 0xFE,
  0x00, 0xFE, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0xFE, 0x00, 0xFE,
  0x00, 0xFE, 0x00, 0xB2, 0x00, 0xFF};

const byte gtsCOLOR[] = {
  0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE,
  0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE, 0x41, 0xFE,
  0x41, 0x8F, 0x41, 0xFF};

void main(void)
{
 set_snd_table(snd_table);
 screen_mode_2_text();
 paper(0xc);
 rle2vram (gtsPATTERN,0x0000);
 rle2vram (gtsCOLOR,0x2000);
 rle2vram (gtsNAME,0x1800);
 duplicate_pattern();
 cls();
 screen_on();
 print_at(1,1,"PRESS 1, 2, 3 OR 4");
 enable_nmi();
 loop:
  if(keypad_1==1){
   disable_nmi();
   print_at(1,2,"BOUTON 1");
   play_sound(1);
   enable_nmi();
  }
  if(keypad_1==2){
   disable_nmi();
   print_at(1,2,"BOUTON 2");
   play_sound(2);
   enable_nmi();
  }
  if(keypad_1==3){
   disable_nmi();
   print_at(1,2,"BOUTON 3");
   play_sound(3);
   play_sound(4);
   enable_nmi();
  }
  if(keypad_1==4){
   disable_nmi();
   print_at(1,2,"BOUTON 4");
   //play_sound(5);
   play_sound(6);
   enable_nmi();
  }
 delay(1);
 goto loop;
}
void nmi(void) {}

 

These codes work before the crash.

Share this post


Link to post
Share on other sites

Compiles fine on my side.  Check if getput.h is in SDCC > include folder. 

You can review the SDCC installation with this video.
 

 

Share this post


Link to post
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.

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...