Go to Post In fact, one of our volunteers just found out about the entire FIRST program two weeks ago and had so much fun on Thursday that he came back on Friday to help us again! - KathieK [more]
Home
Go Back   Chief Delphi > Technical > Programming
CD-Media   CD-Spy  
portal register members calendar search Today's Posts Mark Forums Read FAQ rules

 
Closed Thread
Thread Tools Rate Thread Display Modes
  #1   Spotlight this post!  
Unread 20-06-2002, 16:16
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
emulationFIRST (aka PBasic emulator)

I'm finally ready to release the first version (0.01) of my PBasic emulation also known as emulationFIRST (like we didn't have enough bad puns on the FIRST name already). So far, I've got it to run the DefaultProgram.bsx (the one provided by InnovationFIRST). This does not implement too many more features than required to run the DefaultProgram.bsx. However, I would like to have some help in figuring out what I need to add and also to figure out where bugs in the program lie. I do know that it leaks memory like crazy but I haven't been able to get it to crash. I'd like to know where it fails in your program and for what reason (doesn't parse the code right, unimplemented feature, etc.).

At the moment, the only interface is via a text-based console (ie, you run it via command.com). You provide it the name of your PBasic file and it will prompt you for inputs everytime it hits a Serin and will output values everytime it finds a Serout.

I do plan to implement the rest of the features that are used in FIRST programs but that is obviously a matter of time and version numbers. Also, a GUI is planned for the near future but I wanted to get the actual parser working correctly before I started on anything like that.

There are binaries available for both Windows and Linux as well as the source code. The provided code will only compile under Linux at the moment (I need to merge some changes back in that are required to make it compile on Windows).

As far as architectural details go, it used bison (a general-purpose parser generator) and flex (a lexical analyzer) as well as C code. It makes use of only one non-ANSI C call (strcasecmp or _stricmp on Windows; does anyone know a good case insensitive string compare call?) so should compile easily on all platforms with minimal effort.

Any help you can provide is greatly appreciated. The program can be found here: http://www.rit.edu/~msl8101/emulationFIRST/

Matt
  #2   Spotlight this post!  
Unread 20-06-2002, 21:34
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
hmm, when i run the program, it gives me a bunch of errors, but i think it's cause i'm using unsupported commands. otherwise, it seems to work fine. good work, hope you can get the GUI version out soon .
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #3   Spotlight this post!  
Unread 21-06-2002, 08:31
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
If you send me your code I can run it through my copy and see where it bombs out and try to implement those features. Or if you just want to tell me what's causing it to bomb out. I'll probably add features on much more of a request basis as I'd like to add what people want first.

Matt
  #4   Spotlight this post!  
Unread 21-06-2002, 10:58
Ian W. Ian W. is offline
College? What?
no team (Gompei and the Herd)
Team Role: College Student
 
Join Date: Jan 2002
Rookie Year: 2002
Location: Worcester, MA | Smithtown, NY
Posts: 1,464
Ian W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to allIan W. is a name known to all
Send a message via AIM to Ian W.
i'm not exactly sure where it's screwing up, but i think it's mostly just the eeprom (i used that), because that was really the only advanced feature i used. since this was my first year, and i had learn everything myself, i didn't learn the cool things (like MIN, MAX, etc) until after the code worked. of course, after it all worked, no one let me touch it .
__________________
AIM --> Woloi
Email --> ian@woloschin.com
  #5   Spotlight this post!  
Unread 21-06-2002, 14:00
Unsung FIRST Hero
Matt Leese Matt Leese is offline
Been-In-FIRST-Too-Long
FRC #1438 (The Aztechs)
Team Role: Engineer
 
Join Date: May 2001
Rookie Year: 1998
Location: Long Beach, CA
Posts: 937
Matt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond reputeMatt Leese has a reputation beyond repute
Send a message via AIM to Matt Leese
Whenever it reaches a parse error, it will output "Parse error" and then the line and column that it first occurred on. If you correlate that to your code, it'd be helpful.

Matt
  #6   Spotlight this post!  
Unread 30-06-2002, 12:06
rbayer's Avatar Unsung FIRST Hero
rbayer rbayer is offline
Blood, Sweat, and Code
no team (Teamless Orphan)
 
Join Date: Mar 2002
Rookie Year: 2001
Location: Minnetonka, MN
Posts: 1,087
rbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of lightrbayer is a glorious beacon of light
Send a message via AIM to rbayer
Re: emulationFIRST (aka PBasic emulator)

Quote:
Originally posted by Matt Leese


As far as architectural details go, it used bison (a general-purpose parser generator) and flex (a lexical analyzer) as well as C code. It makes use of only one non-ANSI C call (strcasecmp or _stricmp on Windows; does anyone know a good case insensitive string compare call?) so should compile easily on all platforms with minimal effort.

When writing my emulator, I ran into the same thing, so I just converted EVERYTHING to uppercase before doing any sort of work on it. PBASIC is case-insensitive anyway, and it seems to work just fine. Anyway, just my 2c.
__________________
New C-based RoboEmu2 (code simulator) available at: http://www.robbayer.com/software.php
Closed Thread


Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Use of the AKA Profile Field Brandon Martus Announcements 0 30-07-2003 22:54
RoboEmu for Linux (PBASIC emulator) rbayer Programming 5 21-11-2002 21:08
RoboEmu v.1a (another PBASIC emulator) rbayer Programming 0 07-07-2002 00:45
Need list of feature for PBASIC emulator. rbayer Programming 37 20-06-2002 16:17
Is there going to be a PBasic emulator out there?? Matt Attallah Programming 7 14-12-2001 13:20


All times are GMT -5. The time now is 04:38.

The Chief Delphi Forums are sponsored by Innovation First International, Inc.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2017, Jelsoft Enterprises Ltd.
Copyright © Chief Delphi