Register

Test of Audio Player on fx-9860GII SD

Discuss anything related to calculators. For specific help on certain games/programs check the Released Projects subforum.
Junior Member
Posts: 2
Joined: Fri Sep 07, 2012 1:53 pm

Test of Audio Player on fx-9860GII SD

Postby ExAcler » Sat Sep 08, 2012 5:09 pm

I used this application:SCAP.
Introduction&Download of this application:http://martin.poupe.org/casio/scap/

I used an wave audio file(Sample Rate:22100 KHz,BitRate:8 bits,Channel:Mono) and it sounded great!
Here are the effects from the calculator(I chose a Chinese music called Chrysanthemum Flower Bed(Ju Hua Tai),composed by Jay Chou):
In "Downloads" Module,called "Effect of SCAP running on fx-9860GII SD".

Senior Member
Posts: 369
Joined: Tue Jan 03, 2012 11:24 pm
Calculators: Casio Afx 1.0, Casio fx-9860GII SD, Casio Classpad 330, Casio fx-CG20, Casio Classpad fx-CP400

Re: Test of Audio Player on fx-9860GII SD

Postby helder7 » Wed Jan 30, 2013 12:21 am

I tested connecting a speaker Nokia Md-9 (with a built-in amplifier :twisted: ) with my fx9860.

The sound is perfectly audible although still a bit low compared to other gadgets like mobile phones...
It is also possible to hear background noise.

Image
SiO2 + CaCO3 ----------> CaSiO3 + CO2

Junior Member
Posts: 15
Joined: Sun Jan 27, 2013 2:43 pm
Location: Germany
Calculators: Casio fx-9860GII

Re: Test of Audio Player on fx-9860GII SD

Postby naib864 » Wed Jan 30, 2013 1:58 pm

Did I understood this right??? An application for hearing music with a calc? That sounds cool.

Senior Member
User avatar
Posts: 113
Joined: Sun Dec 16, 2012 2:59 pm
Calculators: None

Re: Test of Audio Player on fx-9860GII SD

Postby Casimo » Wed Jan 30, 2013 2:41 pm

Yes, that works. If you want, I can give you the PowerGraphic2 - compatible Version of the player.
Last edited by Casimo on Thu Mar 27, 2014 7:21 pm, edited 1 time in total.
Image

Junior Member
Posts: 15
Joined: Sun Jan 27, 2013 2:43 pm
Location: Germany
Calculators: Casio fx-9860GII

Re: Test of Audio Player on fx-9860GII SD

Postby naib864 » Wed Jan 30, 2013 3:31 pm

Yeeeees!!! :D :lol:

Senior Member
User avatar
Posts: 113
Joined: Sun Dec 16, 2012 2:59 pm
Calculators: None

Re: Test of Audio Player on fx-9860GII SD

Postby Casimo » Wed Jan 30, 2013 3:42 pm

It was just a test. Here's the source:
Code: Select all
#include "fxlib.h"
#include "7305.h"

#define DATAPACK 8080

unsigned char UserStack[DATAPACK];

//Conversion tables
#define X 0x10
#define _ 0x00

static const unsigned char LowTable[16]=
{
   _,_,_,_,//0
   X,_,_,_,//1
   X,_,X,_,//2
   _,X,X,X,//3
};

                               //0    1    2    3    4    5    6    7
static const unsigned char HighTable[8]={0x00,0x01,0x44,0x45,0x65,0x67,0xE7,0xEF};

#define gpBuffer UserStack

//static unsigned char *gpBuffer;
static unsigned int giBufIndex = 0;
static unsigned char giTableIndex = 0;
static unsigned char giSubSample = 0;
static unsigned char giFromHighTab = 0;

static int ComOpen()
{
   //unsigned char settings[5]={0,9,0,1,0};//115200,2xstop bits
   unsigned char settings[5]={0,9,0,0,0};//115200,1xstop bits
   if(Serial_Open(&settings))
   {
      return 1;
   }
      //SCIF2.SCSMR.BIT.SRC = 1;//1/5 (for 9860)

   //it has no SRC register (comparing to fx9860G), so actual speed is only ~ 460800
   //SCIF2.SCSMR.BIT.SRC = 0;//1/16 (for 9860)
   SCIF2.SCSMR.BIT.CKS = 0;//1/1
      //SCIF2.SCBRR = 2;//!override speed to 1959390 bps (for 9860)
   SCIF2.SCBRR = 0;//!override speed to 1836000 bps (for 9860)
   return  0;
}

int AddIn_main(int isAppli, unsigned short OptionNum)
{
   FONTCHARACTER path[] ={'\\','\\','f','l','s','0','\\','T','E','S','T','.','w','a','v',0};
   unsigned int i, size;
   unsigned int code1, code2;
   int hFile = Bfile_OpenFile(path, _OPENMODE_READ);
   //skip wav header
   if(Bfile_ReadFile(hFile,UserStack,44,-1) != 44)
   {
      return 0;
   }

   size = Bfile_GetFileSize(hFile);
   ComOpen();
   Bdisp_AllClr_VRAM();
   locate( 1, 1 );
   Print(&"Playing");
   Bdisp_PutDisp_DD();

   //read it
   for(i = 0; i < size; i+= DATAPACK)
   {
      Bfile_ReadFile(hFile,UserStack ,DATAPACK,-1);
      for(giBufIndex = 0; giBufIndex < DATAPACK;)
      {
         //it has only 16 B fifo :-(
         while ((SCIF2.SCFDR.WORD >> 8) < 16)
         {
            if(giTableIndex >= 4)
            {
               giSubSample = gpBuffer[giBufIndex++] >> 3;
               giFromHighTab = HighTable[giSubSample>>2];
               giSubSample = (giSubSample & 3) << 2;
               giTableIndex = 0;
            }
            SCIF2.SCFTDR = (unsigned char)LowTable[giSubSample|giTableIndex]|giFromHighTab;
            giTableIndex++;
         }
      }
      if(Bkey_GetKeyWait(&code1,&code2,KEYWAIT_HALTOFF_TIMEROFF,0,1,0) == KEYREP_KEYEVENT)
      {
         if(code1 == 4 && code2 == 8)
         break;
      }
   }
   Bfile_CloseFile(hFile);
   Serial_Close(1);
}

#pragma section _BR_Size
unsigned long BR_Size;
#pragma section
#pragma section _TOP
int InitializeSystem(int isAppli, unsigned short OptionNum)
{return INIT_ADDIN_APPLICATION(isAppli, OptionNum);}
#pragma section


Important!
This works only with the PowerGraphic2 calculators. Put a wav (80Mhz, unsigned char) called "TEST.wav" in the flash, the overclock up to 87.5 MHz and connect the earphones/speakers.
This code is taken from MPoupe, I've just modified it a bit.
Download compiled version: http://www.file-upload.net/download-713 ... O.G1A.html
A tool to overclock (ported Pover from Prizm): http://www.casiofans.de/download/file.php?id=92
Image

Return to General

Who is online

Users browsing this forum: No registered users and 96 guests