 |
Castle Paradox
|
View previous topic :: View next topic |
Author |
Message |
chronoboy Into the past with a splash

Joined: 04 Jun 2010 Posts: 162 Location: Canada
|
Posted: Wed Nov 10, 2010 3:46 pm Post subject: Have you ever heard of Parrot? |
|
|
I was reading around the net this evening on virtual machines and such and came across this very interesting project called Parrot.
Before the mods move this article, please finish reading it as it does relate to OHRRPGCE development, and is very technical in nature.
Parrot is a virtual machine which has been around for a few years now, since it's inception, many programming languages have been ported to it's virtual machine... And what do I see has been ported to it? QuickBasic 4.5 out of all things.
Okay, so now since Parrot can easily be cross-compiled to many platforms, as simply as the Java VM can now be(Java has been open sourced recently). I am wondering if it would be possible to compile an older version of OHR, one that can be compiled on QuickBasic 4.5.
I see this being an interesting experiment to see how capable Parrot might be and even benchmark it with a native DOS version to see performance differences.
Perhaps Parrot might be a way to cross-compile OHR to other platforms and processors. The source code for the QuickBasic 4.5 compiler in Parrot is available. Technically, a fork and modifications to support newer FreeBASIC statements should yield a Virtual Machine capable of running the latest and greatest OHR releases without any re-coding effort, just add that new FB statement into the VM and re-compile OHR.
Over the next few days during my free time, I will play with the QB45 compatible OHR source and Parrot and post any updates to see if this is a viable solution to run OHR away from the Intel platform.
Parrot's website can be found here: http://www.parrot.org/
UPDATE: Well it seems most of the functionality needed to make OHR work are currently missing. However, since there is working code, adding them should not be as much effort as doing everything from scratch. Here is the latest README file on the project, I have also sent an Email to the maintainer(which was bounced back):
https://github.com/parrot/parrot/blob/RELEASE_0_9_1/languages/BASIC/compiler/BASIC_README
I'll take a look at the code and see if I am able to program it effectively. My first effort will be to definitely make the QB45 version of OHR compile and run in Parrot. After which I will work on making newer versions of OHR compatible with it, perhaps at one point releasing a Parrot version along side the OHR release. Parrot can make binary files such as EXE and ELFs. The Parrot versions will be mainly for non-Intel devices, where FreeBASIC is not currently an option. _________________ Current project: Chronoboy Adventures
Website: http://www.chronoboy.com/ |
|
Back to top |
|
 |
TMC On the Verge of Insanity
Joined: 05 Apr 2003 Posts: 3240 Location: Matakana
|
Posted: Thu Nov 11, 2010 12:07 am Post subject: |
|
|
chronoboy wrote: | Before the mods move this article, please finish reading it as it does relate to OHRRPGCE development, and is very technical in nature. |
Yeah, probably the wrong forum :P
Yes, I've heard of Parrot. I looked into a lot of VMs before deciding to writing my own for HamsterSpeak. Yet Parrot was probably the better alternative. I was sure that you were about to attempt to talk me into using Parrot instead!
Quote: | Perhaps Parrot might be a way to cross-compile OHR to other platforms and processors. The source code for the QuickBasic 4.5 compiler in Parrot is available. Technically, a fork and modifications to support newer FreeBASIC statements should yield a Virtual Machine capable of running the latest and greatest OHR releases without any re-coding effort, just add that new FB statement into the VM and re-compile OHR. |
You're enormously underestimating how much effort it would be to reimplement FB in Parrot. An enormous amount of work. You should just forget it; based on the README file for this QB-like language (which sounds like just a toy), it's not a good base to write an FB implementation on top off. There are much better options for getting FB running on other architectures, such as the almost working C emitter.
You won't manage to get the QB versions of the OHR to run on this, because they are dependent on a library written in assembly. However, you might have some success by using a copy of the OHR source from when it supported both QB and FB. That way you can use the FB reimplementation of allmodex, and we used hardly any FB features back then. As a bonus, many of the same keywords that this QB implemention does not support (eg. bsave, bload) are ones which "FBOHR" replaces with FB versions. I assume it would be possible to call from parrot to FB's graphics library (as it was back then, which I think was the only working graphics backend we had), although I suspect even just that part will be a lot of work. So you may succeed here, but this is still a huge task! _________________ "It is so great it is insanely great." |
|
Back to top |
|
 |
Bob the Hamster OHRRPGCE Developer

Joined: 22 Feb 2003 Posts: 2526 Location: Hamster Republic (Southern California Enclave)
|
Posted: Thu Nov 11, 2010 9:54 am Post subject: |
|
|
The last version of the OHRRPGCE that could be compiled on QuickBasic was 'hasta-la-qb'. it was released a little more than 4 years ago, so any possible Parrot port of it would only be useful for games that are at least that old. Nothing newer would work. |
|
Back to top |
|
 |
|
|
You can post new topics in this forum You can 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
|
Powered by phpBB © 2001, 2005 phpBB Group
|