Problem with importing RIC file.

Discussion specific to NXT-G, NXC, NBC, RobotC, Lejos, and more.
Post Reply
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

Problem with importing RIC file.

Post by schodet »

I have a problem when trying to #import Swearing.ric from the standard firmware to an array. Here is the code:

Code: Select all

#import "Swearing.ric" ric

task main ()    
{       
    GraphicArrayOut(0, 0, ric);
    while (!ButtonCount (BTNCENTER, true))
        ;
}
If I compile with "nbc -EF -L=ricbug.lst ricbug.nxc" (version svn606), I can see a strange byte in the listing:

Code: Select all

ric     byte[]  0x8, 0x0, 0x0, 0x0, 0x0, 0x0, 0x3A, 0x0, 0x30, 0x0, 0x188, <--- 0x188 > 0xff !
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
spillerrec
Posts: 358
Joined: 01 Oct 2010, 06:37
Location: Denmark
Contact:

Re: Problem with importing RIC file.

Post by spillerrec »

It should have been two bytes, 0x88 and 0x01. This correspond to the value 0x0188.
I'm not seeing this behavior in 3.3.8.10 13-12-2011 or 3.3.8.10 05-02-2012 though, when compiling in BCC it specifies it as two separate bytes in both versions. And it behaves as intended on the NXT too.
My blog: http://spillerrec.dk/category/lego/
RICcreator, an alternative to nxtRICeditV2: http://riccreator.sourceforge.net/
afanofosc
Site Admin
Posts: 1256
Joined: 26 Sep 2010, 19:36
Location: Nashville, TN
Contact:

Re: Problem with importing RIC file.

Post by afanofosc »

It is possible that this is a bug in the FreePascal build that does not exist in the Delphi build. The Windows builds are all created using Delphi but Mac OSX and Linux are created using FreePascal. It also could depend on the version of FreePascal that you use to build the compiler.

Can you comment on which platform you are using (iirc Linux) and what version of the FreePascal compiler you have installed?

John Hansen
Multi-platform LEGO MINDSTORMS programming
http://bricxcc.sourceforge.net/
schodet
Posts: 139
Joined: 29 Sep 2010, 11:21
Contact:

Re: Problem with importing RIC file.

Post by schodet »

afanofosc wrote:It is possible that this is a bug in the FreePascal build that does not exist in the Delphi build. The Windows builds are all created using Delphi but Mac OSX and Linux are created using FreePascal. It also could depend on the version of FreePascal that you use to build the compiler.
Can you comment on which platform you are using (iirc Linux) and what version of the FreePascal compiler you have installed?
I use Slavko debian packages, I think this is 2.4.0.

Sorry for the late response.
LEGO things http://ni.fr.eu.org/lego/ - NXT Improved Firmware (GCC) http://nxt-firmware.ni.fr.eu.org/ - Other robots http://apbteam.org
Post Reply

Who is online

Users browsing this forum: No registered users and 20 guests