I parsed a png formatted picture and I want to make it for my Prizm. How do I do that? What compiler do I use for the code?
Spenceboy98 wrote:
I parsed a png formatted picture and I want to make it for my Prizm. How do I do that? What compiler do I use for the code?


Here's what I suggest using as the compiler: http://www.cemetech.net/news.php?486

Basically, you'll have to feed that PNG through Sourcecoder 2.5, get the raw image data, and then display the data using Kerm's CopySprite in a loop, with Menu key breaking. Custom images cannot be loaded otherwise and viewed with the picture Add-in on the fxCG-10, but they apparently can on the fxCG-20.
The "limitation" of the CG10 is not to allow image viewing, so it is approved for exams in the USA, IIRC. The CG20 can display images with picture plot.
Oh darn.....I have CG10. Oh well
Spenceboy98 wrote:
Oh darn.....I have CG10. Oh well
That's only for the built-in Picture Plot program. If you write your own short program that you use with SourceCoder's output, it will work fine.
How would I do that? I don't think I would know how to make such a program. I am not that advanced with my Prizm yet. I just got it today. Also, is there a Casio Prizm BASIC tutorial?
Spenceboy98 wrote:
I don't think I would know how to make such a program?



Code:
#include "keyboard.hpp"

int PRGM_GetKey(){
  unsigned char buffer[12];
  PRGM_GetKey_OS( buffer );
  return ( buffer[1] & 0x0F ) * 10 + ( ( buffer[2] & 0xF0 ) >> 4 );
}

const char <name of sprite>[] = { <output from SC> };

int main() {
  while(1) {
    int key = PRGM_GetKey();
    if(key == KEY_PRGM_MENU) {  GetKey(&key); }
    CopySprite(<name of sprite>, <xposition>, <yposition>, <width>);
    Bdisp_PutDisp_DD();
  }
  return 0;
}


All you have to do is plug in the necessary information, and bam, there you go.
How do I use the SDK and what should the file extension be for the text thingy?
Spenceboy98 wrote:
How do I use the SDK and what should the file extension be for the txt thingy?
C language source files are named .c . Also, there are Casio FX-9860g BASIC tutorials, which are very, very similar to the Casio Prizm BASIC. For example, the following is essentially a Prizm BASIC tutorial, other than the Locate + color commands:

http://www.casiocalc.org/?showtopic=2448
Where do I save it to? How do I use the SDK? I WISH I KNEW HOW!!!!!!!
Spenceboy98 wrote:
I WISH I KNEW HOW!!!!!!!


Calm. Down.

Nobody wants to help someone who expects an answer in 3 seconds, and goes crazy because they can't figure something out ASAP; even some very patient people here just shrug and walk away from these people's requests.


That being said... you did follow our instructions in IRC yesterday about setting up a project folder, dumping the C file in there, adding a Makefile, and two icons?
I tried and it didn't work.....................
Spenceboy98 wrote:
I tried and it didn't work.....................


Could you pastebin us the makefile, and the build batch file you're using?
http://pastebin.com/YXVSsd0Q

That is the makefile.
Just try this then:


Code:
PREFIX=../../
CC=$(PREFIX)/bin/sh3eb-elf-gcc.exe
MKG3A=$(PREFIX)/bin/mkg3a.exe
RM=del
CFLAGS=-m3 -mb -O3 -mhitachi -Wall -nostdlib  -I$(PREFIX)/include -lfxcg -lgcc -L$(PREFIX)/lib -std=c99
MKG3AFLAGS=-i uns:Icon_U.bmp -i sel:Icon_S.bmp -n en:Spencer
LDFLAGS=$(CFLAGS) -T../common/prizm.ld -Wl,-static
CSOURCES=main.c
OBJECTS=$(CRT0:.s=.o) $(CSOURCES:.c=.o)
BIN=Spencer.bin
ADDIN=$(BIN:.bin=.g3a)

all: $(ADDIN)
   
$(BIN): $(OBJECTS)
   $(CC) $(OBJECTS) $(LDFLAGS) -o $@
   
$(ADDIN): $(BIN)
   $(MKG3A) $(MKG3AFLAGS) $< $@

.s.o:
   $(CC) -c $(CFLAGS) $< -o $@
   
.c.o:
   $(CC) -c $(CFLAGS) $< -o $@

clean:
   $(RM) $(OBJECTS) $(BIN) $(ADDIN)


All you have to change is the source file should be called main.c and the two icons should be called Icon_U.bmp and Icon_S.bmp, and then run this script:


Code:
@echo off
..\..\bin\make.exe %*
pause
@echo on


in a file called build.bat.
So......I can just copy and paste that code and just use that?
Spenceboy98 wrote:
So......I can just copy and paste that code and just use that?


Yes, the first one should be in the Makefile and the second in the build.bat like I said. BOTH go in the same folder as everything else.
I don't see build.bat, I see make.bat
Spenceboy98 wrote:
I don't see build.bat, I see make.bat


Then put it in that. Report back once you do that, tell us if it worked. And IF NOT, tell us exactly what went wrong.
It says,


Code:
makefile:16: *** missing separator.  Stop.
  
Register to Join the Conversation
Have your own thoughts to add to this or any other topic? Want to ask a question, offer a suggestion, share your own programs and projects, upload a file to the file archives, get help with calculator and computer programming, or simply chat with like-minded coders and tech and calculator enthusiasts via the site-wide AJAX SAX widget? Registration for a free Cemetech account only takes a minute.

» Go to Registration page
Page 1 of 4
» All times are UTC - 5 Hours
 
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

 

Advertisement