Author Topic: Compiling stuff for Prizm  (Read 74232 times)

0 Members and 2 Guests are viewing this topic.

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Compiling stuff for Prizm
« Reply #45 on: June 13, 2011, 04:41:11 pm »
Nice what is the address for direct line access. I had tried port Q earlier, but wasn't getting any feedback. I will though be testing the SIOF later because that can play .wav files.
Because the programming of the pin function controller is involved, I think it would be best to refer to the source of insight. See function "F17_Handler()".
« Last Edit: June 13, 2011, 04:43:21 pm by SimonLothar »
I'll be back.

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Compiling stuff for Prizm
« Reply #46 on: June 14, 2011, 07:47:17 am »
Does it means we can now have music on-calc? O.O
I wrote wav player for 9860 some time ago. I attach source code.  I hope it can be ported to cg :-)

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Compiling stuff for Prizm
« Reply #47 on: June 14, 2011, 01:00:42 pm »
Does it means we can now have music on-calc? O.O
I wrote wav player for 9860 some time ago. I attach source code.  I hope it can be ported to cg :-)

The 7705.h (alas it's not included in your rar) has to be replaced by some 7305.h. The syscall-numbers have to be adjusted. SCIF2 is fairly compatible (only two register addresses have been changed on the 7305). The addresses of the interrupt priority registers are different and on the 7730 there are three more to save and restore. TMU- and WDT-addresses should be adjustable, too.
The 7305 FRQCR is incompatible to the 7705's. Hence its programming has to be reconsidered.




I'll be back.

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Compiling stuff for Prizm
« Reply #48 on: June 23, 2011, 04:02:10 am »
Hello,
I am trying to write something slightly bigger than "hello word" for cg, I use Simon's mini-Prizm-SDK. I would like to ask:
1. Is it possible to build program from .c sources ? I do not use C++ features so I would like to save room by removing C++ support. I tried to rename the project.cpp (autogenerated source) to .c and edit project.ini (both, manually and by the build tool), but it always asked me to provide project.cpp file.

2. Is it possible to build program from multiple sources (and link together)? I see that Insight has more source files, but I was unable to include additional source to mu project. I tried the GUI build tool (=not manualy editing/hacking the project.ini).

3. How to add new syscalls ? Is there some recommended way how to add new syscall to the SDK ? There are many syscalls, which are perfectly documented in the help file, but they are not included in the header (for example serial communication).

I am asking for recommended ways, because I would like to keep my sources compatible with mini-Prizm-SDK to enable another users to build it.

And one additional question for everybody: How do you debug your project for cg calculator ?

Martin

Offline JosJuice

  • LV10 31337 u53r (Next: 2000)
  • **********
  • Posts: 1344
  • Rating: +66/-14
    • View Profile
Re: Compiling stuff for Prizm
« Reply #49 on: June 23, 2011, 04:21:27 am »
And one additional question for everybody: How do you debug your project for cg calculator ?
I think most of us simply run the program on the actual calculator. The only existing fx-CG emulator is the fx-CG Manager PLUS by Casio, which is intended for education and does not offer any debug features. Sometimes it also runs add-ins a bit differently when compared to the calc, but it is in fact a real emulator. Sadly, it isn't free.

Offline AngelFish

  • Is this my custom title?
  • Administrator
  • LV12 Extreme Poster (Next: 5000)
  • ************
  • Posts: 3242
  • Rating: +270/-27
  • I'm a Fishbot
    • View Profile
Re: Compiling stuff for Prizm
« Reply #50 on: June 23, 2011, 12:09:00 pm »
Actually, the KPIT GNU tools have a very nice debugger. You have to play around with them a bit in order to get the CPU simulator working, though.
∂²Ψ    -(2m(V(x)-E)Ψ
---  = -------------
∂x²        ℏ²Ψ

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Compiling stuff for Prizm
« Reply #51 on: June 23, 2011, 01:38:00 pm »
Hello,
I am trying to write something slightly bigger than "hello word" for cg, I use Simon's mini-Prizm-SDK. I would like to ask:
1. Is it possible to build program from .c sources ? I do not use C++ features so I would like to save room by removing C++ support. I tried to rename the project.cpp (autogenerated source) to .c and edit project.ini (both, manually and by the build tool), but it always asked me to provide project.cpp file.
Why do you need .c sources. The C++ compiler has no disadvantages and is able to process c-sources as well (without the need of implementing the special abilities of C++).

2. Is it possible to build program from multiple sources (and link together)? I see that Insight has more source files, but I was unable to include additional source to mu project. I tried the GUI build tool (=not manualy editing/hacking the project.ini).
It is possible, but I must admit, that it is not well documented. The mini-SDK allows several ways to include multi-sources. But flexibility requires a lot of documentation. Gimme some time. In the next CHM-file, I will add some hints. My mini-SDK is complex. I need a very flexible tool to provide and verify the information we all need to master the Prizm. I'll try to enhance the documentation.

3. How to add new syscalls ? Is there some recommended way how to add new syscall to the SDK ? There are many syscalls, which are perfectly documented in the help file, but they are not included in the header (for example serial communication).
Select File/Full Setup
Select the Tab syscall-library
Position the cursor to the syscall where you want to insert a new syscall.
Hit INSERT.
Enter the syscall number in hex in column "Key" (f. i. 1E6A).
Enter the syscall definition in column "Value".
The syscall definition starts with the interface, f. i. in case of 1E6A void DisplayMainMenu( void ).
Then enter a a semicolon.
The next item following the semicolon defines the headerfile, where the interface has to be stored. Ususally this is an alias, f. i. $(SYSTEM_SC). See at the begin of the syscall-library-list to find the actual header-file names.
The third item following the second semicolon represents the syscalls timestamp. Leave it empty, if you insert a new syscall. The system uses the timestamp to decide, if a rebuild of the syscall is necessary. Usually it is maintained automatically.
Finally hit the SAVE-button.
The next build with F9 should  include the previously added syscall in the library.

---
Sorry, if my mini-SDK is too inconvenient. I cannot help it. I need it's flexibility to find the information we all need. I hope some of you agree. And I hope even my mini-SDK could help the one and the other in their progress to do better.
I like cfxm's extremly lean micro-SDK. And I like the KPIT/GNU/GCC tool developments, though I am a friend of the lean one's.
« Last Edit: June 23, 2011, 01:41:43 pm by SimonLothar »
I'll be back.

Offline MPoupe

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 168
  • Rating: +30/-1
  • The coder of yesterday
    • View Profile
    • My web site about Casio calculator
Re: Compiling stuff for Prizm
« Reply #52 on: June 24, 2011, 07:03:00 am »
Simon, thank you for reply.
I use C sources because I would like to make the result binary as small as possible. It is probably not needed now, but it is my practice/tradition.
I do not think your SDK is inconvenient. You should see my old disassembler of cfx9850G ROM dump. Or better you shouldn't :-)

Offline Munchor

  • LV13 Extreme Addict (Next: 9001)
  • *************
  • Posts: 6199
  • Rating: +295/-121
  • Code Recycler
    • View Profile
Re: Compiling stuff for Prizm
« Reply #53 on: June 24, 2011, 07:24:48 am »
Hello,
I am trying to write something slightly bigger than "hello word" for cg, I use Simon's mini-Prizm-SDK. I would like to ask:
1. Is it possible to build program from .c sources ? I do not use C++ features so I would like to save room by removing C++ support. I tried to rename the project.cpp (autogenerated source) to .c and edit project.ini (both, manually and by the build tool), but it always asked me to provide project.cpp file.
Why do you need .c sources. The C++ compiler has no disadvantages and is able to process c-sources as well (without the need of implementing the special abilities of C++).

So the PRIZM can use C++?

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Compiling stuff for Prizm
« Reply #54 on: June 24, 2011, 09:04:15 am »
2. Is it possible to build program from multiple sources (and link together)? I see that Insight has more source files, but I was unable to include additional source to mu project. I tried the GUI build tool (=not manualy editing/hacking the project.ini).
If you select "Full Setup/Project-compile/Source-Files", you can insert a new line (INSERT-key) and either fill the name of the sourcefile into the value-field or select a file from a file-select-dialog using the ellipsis-button. It is very similar to the old fx9860-SDK. You can add CPP- and SRC-files. Do not forget to save the setup.
I'll be back.

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Compiling stuff for Prizm
« Reply #55 on: June 24, 2011, 09:33:07 am »
So the PRIZM can use C++?
I used object oriented code on the fx9860-types very extensively. And I had no problems with some experimental object oriented code on the Prizm, yet. Usually it depends on the compiler/linker/library-system, whether a C++ source can be transferred into a G3A successfully. The hardware, especially if it is more powerful, shouldn't be a problem.
I'll be back.

Offline SimonLothar

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 129
  • Rating: +35/-1
    • View Profile
Re: Compiling stuff for Prizm
« Reply #56 on: July 03, 2011, 07:13:15 am »
A mini-Prizm-SDK (version 1.09).

New with version 1.09:
Some news concerning timers (see the CHM-file).
C++ example code. An object oriented ASCIIZZ-class. An object oriented base ListViewer and some derived classes (f. i. MCS and memory-Viewer).
How to use the status area (controlling Text, Icons and Glyphs). Example code in INSIGHT.
Hint: the Bfile_FindFirst- and Bfile_FindNext-syscallnumbers previously published are not the perfect ones. Use 0x1DB7 instead of 0x1DB6 and 0x1DB9 instead of 0x1DB8.
cfxm asked me to add an option to INSIGHT to invoke the testmode (found by cfxm). See:
https://ourl.ca/9404/220269
« Last Edit: March 26, 2018, 10:25:38 am by Eeems »
I'll be back.

Offline DJ Omnimaga

  • Clacualters are teh gr33t
  • CoT Emeritus
  • LV15 Omnimagician (Next: --)
  • *
  • Posts: 55943
  • Rating: +3154/-232
  • CodeWalrus founder & retired Omnimaga founder
    • View Profile
    • Dream of Omnimaga Music
Re: Compiling stuff for Prizm
« Reply #57 on: July 07, 2011, 01:57:31 pm »
THis is nice. Glad to see new updates :)

By the way sorry if I do not reply much here anymore. I unfortunately have quit calculator related stuff as a whole now, and hardly check on new stuff anymore (usually it's just for front page news)

Offline z80man

  • Casio Traitor
  • LV8 Addict (Next: 1000)
  • ********
  • Posts: 977
  • Rating: +85/-3
    • View Profile
Re: Compiling stuff for Prizm
« Reply #58 on: July 08, 2011, 12:46:11 am »
Isn't the static RAM address supposed to be the bottom of the g3a stack. Or has that now changed to a new location?

List of stuff I need to do before September:
1. Finish the Emulator of the Casio Prizm (in active development)
2. Finish the the SH3 asm IDE/assembler/linker program (in active development)
3. Create a partial Java virtual machine  for the Prizm (not started)
4. Create Axe for the Prizm with an Axe legacy mode (in planning phase)
5. Develop a large set of C and asm libraries for the Prizm (some progress)
6. Create an emulator of the 83+ for the Prizm (not started)
7. Create a well polished game that showcases the ability of the Casio Prizm (not started)

Offline fxdev

  • LV4 Regular (Next: 200)
  • ****
  • Posts: 177
  • Rating: +34/-6
    • View Profile
Re: Compiling stuff for Prizm
« Reply #59 on: July 08, 2011, 05:16:08 am »
This only affects so called RAM files which are not stored on the flash chip.
According to Simon, 0x88160000 was the bottom of the add-in stack - this has now changed to 0xE5200000 (purpose unknown).
« Last Edit: July 08, 2011, 05:18:32 am by cfxm »