Jump to content
IGNORED

SecondBASIC, a Sega Genesis/Mega Drive compiler


Recommended Posts

Hey Everyone!

 

As some of you may know, I've been developing some new games for the Sega Genesis/Mega Drive for the last few years using Basiegaxorz (BEX), but as some of you may know, BEX hasn't been supported/updated since around 2011. Back last year, when Stef released his XGM driver and BEX wrapper, some issues with BEX really came to light - when the source code exceeded 32kb, you'd get a compilation error (BSR command) if you have a function outside of the space.

 

I wrote a quick app to change the BSR command to JSR, but I didn't like the idea of having to run a secondary program to get the compiler to work without that error (plus there are a few other small things that have been fixed and a few more that will be fixed in upcoming versions and patch releases).

 

I began early development back in October 2015, and finally finished it back in Feb/March time, with a few patch releases since then. I advertised SecondBASIC on a few programming forums, and have been holding out on the forums I don't frequent too often, until I felt it was a stable enough release, which is now :)

 

You can download SecondBASIC from the Second Dimension website: http://www.second-dimension.com/sbasic/

There's also a patch update that you'll need to download as well (replace the SecondBASIC.exe in the program folder that you installed it to with the patch file).

 

Here's a demo of Handy Harvy, which is now being programmed in SecondBASIC:

 

So what are some features of SecondBASIC?

  • Stef's XGM driver is built in (with the permission of Stef). This means you don't need to worry about including the BASIC wrapper or using ASM to set up the files, but instead you have commands to take care of all of that for you. This version of XGM runs on the z80, which clone hardware emulates poorly, so music will play significantly faster than on the original hardware. Stef has fixed this with his latest version of XGM, but I'm not sure this will get updated in SecondBASIC - I need to contact Stef about this :)
  • Sine/Cosine/Tangent path generator
  • Palette tools to let you create a palette in the IDE and insert it into your code (or the clipboard if you don't want to insert it where the text cursor is). You can also generate the palettes data for a fade routine.
  • New commands and updated commands to add more functionality, such as ShadowMode, or even loading tile data from a variable.
  • And more!

This is also why Project KO and Handy Harvy have been delayed, because I wanted to finish up SecondBASIC to help make development easier, and hopefully quicker :)

 

If you have any questions on SecondBASIC, I do urge you to post on the Second Dimension forums as I check those daily (sometimes I go a day or 2 without checking), but posting them in this thread is okay as well, though it may be a little while before I see them, or you can email me at adam [at] second - dimension [dot] com :)

 

Cheers!

  • Like 2

Wait wait, Second BASIC is capable of graphics like these?! I've seen games designed with the last Genesis BASIC, and, uh, wasn't impressed. I think Crazy Bus was one of the titles designed in Basiegaxor (damn I hate that name), and it's widely reviled as one of the worst releases on the system.

 

So you could make full-fledged games with this? How are the graphics tools? And can this BASIC support six button controllers?

  • Like 1

Wait wait, Second BASIC is capable of graphics like these?! I've seen games designed with the last Genesis BASIC, and, uh, wasn't impressed. I think Crazy Bus was one of the titles designed in Basiegaxor (damn I hate that name), and it's widely reviled as one of the worst releases on the system.

 

So you could make full-fledged games with this? How are the graphics tools? And can this BASIC support six button controllers?

 

The graphics aren't restricted by the compiler, but by the programmer and artist. Fix-It Felix was written in Basiegaxorz/BEX (same language as Crazy Bus).

 

SecondBASIC uses the BEX ASM library, but some things have been adjusted and some fixes have been done, but they're nearly identical codewise. SecondBASIC does support 6 button controllers as well :)

 

I wrote my own graphic editor (Affinity Draw Studio), but it's far from finished and pretty basic in terms of a graphic editor. The only advantage my tool has over other available ones is that it generates the palette data in BASIC code for me, I can import 16 color images and edit them / adjust them, and it can pull out all unique tiles and generates a tile map, otherwise it only supports 1 palette, 1 layer, and you can only copy a tile and paste a tile (so things like shifting the image over by a pixel in any direction, select and move, select and copy, paste and move around, multiple brushes/line tool/etc. don't exist, and so on - though it can flood fill :P )

 

Oh, and it also exports sprites in the proper manner (in the Y direction) so you don't need to do anything extra or rearrange the tile order.

 

But yeah, BASIC is definitely more powerful than a lot of people give it credit for. Sure, C and ASM are better for many of reasons, but BASIC can make great games as well :)

  • 1 month later...

it still has some bugs: .bex files are saved as .sbs internally if we save by pressing ctrl+s (quite annoying bug, since i only use .bex files), we still can’t use it by command-line only, it is still proprietary software (sorry for the joke, @dra600n! :D ), and etc., but it is indeed a significant improvement over BasiEgaXorz

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...