GroovyBee Posted January 12, 2013 Share Posted January 12, 2013 After 10 minutes of work (mainly having to wait for a machine reboot after installing software) it appears the answer is "Yes!" but it needs a bit more work. As these things do . So.... I downloaded BCX from here. BCX is a BASIC to "C" converter. Its a modern dialect of BASIC but I haven't looked at anything beyond that. Its an 11M download but that does include several editors, a form generator, help etc. as well as the command line tool of interest bc.exe. A quick look at help and a conversion of s00.bas using the command line :- bc.exe s00.bas -x -n -f:s00.c Results in a "C" file that relies on being linked to an BCX external support library for some of the commands used in the basic language like locate, cls etc. and has minimal header file requirement too. At this stage you'd need a 2nd tool to work on the "C" file to automatically comment out the win32 header files that aren't on the jag (for obvious reasons) and to also include a yet to be written header file (using bcx.ini might go some way towards this goal). The new header file would contain a selection of #defines for the functions in the BCX external library. Over time those #define'd functions could be replaced with real code to achieve the expected functionality. Once the 2nd tool has done its job the end result could be compiled for the jag using the VBCC or GNU compiler systems, linked to the removers standard "C" library, the "BCX2JAG library" (to be written) and then downloaded to the jag. I'm guessing that BCX won't care about functions not within its known set (provided they parse correctly) so calling custom written jag hardware specific functions to handle sprites, music etc. shouldn't be a problem. Hmmmmm... BASIC + RAPTOR anybody? 6 Quote Link to comment Share on other sites More sharing options...
sh3-rg Posted January 12, 2013 Share Posted January 12, 2013 /me holds hand up! Quote Link to comment Share on other sites More sharing options...
ggn Posted January 12, 2013 Share Posted January 12, 2013 So what will happen if you have the time to, say, install windows xp on a old PC with slow hard drive? Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 12, 2013 Author Share Posted January 12, 2013 The other thing I forgot to mention is that BCX is written in the BCX language and can convert itself to "C". So the 2nd tool may not be required if the BCX source code can be changed to make it more jag specific with respect to headers and such. Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 12, 2013 Author Share Posted January 12, 2013 So what will happen if you have the time to, say, install windows xp on a old PC with slow hard drive? You too can program in BASIC on the jag! Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted January 13, 2013 Share Posted January 13, 2013 BASIC + RAPTOR = WIN! Jagtari Basic I'm up for that if you want to collaborate. 1 Quote Link to comment Share on other sites More sharing options...
Christos Posted January 13, 2013 Share Posted January 13, 2013 X11 Basic also converts to C. Maybe that's also feasible? Take a look GB.. http://x11-basic.sourceforge.net/ 2 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 13, 2013 Author Share Posted January 13, 2013 X11 Basic also converts to C. Maybe that's also feasible? Take a look GB.. http://x11-basic.sourceforge.net/ Thanks for the link. I'll take a look at it later. The website says that its based on GFA syntax which I used a lot (on the ST) back in the day. Quote Link to comment Share on other sites More sharing options...
Christos Posted January 13, 2013 Share Posted January 13, 2013 Thanks for the link. I'll take a look at it later. The website says that its based on GFA syntax which I used a lot (on the ST) back in the day. Yep, I've converted a couple of programs with minor syntax changes and they worked flawlessly. It would be nice to have! Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 13, 2013 Author Share Posted January 13, 2013 It'll still need support libraries to link against for execution on the jag so that you can handle sprites, graphics, sounds and the like. Once RAPTOR has a "C" wrapper that will be a much easier task. 1 Quote Link to comment Share on other sites More sharing options...
wozencl Posted January 13, 2013 Share Posted January 13, 2013 Well I suppose the end justifies the means. Quote Link to comment Share on other sites More sharing options...
Tyrant Posted January 18, 2013 Share Posted January 18, 2013 I once considered trying to write a FORTH interpreter for the Jag, it should be fairly easy, since 90% of FORTH is written in FORTH, and you only need a handful of assembly routines to bootstrap it onto new hardware... but then I realised the hassles of trying to hook up a keyboard to the Jag (Skunkboard USB maybe?) and forgot about the whole thing. Besides, everyone would have to learn FORTH then, and they'd still be better off with assembly. Quote Link to comment Share on other sites More sharing options...
Tursi Posted January 18, 2013 Share Posted January 18, 2013 I actually did the same thing, Tyrant, I was going to port a nice little kernel that had been written for the TI, all indications were that it'd fit nicely in the GPU and could run out of there. But.. yeah. Learning Forth works for some people but not others, and still needs all the libraries and an input device... Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted January 18, 2013 Share Posted January 18, 2013 Very, very cool! I'll definitely be lurking in this thread to see how BCX turns out. If it can be ported to Jag then the XBOX360 gets ripped from its roost and my Jag goes back where it belongs. UPDATE: Er, better yet, is there any way a BASIC snob like me can help? Can I butter up GroovyBee with gifts or money? 1 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 18, 2013 Author Share Posted January 18, 2013 UPDATE: Er, better yet, is there any way a BASIC snob like me can help? Learn enough "C" to patch the output of BCX into something useful and then forget it all and continue in basic . Can I butter up GroovyBee with gifts or money? 2 Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted January 18, 2013 Share Posted January 18, 2013 I'll start fooling around with BCX to get acquainted with it. Seems like a good gateway drug to C development. I also noticed this QBasic to C++ translator: http://sourceforge.net/projects/qbasictoc/ 2 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 18, 2013 Author Share Posted January 18, 2013 Personally I'd avoid C++ on the jag due to the extra overhead in the parameter passing in classes. You'd be better served enabling VBCC's C99 compatibility mode instead. 1 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted January 19, 2013 Share Posted January 19, 2013 UPDATE: Er, better yet, is there any way a BASIC snob like me can help? Can I butter up GroovyBee with gifts or money? I'm not helping unless I get gifts too! 6 Quote Link to comment Share on other sites More sharing options...
wozencl Posted January 20, 2013 Share Posted January 20, 2013 I think people are missing the point of this and taking it seriously now. Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 20, 2013 Author Share Posted January 20, 2013 I think people are missing the point of this and taking it seriously now. I'm certainly not taking it seriously. Quote Link to comment Share on other sites More sharing options...
wozencl Posted January 20, 2013 Share Posted January 20, 2013 I know but someone might and that does scare me. 1 Quote Link to comment Share on other sites More sharing options...
+CyranoJ Posted January 21, 2013 Share Posted January 21, 2013 Serious enough to send gifts? 2 Quote Link to comment Share on other sites More sharing options...
wozencl Posted January 21, 2013 Share Posted January 21, 2013 In this well-rounded and generous community nothing would surprise me. Quote Link to comment Share on other sites More sharing options...
+Gemintronic Posted January 21, 2013 Share Posted January 21, 2013 Serious enough to send gifts? Sorry, didn't know this was a joke topic. I haven't delved deep enough into C or BCX to be of any testing help. Gifts were the only other way I could think of to assist. Some argue that ease of coding leads to poor games. I say more beginners leads to more experts. Thus a clear need for higher level languages like BASIC. 2 Quote Link to comment Share on other sites More sharing options...
GroovyBee Posted January 21, 2013 Author Share Posted January 21, 2013 Sorry, didn't know this was a joke topic. Just because some of us aren't taking it seriously doesn't mean its a joke topic. For BCX to be any use on the jag it needs a hardware specific library to hook into for handling controllers, sprites, collision detection, sound and so on. Which in turn means that same library has to be accessible in "C" otherwise it's a project that isn't going to fly. The easiest way to do that is for someone to add a "C" wrapper onto Reboot's RAPTOR and also the U235 Sound Engine. I have already done the "C" wrapper for the U235 Sound Engine and I'm pencilled in for the RAPTOR one as well. Once those are done its a matter of a few example mini games in "C" to show coders what they need to do to make 2D games. Then a layer for BASIC needs to be done. After that BCX is truly viable as a development for jag game creation because any deficiencies in language conversion and the overhead of "C" in general can be traded against the speed of RAPTOR. That way "C"/BASIC can be used for the game's AI and logic while the speed critical stuff is in 68K, GPU and DSP assembly languages. I haven't delved deep enough into C or BCX to be of any testing help. But is you took on the project you'd get help from a few of us. Thats what its all about . Gifts were the only other way I could think of to assist. Its very kind to offer but gifts don't motivate me or the guys from either Reboot or U235. If a project is fun/difficult/interesting/simple/quick (fun is always mandatory ) to do then that is more likely to work. We also have lives outside the forums so some things take time to get done too. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.