Jump to content
IGNORED

7800basic beta, the release thread


RevEng

Recommended Posts

  • 3 weeks later...
13 minutes ago, RevEng said:

Seems to be working for me, with a test program.

 

Thanks. I have something weird, but it's only with the internal 7800GD saves. That's why I suspected the header. I do have HSC in the 7800Header command prompt , but I thought something still may have changed.

 

I appreciate you checking.

  • Like 1
Link to comment
Share on other sites

  • 4 weeks later...

I am looking at converting Mousetrap from SNES-specific routines, to multibutton support.

 

So far, I am reading the correct number of controller buttons until I plug in my 6-button Genesis controller. I am using the Mega 7800 interface.

 

I've tried pressing the Mode button at different times, and it still reads as a 3-button controller.

 

If I plug an SNES controller in, it correctly updates to 6-button. Back to the 6-button Genesis, and I am back to 3-buttons.

 

Is there something I am missing?

 

Thanks!

 

PS. It's an OFFICIAL Sega 6-button.

Link to comment
Share on other sites

1 minute ago, RevEng said:

Assuming this is a retail mega7800, what color is the LED on the mega7800 showing when your pad is plugged in? It should show green for a 6-button controller, whether or not the console has negotiated to use the extended button mode.

It is not green, so I am assuming this means the fault is in my Mega7800?

Violet, and detects 3 buttons.

Link to comment
Share on other sites

4 hours ago, RevEng said:

Yep

Is there a way to detect if an actual savekey or AtariVox is in port 2?

 

@Muddyfunster @mksmith

In previous games, I forced player 1 and player 2 to use the same controller if there was a high score device found. The 7800GD has built-in high score saving, so P1 and P2 could each have a 6-button controller and still have the GD high score device (or a future high score cart).

 

On the other hand, it's probably rare that somebody owns two SNES2Atari adapters or two Mega7800s. Or is it? They could have one of each now.

 

Another example with Mousetrap was if there wasn't a high score device, I'd allow dual stick. (One for control, and the other for doors.) With the 7800HD high score device, this will be disabled, even though port 2 is empty.

 

Is there a current standard in theory? Any thoughts?

 

Thanks..

Link to comment
Share on other sites

2 minutes ago, darryl1970 said:

Is there a way to detect if an actual savekey or AtariVox is in port 2?

You can check if hsdevice=2. (see the "high score support" section of the manual)

 

If high score support is enabled, and a avox/savekey device is detected, the multi-button code doesn't probe that port for a multibutton controller.

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

I haven't really gone too deep on mixing/forcing various controllers. If I include savekey I'm just assuming left-controller, right-savekey.

 

The great benefits of Mike's recent updates is that will be very simple with the autodetection and joy0/joy1 mapping.

  • Like 2
  • Thanks 2
Link to comment
Share on other sites

17 hours ago, RevEng said:

You can check if hsdevice=2. (see the "high score support" section of the manual)

Of course, I found that I am already using this in my settings menu. I plot out which device is found. I hate that I am at the place in life where I forget stuff that I knew. LOL. Thanks again.

 

I did try hooking my Mega7800 to port 1 and SNES2Atari in Port 2. My game locks up shortly after it starts. I thought that might be one practical way that somebody could use two 6-button controllers.

Was this an unexpected combination of devices? Should this have worked, or is this just an unworkable combination?

 

I can plug an SNES2Atari into both control ports after the game is booted and started up. It slows down my attract screen a little, but it works. I get both ports registered at 6-buttons (I output to the screen), but as far as I can tell, joy1fire(0-5) are reading the values from joy0fire(0-5). So, when player 2 comes up, I can control with the second SNES controller, but the buttons are reading from the first.

 

14 hours ago, mksmith said:

I haven't really gone too deep on mixing/forcing various controllers. If I include savekey I'm just assuming left-controller, right-savekey.

Yes. I am doing that now. However, if it's high score cart, which is what the 7800GD registers as, I still allow individual joystick options, as well as the dual stick (2nd stick can be used for doors in Mousetrap).

14 hours ago, mksmith said:

The great benefits of Mike's recent updates is that will be very simple with the autodetection and joy0/joy1 mapping.

This is VERY slick! I had a pretty complex routine for all of these config options, as well as Pause from the SNES pad. This new functionality has really simplified things. I was even able to get rid of my custom SNES Pause routine. I probably need to simplify it more, but I'll have to wait for my Mega7800 to get back from repair.

 

It's great. Thanks @RevEng!

  • Like 3
Link to comment
Share on other sites

2 hours ago, darryl1970 said:

I did try hooking my Mega7800 to port 1 and SNES2Atari in Port 2. My game locks up shortly after it starts. I thought that might be one practical way that somebody could use two 6-button controllers.

Was this an unexpected combination of devices? Should this have worked, or is this just an unworkable combination?

 

I can plug an SNES2Atari into both control ports after the game is booted and started up. It slows down my attract screen a little, but it works. I get both ports registered at 6-buttons (I output to the screen), but as far as I can tell, joy1fire(0-5) are reading the values from joy0fire(0-5). So, when player 2 comes up, I can control with the second SNES controller, but the buttons are reading from the first.

I think I see the reason for the dual-snes2atari mix-up, and possibly the mixed device hang. I don't have my 7800 handy right now, so... if you copy this updated snes2atari.asm to your project directory, does it fix either bug?

snes2atari.asm

  • Like 1
  • Thanks 1
Link to comment
Share on other sites

3 hours ago, RevEng said:

I think I see the reason for the dual-snes2atari mix-up, and possibly the mixed device bug. I don't have my 7800 handy right now, so... if you copy this updated snes2atari.asm to your project directory, does it fix either bug?

snes2atari.asm 5.73 kB · 0 downloads

Sorry, it takes a while to test this, due to the number of combinations that I have in this. This updates seems to handle everything like a champ.

 

I will not be able to 100% test until I get a replacement for my Mega7800, because my 6-button is reading as 3-button.

 

However, I was able to capture that for each individual stick and adjust accordingly. With the 3-button, the buttons are the 3 doors, and the Start button becomes the doggie button. I assume the 6-button Genesis will behave just like the SNES controller does.

 

Thanks Mike! That was quick!

 

As for forcing the joystick options, I think I found an elegant solution. When either port has a stick with more than 2 buttons, the dual stick option is no longer available. I then offer the standard or special button mapping option (which only really applies to more than 3 buttons), but I want that in case somebody hot swaps.

 

Again, these tools are just top notch! Thanks again!

 

 

 

  • Like 2
Link to comment
Share on other sites

  • 1 month later...

I have a feature request: I'd love to have a "strcpy" or perhaps an extension of "memcpy" that would allow me to copy a quoted text string to RAM. I would personally use this to populate a text buffer before calling a subroutine that prints from this buffer to the screen. E.g.:

 

    strcpy TextBuffer 'Text to copy to RAM'

 

  • Like 3
Link to comment
Share on other sites

17 minutes ago, JagChris said:

Is this basic made from scratch or based off of something like Atari 8-bit BASIC?

As mentioned, it is based off of batari Basic in which RevEng co-developed with batari.

RevEng is the developer of 7800basic.

More details available here and here.

  • Like 3
Link to comment
Share on other sites

29 minutes ago, Trebor said:

As mentioned, it is based off of batari Basic in which RevEng co-developed with batari.

More details available here and here.

Thanks, but I think co-developed is too strong a word. I contributed some features and a ton of bug fixes, but bB existed for years before I got to it, and I wouldn't want to claim Fred's hard work. Bootstrapping bB and it's dev community was a grand bit of work - when he started the project, some people were saying that developing games on the 2600 with a basic-like language wasn't a viable approach, and the games would all just be variations on the same game.

 

44 minutes ago, JagChris said:

Is this basic made from scratch or based off of something like Atari 8-bit BASIC?

As the guys have said, 7800basic is based off of batari basic. batari basic is a minimal compiled basic implementation, close to the metal, without support for things that usually make basic both a performance and footprint pig. (e.g. flexible print statements with multiple types, flexible general string manipulation, etc.)

 

I used batari basic as a base for 7800basic for those same properties. It's one of the reasons that 7800basic games can shine as hard as assembly efforts.

  • Like 8
  • Thanks 2
Link to comment
Share on other sites

I've been troubleshooting a weird bug in my code, and I think I finally figured out that it's a corner-case bug, or undocumented limitation. It seems that although plotchars can accept more chars than 32, breaking it up into two DLs, it doesn't seem to handle it correctly if the numbers of chars is given in a variable. In my case, I was trying to plot 36 characters, and that worked fine if I hard-coded the number 36, but when 36 was in a variable, it only plotted 4 characters (the remainder after 32 I suppose).

Link to comment
Share on other sites

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...