PDA

View Full Version : my first boing ball - C - but... FPU problem?



Tiago
23rd June 2008, 14:16
I just create my first boing ball in C with Dice.
It doesn't move yet, it's still. I works nice in Amigasys, or any emulation settings where FPU 68881 or 68882 is enable. It i remove the FPT it gives me an error.

Can it be becuse of Float variables?

I put in in a CLI with workbench/startup-sequence so you just have to reboot the adf

can someone try and give me a clue?
thanks

http://pwp.netcabo.pt/0255980901/commodore_amiga/ca-files/ca_tiago_3.adf

Buleste
23rd June 2008, 14:27
If you've used Float variables then it won't work without the FPU. I'll have a quick look to see . I still think you should give StormC or HisoftC a try. They both have help files and are much easier to use and more up to date.

Zetr0
23rd June 2008, 15:43
@Tiago

can you post the code please, and i will see if i can help..

the Float class identify will be used if you do or dont have an FPU, the math is done by the CPU instead of the FPU.

post up your code my friend... and i will see if i can help.

Harrison
23rd June 2008, 16:00
I downloaded and gave the adf a try in WinUAE with an AGA setup with 030 and FPU so I could see it working. It seemed to run quite slowly, although it did work, drawing the boing ball and then moving the classicamiga text back and forth. But once it finished and went back to the CLI window it crashed WinUAE and I had to reboot the PC before WinUAE would load again.

Definitely looks like you have something going wrong in the code. Memory leak? Infinite loop? calling something that the Amiga/emulator doesn't like?

Tiago
23rd June 2008, 20:03
went back to the CLI window it crashed WinUAE

:lol: :lol: uauuu, powerfull demo! he he he

Ok Zetro, when i get home i'll send you the code, but i dont believe you will understand it, i don't understand a s*** of C, so i do it in 500 lines, when i'm sure 200 is enough...

Well i dont know C but i wanted to do a Boing Ball ... i had to do it.... :D

Buleste
23rd June 2008, 21:37
When you compiled with dcc did you use the -lm option? e.g "dcc tiago.c -lm -o tiago"

Tiago
23rd June 2008, 23:39
When you compiled with dcc did you use the -lm option? e.g "dcc tiago.c -lm -o tiago"

:hmmm:
the compiler i used is graphical, it's not a command line.
The only optins/settings i chouse was:

os target: 3.0
cpu target: 68020

nothing more, the rest of the options are default....

I think i must try the other compiler you were talking about :blink:

C is not easy.... :nono:

Zetr0
24th June 2008, 00:31
I can code in the following languages


8703 ASM
68000 ASM
Blue J
C
C++
ColBol
Delphi
IBM: AS400 / SYS32 / SYS38 ASM
IBM: CL
IBM: RPG3
Java
J++
Pascal
QDOS
Z80 ASM
Z80 Basic


to name but a few, thats not including web-based languages.... which i know quite a few :D

profesisonally i have programmed in C / C++, Blue J and Java and all the IBM languages mentioned above.

Web based, ASP, JSP, HTML, DHTLM, XML, XHTML, etc etc etc....

I am a coder by nature :D so... and i used to lecture an accellerated C / C++ compaion study at the local College :D

Buleste
24th June 2008, 10:15
When you compiled with dcc did you use the -lm option? e.g "dcc tiago.c -lm -o tiago"

:hmmm:
the compiler i used is graphical, it's not a command line.
The only options/settings i choose was:

os target: 3.0
cpu target: 68020

nothing more, the rest of the options are default....

I think i must try the other compiler you were talking about :blink:

C is not easy.... :nono:

C can be easy but DICE isn't. This is why i suggest you try one of the other packages.

Zetr0
24th June 2008, 10:32
I used to use DICE on my miggy.... that and storm C

I found Dice quite quick in prototyping an idea and stormC was better way to handle the project!

I could probalby dig up some old graphic code when you feel confident enought Tiago :)