Home Page

Bounty: $100 for Astrocade Tape Support

Posted By: BallyAlley

Bounty: $100 for Astrocade Tape Support - 03/15/19 06:24 PM

I am offering a bounty of $100 (paid via PayPal) to someone who adds support for the 2000-baud tape format to the astrocade emulator in MAME. Currently, there is no tape support at all. I want to, at minimum, be able to load Bally BASIC programs into the "AstroBASIC" cartridge.

I wrote extensively about this much-needed feature at mametesters.org. The "report" I made is there. It's called:

"07072: astrocde and clones: [Enhancement] 2000-Baud "AstroBASIC" Tape I/O Support Missing"

Here is a direct link to that thread:

https://mametesters.org/view.php?id=7072

Is anyone interested in trying to add tape support to the Astrocade emulator?

I'm not sure how to work out the details of this, so perhaps we can talk about it publicly here. I'm not even sure how to approach this if more than one person is interested.

I don't think that there is an official way to offer a bounty for work on MAME. Someone on the BallyAlley Yahoo group suggested that I post here. If this is not correct, then can someone please point me to where I could offer a bounty for a feature to be added to MAME?

I'm hoping that $100 is enough to inspire someone to look into the code for this often-overlooked game console from 1978.

Adam
Posted By: ICEknight

Re: Bounty: $100 for Astrocade Tape Support - 03/15/19 06:29 PM

Ok, this is weird.
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/15/19 06:40 PM

I can't guarantee anything, but I don't have anything else to do on MAME at the moment, so I might poke at it a bit this weekend. I'll let you know how it goes.
Posted By: Duke

Re: Bounty: $100 for Astrocade Tape Support - 03/15/19 08:57 PM

There is also a page on bountysource for MAME: https://www.bountysource.com/teams/mamedev
Posted By: Haze

Re: Bounty: $100 for Astrocade Tape Support - 03/15/19 09:13 PM

It was also absolutely impossible for me to actually claim the bounty for the CPS3 work, because they didn't seem to support payments to non US citizens. (in the end I passed on my account to somebody else, as it was a joint effort anyway and one of us was a US citizen)

There are honestly better ways to handle it, without yet another middleman cut.


Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 12:33 AM

As of this commit, I have now added cassette support for the AstroBASIC cartridge: https://github.com/mamedev/mame/commit/e23c64eb76c1ab9a1465d0101272c9df058bddad

Here's a screenshot of Bob Ogdon's "Anti-Aircraft Gun" tape in the process of loading:
[Linked Image]

And here it is running:
[Linked Image]

Here is George Moses's "Auld Lang Syne" song from the Christmas tape after having loaded:
[Linked Image]

I have also added tape output support. Here is a screenshot of a small BASIC program I wrote (as you can tell, I am woefully unfamiliar with the Astrocade's control mapping), having been loaded off the tape to which I saved it in a previous run of MAME:
[Linked Image]

And here it is running, to verify that the data was loaded correctly:
[Linked Image]

For further proof, here is the tape image that MAME generated:
http://polygonal-moogle.com/mame/astrocade/test.wav

Please note, support for the cassette interface is available through MAME's "Software List" functionality only. That is, the AstroBASIC cartridge ROM will need to be in a ZIP file called "astrobas.zip", with a path of "roms/astrocde/astrobas.zip", or wherever appropriate for where you have configured MAME to expect software-list ROMs to be found. Rather than loading AstroBASIC as a loose file through the -cart switch, one specifies a software list entry like so:

Code
mame64 astrohome astrobas <options>


Thank you for the informative bug report on MAMETesters, and thank you also for posting your request on these forums, as I am not in the habit of checking MAMETesters.
Posted By: Haze

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 11:06 AM

Very nice MG.

If the guy still wants to donate $100 for this I think it'd be easier if you gave him a PayPal account than going through Bountysource or the like if you have one? Could go towards more Game & Watch stuff?

Alternatively, if you're happy for the money to be spent on Plug and Play stuff, then then it could just be sent my way (keep in mind it will be some months before Sean can process anything again tho) or possibly even just in the direction of The Dumping Union if it's to go on misc arcade board stuff.
Posted By: R. Belmont

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 11:28 AM

Or decide that we aren't RetroArch and refuse the money.
Posted By: Haze

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 11:33 AM

I think as long as it goes on something physical that is needed and will make a long term difference, not paying for the actual work, we're not RetroArch or any of those other vile Patreon or Bountysource funded projects.

That's where I draw the line there personally, money into pockets is money out of the system and should be refused, money spent on items that will benefit everybody is not.

The $30,000+ a month into pockets you read about with other projects (including ones complaining that $7000 a month isn't enough) is horrible, the same amount spent on actual hardware would do wonders. That's why I specifically suggested it could go towards Game & Watch or similar.

Anyway, the way I see it, the work has been done, a payment is not required, but if the OP wants to donate $100 towards the purchase of some items that will help with emulation to say thank you, that is now a choice. We could pick up one of those LJN video art machines for hardware analysis for example.
Posted By: R. Belmont

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 12:09 PM

Agreed, I'm just concerned that this is twice work has been done as a direct result of bounties (this astrocade thing was on MT for like 3 years) and that's going to send the wrong message.
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 12:51 PM

To be perfectly honest, I only took a crack at it because I couldn't think of anything else that I was in the mood to work on on MAME at the time. Work was done as a direct result of me being bored as hell dovetailing nicely with an incredibly well-researched and comprehensive MT bug report.

If and when BallyAlley does decide to pay up, the only thing I intend to do with the bounty is use it to fund more LCD handheld purchases, it's certainly not going into my pocket.
Posted By: Haze

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 12:56 PM

indeed, and that is what sets MAME aside from the rest.

even for the CPS3 thing, I was already looking at it as part of something bigger

obviously I hope BallyAlley decides to send something your way because it'll cover a decent portion of the cost of seeing one of the Game & Watch titles preserved for future generations, a task that requires money to purchase the physical item for processing and something that is going to play a significant role in the long term preservation and accessibility of our culture.
Posted By: R. Belmont

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 01:16 PM

Which is fine. I just would like some better way for people to attract bored devs without opening up a license to be annoying about it smile
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 05:49 PM

Question for BallyAlley, to what pin(s) on the 9-pin controller port is the 300 baud cassette interface connected?
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 07:34 PM

I seem to be having some trouble getting tapes to load using the 300-baud interface. It would appear that the interface should supply a bit stream to the least-significant bit of the relevant controller port, but I'm not having any success in getting tapes to load, regardless of the polarity that I use.

For reference, I'm using the corrected Grandfather Clock demo from this page: http://www.ballyalley.com/program_downloads/300_baud_programs/Barry_Ellerson/Barry_Ellerson.html
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 07:49 PM

Wow. I'm not following this thread that I started yesterday-- I guess I have to figure-out how to get an email sent to me when someone posts to this thread. I checked-in on the thread just now and there is already a patch for 2000-baud tape support for MAME? That's crazy. I have to try it. Now, where do I download a work-in-progress?

Someone commented that a bounty can send the wrong idea to the community. I think I understand exactly where you're coming from. I guess if bounty's became the only reason that people worked on MAME then the whole project would be stalled. Yet, people in the Astrocade community have asked, on and off, for tape support in MAME since around 2001. The astrocade was never released out side the U.S. and it barely made a blip, so it wasn't high on anyone's priority list. I figured a bounty might help get the ball rolling.

Oh, and certainly I'll pay the $100 bounty that I offered after I try out the emulation. Even if it's not perfect, then it's possible that just a start is enough to get others interested in getting it to work 100%. There are other posts in this thread that I plan to answer, if I have time, before the weekend is over.

I really can't believe a bounty got anyone's attention at all. Thanks!

Adam
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/16/19 09:12 PM

Heya BallyAlley. I'm assuming you're running a 64-bit version of Windows. If that's the case, I've compiled a single-driver version of MAME and uploaded it here:
http://polygonal-moogle.com/mame/astrocade/astro64.zip

You'll also need to update astrocde.xml in the "hash" subdirectory. You can find the updated version here:
http://polygonal-moogle.com/mame/astrocade/astrocde.xml

If you're running 32-bit Windows, let me know and I'll spin up a 32-bit build for you. Please refer to my post earlier in the thread for the proper syntax on how to run AstroBASIC from the software list. For reference, the ROM image contained in the relevant .ZIP file should have a CRC32 of 70514687 (in hex).

Lastly, the version that I uploaded contains some of my current work in progress, which is properly slot-ified controller ports, rather than emulating the Astrocade as always having four controllers plugged in. This is something that will be necessary in order to emulate the 300-baud tape interface. By default a joystick is connected to controller port 1, and to plug in additional controllers you can specify "-ctrl2 joy", "-ctrl3 joy", or "-ctrl4 joy" to plug a joystick into the relevant ports.

Once the 300-baud tape interface emulation is functional, you will be able to plug it in using "-ctrl3 cassette". If you use the "-listslots" option, you will note that that attachment is already available, but it is currently non-functional for unknown reasons.
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/17/19 10:34 AM

I have now added support for saving and loading via the 2000-baud tape interface found on the Blue RAM expansion boards.

[Linked Image]

[Linked Image]

[Linked Image]

[Linked Image]

Simply plug in the necessary 4K, 16K, or 32K Blue RAM expansion board as normal (-exp blue_ram_4k, etc.) and you will be able to mount a tape in WAV format for loading, or create a new WAV for saving.

I have uploaded an updated single-driver 64-bit Windows build of MAME containing these changes here:
http://polygonal-moogle.com/mame/astrocade/astro64_190317.zip

Once you have evaluated the progress so far, kindly send me a private message on these forums and I will respond with the e-mail address associated with my PayPal account.
Posted By: Sune

Re: Bounty: $100 for Astrocade Tape Support - 03/17/19 05:45 PM

Just posting this here for the benefit of those who, like myself, are unfamiliar with the Bally Astrocade.

Here is a page with photos and scans of the keypad itself and all the overlays.

And here is a video demonstration of the Astrocade on what looks like a period correct Zenith TV set. Pretty cool.
Posted By: Al Kossow

Re: Bounty: $100 for Astrocade Tape Support - 03/17/19 05:58 PM

Originally Posted by Sune
Just posting this here for the benefit of those who, like myself, are unfamiliar with the Bally Astrocade.


The Astrocade also uses the same Nutting ASICS that the Midway games (Gorf, etc.) used, in lower resolution mode.
There have been hardware hacks built to give the Astrocade the same resolution video as the arcade.

There is some Astrocade source (ex. BASIC) in the Fenton scans I uploaded to bitsavers under pdf/nuttingAssoc, along with some cassette source.
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/17/19 07:00 PM

I've got very limited time today, but here are a few quick responses:

1) I'll test MAME with the changes for tape support early this week and post back here by Tuesday.

2) I run the 64-bit version of Windows 7, so the 64-bit version of MAME is what I require.

3) I know how to use the 300-baud interface on real hardware, but I'm not familiar with the way it works. Perhaps the schematics in the "Hacker's Guide" on my website may help you:

.pdf]Bally Hacker's Guide

The above link doesn't seem to work right-- maybe because of the brackets in the filename. Here is the link in plain text format:

http://www.ballyalley.com/basic/Bally%20BASIC%20Hacker%27s%20Guide%20(1979)(Jay%20Fenton)[draft].pdf

4) I sent "Just Desserts" a private message via these boards requesting his email address so that I can send him the bounty via PayPal. As an aside, my wife asked me, "How do you know it's a guy who made the update." I guess that I don't know that...

5) If anyone has any more questions, then please feel free to ask them here. If I don't know the answer, then I'm sure I can get the correct answer from someone in the Astrocade community.

6) This will probably become obvious to me once I use the MAME emulator with with tape support, but does it save to WAV files? If so, then will they load on real hardware? That would be so cool!

Thanks for working on this project. I still can't believe the quick progress that you made.

For those interested in the Astrocade, you might want to watch a few of my videos on my YouTube channel, here:

https://www.youtube.com/user/ballyalley/videos

I'll post back here within a couple of days.

Adam

(Oh, and for some reason, even though I'm following this topic, I don't get email notifications when someone posts to this thread.)
Posted By: ranger_lennier

Re: Bounty: $100 for Astrocade Tape Support - 03/18/19 06:40 AM

Adam asked me if I could help test this. It took me a little while to figure out how to load a tape image and start it playing, but I got the hang of it soon enough. For anyone else trying this, most AstroBASIC programs start with the command

:INPUT; RUN [GO]

Assuming you didn't have a fancy keyboard (which hasn't been emulated in any case), you'd enter this on a 24 button keypad, using various shifts to get all the needed characters and keywords. By default, you'll want to push these keys. If there are two characters on a line, the first one is a shift. If you mess up, hit 3 to erase.

Period NumPad+
NumPadEnter 2
0 3
NumPadEnter PageDown
C

It was really cool seeing some tape programs running. I started out with Sideswipe, a very simple program from WaveMakers, which worked fine. Then I tried one of my favorites, CandyMan from L&M Software, which has a title screen followed by the main program. This also worked really well.

Where I started running into problems was with the multi-load music programs from George Moses. If you look at the recordings, there's a bunch of silence in them. That's because after loading the program, the user would simply leave the tape running. It was timed such that as soon as one song ended, the tape would be in the appropriate position to load the next song. I don't know if it's an issue with the tape support or the actual emulation speed of the system, but I could never get it to work quite right. We did test these on real hardware before putting them on-line. I was able to work around this by pausing the tape while a song played, then restarting it and waiting for it to reach the next song, so it seems to be purely a timing issue.

Bach's 15 Two Part Inventions
http://www.ballyalley.com/program_downloads/2000_baud_programs/george_moses/bach_tape/15_two_part_inventions%20(by_johann_sebastian_bach)_[george_moses].zip
First song plays fine. Then it looks like the second one's loading, but it ends up crashing back to AstroBASIC.

Beatle's Greatest Hits
http://www.ballyalley.com/program_downloads/2000_baud_programs/george_moses/Beatles_Greatest_Hits/Beatles%20Greatest%20Hits%20(George%20Moses).zip
"She Loves You" plays fine. After that, there's a long pause. If you wait a few minutes, it will eventually play "Let It Be", having skipped over the second song, "A Hard Day's Night".

Scott Joplin's Ragtime Classics
http://www.ballyalley.com/program_d...isc_music/scott_joplin_ragtime_classics_[george_moses].zip
"The Easy Winners" plays fine. After that, there's a long pause. If you wait a few minutes, it will eventually play "The Entertainer", having skipped over the second song, "Crush Collision March".
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/18/19 07:04 AM

So, just to be clear, the issue is that the tape runs too fast relative to the emulation speed? If so, this explains some of the troubles I'm having with emulating the 300-baud tape interface as well. I have 99.9% of the bits coming into the machine just fine, but every so often, the emulated machine 'misses' a bit - presumably due to tight timing.

I'll see what I can do to mitigate this issue, but I'm afraid a proper solution may be out of my hands, as it could require a total re-write of the driver to have more accurate timing. If that invalidates the bounty payout, so be it, I understand.
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/18/19 07:16 AM

Originally Posted by BallyAlley
Perhaps the schematics in the "Hacker's Guide" on my website may help you


Sorry, the schematic quality was a bit on the low side for me to be able to make out the information that I needed. However, Paul Thacker e-mailed me a different set of schematics, which proved highly illuminating.

Originally Posted by BallyAlley
4) I sent "Just Desserts" a private message via these boards requesting his email address so that I can send him the bounty via PayPal. As an aside, my wife asked me, "How do you know it's a guy who made the update." I guess that I don't know that...


Yep, I'm a guy.

Originally Posted by BallyAlley
6) This will probably become obvious to me once I use the MAME emulator with with tape support, but does it save to WAV files? If so, then will they load on real hardware? That would be so cool!


It does save to WAV files. I do not know if they will load on real hardware. It's worth a try, though!

Originally Posted by BallyAlley
Thanks for working on this project. I still can't believe the quick progress that you made.

For those interested in the Astrocade, you might want to watch a few of my videos on my YouTube channel, here:


Thanks Adam, I'll definitely be checking out your channel!
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/18/19 07:31 AM

Originally Posted by ranger_lennier
Scott Joplin's Ragtime Classics
http://www.ballyalley.com/program_d...isc_music/scott_joplin_ragtime_classics_[george_moses].zip
"The Easy Winners" plays fine. After that, there's a long pause. If you wait a few minutes, it will eventually play "The Entertainer", having skipped over the second song, "Crush Collision March".


Well, I have some good news. With changes that I have locally to the driver, "Crush Collision March" now appears to start right on time, as do the other songs you mentioned. I'll submit my changes when I get home from work.
Posted By: ranger_lennier

Re: Bounty: $100 for Astrocade Tape Support - 03/18/19 04:23 PM

Awesome! It should be possible for us to run something on real hardware to get timing info if that would help, but it sounds like that may not even be necessary.
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/18/19 04:43 PM

No need. I just submitted a changeset which both fixes the timing issues you mentioned, and gets 300-baud tape loading working.

Updated single-driver build: http://polygonal-moogle.com/mame/astrocade/astro64_190318.zip

Random screenshots:

[Linked Image]

[Linked Image]

[Linked Image]

[Linked Image]
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/18/19 09:05 PM

First off, thanks to "Just Desserts" for his hard work. I paid him the bounty this morning.

In a private message to me, "Just Desserts" said he has added these two items to the astrocade MAME driver to-do list:

1) Get 300-baud cassette saving working
2) Get the Perkins Engineering Blue Ram Keyboard working

He asked me if I could supply a list of other things that need updating and fixing. Here is a list of items that I can think off the top of my head:

3) Astrocade Colors in MAME require fixing - Most of the colors are close and it doesn't bother me that they aren't exactly right. However, some of the colors are completely wrong. But, I'm not sure which colors are wrong. It would be nice if there was a comparison showing real hardware against emulation and a video.

4) Interrupts - I think one of the interrupts in MAME's emulation isn't supported at all. I can't remember which one. I presume it is the light pen interrupt.

I asked this question to the Bally Alley Yahoo group and Lance Squire responded with the following:

5) Viper keyboard would be nice too. Paul has one.

As for color correction, wouldn't the HTML page be better than a video? Ok, video of the Bally on a tube tv could show the Neon like colours it could get, but modern tvs and monitors just can't do that. :P

Lance is referring to this comparison (which I'm not sure is up-to-date anymore). Also, these colors looks too accurate to me. I was using MAME a week or two ago and I noticed that some colors are just totally wrong now.

(Hmm... I don't see a way to insert in-line images and I can't seem to turn on html mode. Could a get a little help here, please?)

6) Also, although this could be done later, if you set VBLANK &(10) to 255
(Possibly lower...) you get a vertical over-scan effect. See this picture:

Although nobody had used it to any effect... yet. (This is a better image to show what is showing where on the over-scan.)

(Again, I can't insert the in-line image here.)

(I'm not sure what Lance is referring to here, but I'm including it anyway.)

These are the only updates that I can think of that the astrocade driver in MAME needs right now. Over the next few days I will give this more thought and see what I can come up with myself. It's also possible that other members of the Bally Alley community will come up with ideas too.

Adam
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/18/19 10:21 PM

Okay, I just couldn't wait any more. I've waited for tape support since 2001: I could wait no longer. I don't have time to really play around with this updated astrocade driver for MAME, but I did give it a quick whirl.

I loaded the current build of it with the support for 2000-baud tape loading and saving. I was able to successfully load an AstroBASIC game (I choose The Gate Escape, by WaveMakers). I also wrote a two-line "Hello, World!" program and managed to save it and reload it after I reset the astrocade emulator.

Here are some of my initial comments:

1) It took me a little while to figure out the procedure to load and save, but eventually I worked it out. I don't think I've ever user MAME to load any software via tape or disk. I've always just loaded ROMs into various emulators. I presume the method used for the Astrocade's "tape player" is similar or the same as used on other systems?

2) When I played The Gate Escape under emulation, it seems to play a little slower than on real hardware. Maybe that's my imagination? Without tape support, it's been really difficult to test "AstroBASIC" under emulation with a full program. Either way, if it runs slower under emulation, then that has nothing to do with the tape loading at all-- it would be a general emulation issue.

3) Saving a program worked fine. I did notice that the size of the WAV file that was created was zero bytes until I reset the emulator. When does the WAV file get closed properly from the emulator? Can it be closed manually. Perhaps the "tape" (the WAV file) can be ejected from the player and this will close the WAV file?

4) Control of the "tape player" works well, and I like how there is an on-screen display of the "tape counter" that overlays the emulator.

5) I opened up the 2000-baud WAV file that was created and played it through my speaker. It sounds slightly different than one created on real hardware. That might seem strange to say, but I've heard hundreds of 2000-baud programs in the last twenty years, and there is a difference of some sort.

6) Will the 300-baud emulated tape interface support the Machine Language Manager cartridge? I have a four-part video series about that cart. You can watch it here:

[video:youtube]https://www.youtube.com/watch?v=6Br8gZm8Thg[/video]

Here is what I still need to try:

1) Load a 2000-baud Blue Ram BASIC Program.

2) Load a WAV file created under emulation on real hardware.

3) Load a 300-baud Bally BASIC program.

4) Try running a 2000-baud program WAV file created under emulation through the archiving tools for the astrocade called BallyBIN and AstroWAV. I'd like to see how they handle to format.

For a speed test, which has nothing to do with the tape-loading ability, I'd like to choose a BASIC program that can be used as a timer and then start it at the same time on real hardware and under emulation and see how they compare. I'm not sure what would be a good program for that yet. I might ask around.

I'm thrilled with the results I've seen. When I saw the The Gate Escape's title screen load on the emulation screen I about had a heart attack. After all of these years, I never thought that I'd see that happen.

Are there any tests that anyone would like to see me run? Also, I still can't figure out how to place inline images into these posts.

Adam
Posted By: Sune

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 12:10 AM

it's not possible to upload files to this forum. You have to link to images stored somewhere else.

I was thinking that it might be useful if you could provide an unaltered .wav recording of a "real" 2000 baud program, you'd be surprised what can be learned just by comparing .wav files in an audio editor.

That might be the fastest way to help if you don't have much time.

(just thinking out loud, of course I could be wrong and the last thing I want to do is to waste anyone's precious time)
Posted By: R. Belmont

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 03:15 AM

Presumably the tapes available to download are from hardware, in which case we have the original and we can save it back out in MAME and compare.
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 03:31 AM

Originally Posted by R. Belmont
Presumably the tapes available to download are from hardware, in which case we have the original and we can save it back out in MAME and compare.

It is true that the majority of the 300-baud and 2000-baud BASIC programs on ballyalley.com were recorded from real hardware. Usually this means that the recordings were made from tapes from the late 1970s or early 1980s. However, they these files were then all digitally archived using various audio archiving tools that are also available on the site here:

http://www.ballyalley.com/program_downloads/tape_archive_tools/tape_archive_tools.html

What this means is that these are "perfect" WAV files. If anyone here would like to have a RAW WAV file recorded from real astrocade hardware in either 300-baud or 2000-baud, than me know and I can do that within the next couple of days. By "RAW" I mean that it will be a digital recording of an analog signal. The file will not have been processed in any way.

Adam
Posted By: ranger_lennier

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 04:04 AM

Yes, 40 year old tapes are generally too noisy to use as is. The typical process is to record a tape through a sound card, save it to a .wav file, run a digital processing tool on it, and generate a clean version of the original recording. The new recording will have perfect square waves, compress really well, and load on real hardware very reliably (running an audio cable from the sound card into the system and playing the digital file).

Of course, if you output and record a program directly from hardware today, it won't be "perfect", but should load just fine.
Posted By: ranger_lennier

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 04:31 AM

I'll second support for the VIPER System 1 keyboard. It was actually built directly into the RAM expansion, and should work on VIPERSoft BASIC and I believe even the regular BASIC versions without needing a driver or anything.

The other thing that comes to mind is cartridge hot swapping. You should be able to remove one cart and insert another without resetting the system. The software list includes a bunch of BASICarts, which were BASIC programs converted into cartridge format. You need to swap the BASICart and the BASIC cartridge to run them.

And with both of those feature implemented, you could actually load 2000 baud programs into VIPERSoft BASIC. Unlike Blue RAM BASIC, it doesn't have a built-in audio interface, so you need to swap between the VIPERSoft BASIC cart and the regular BASIC cart with the interface. There's not a whole lot of software for it, but Dragon's Castle is pretty cool.

http://www.ballyalley.com/program_downloads/ram_expansion_required/programs_a-h/Dragon's%20Castle%20(198x)(unknown)(2000%20baud)(VIPERsoft%20BASIC).zip

The Music Maker cart includes a tape interface. As far as I know, it's identical to the 2000 baud interface in the BASIC cart.

This is really reminding me of all the surprising things people managed to make this system do--often just one or a few people selling software and hardware through newsletters. I don't even remember how all of it works, but we'll try to figure it out if you want more details. We'll have to think about what would even make sense to emulate. Like, I archived a driver for the Blue RAM Modem, but I have no idea what you could do with it if you emulated one. There is a little bit of light pen software. I also think it would kind of hilarious to emulate the Computer Ear.

http://www.ballyalley.com/pics/hardware_pics/Computer_Ear/computer_ear.html

Yes, someone actually made a speech recognition device! Adam has one, along with some program printouts. (That would be a good video for your Youtube channel, Adam!)
Posted By: Just Desserts

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 06:55 AM

Originally Posted by ranger_lennier
I'll second support for the VIPER System 1 keyboard. It was actually built directly into the RAM expansion, and should work on VIPERSoft BASIC and I believe even the regular BASIC versions without needing a driver or anything.


Thanks, I'll try to tackle this at the same time as I tackle the Blue Ram Keyboard. One thing that would be very helpful is to know how the keyboard matrices in both keyboards are laid out. Specifically, which row/column in the key matrix each key maps to, and in the case of the Blue Ram Keyboard, which pins in the expansion ZIF socket map to which rows/columns of the keyboard matrix.

Originally Posted by ranger_lennier
The other thing that comes to mind is cartridge hot swapping. You should be able to remove one cart and insert another without resetting the system. The software list includes a bunch of BASICarts, which were BASIC programs converted into cartridge format. You need to swap the BASICart and the BASIC cartridge to run them.


This is not easily doable due to the need to reset the emulated machine when changing slot devices, but I'll throw some ideas around with Vas and see if we can come up with a solution.

Originally Posted by ranger_lennier
The Music Maker cart includes a tape interface. As far as I know, it's identical to the 2000 baud interface in the BASIC cart.


If it is identical, then getting it working should be as simple as copying the line of XML that I added to hash/astrocde.xml into the entry for that cartridge, too. Can you point me at any tapes that I can use to test loading?

Originally Posted by ranger_lennier
This is really reminding me of all the surprising things people managed to make this system do--often just one or a few people selling software and hardware through newsletters. I don't even remember how all of it works, but we'll try to figure it out if you want more details. We'll have to think about what would even make sense to emulate. Like, I archived a driver for the Blue RAM Modem, but I have no idea what you could do with it if you emulated one. There is a little bit of light pen software.


If we have schematics and appropriate documentation, why choose? I'm happy to take a crack at emulating any peripheral that has sufficient documentation. With enough effort, MAME could become the go-to emulator for Bally Astrocade emulation.

Originally Posted by ranger_lennier
I also think it would kind of hilarious to emulate the Computer Ear.

http://www.ballyalley.com/pics/hardware_pics/Computer_Ear/computer_ear.html

Yes, someone actually made a speech recognition device! Adam has one, along with some program printouts. (That would be a good video for your Youtube channel, Adam!)


MAME doesn't currently have a way of handling microphone input, but I can think of a couple workaround that would allow emulating the device in the meantime, assuming documentation and tapes can be found.
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 06:36 PM

I converted Bally Ellerson's "Grandfather Clock" Bally BASIC program from 300-Baud to 2000-Baud. The 300-baud version of the program is here:

http://www.ballyalley.com/program_d...(1981)(Barry%20Ellerson)(300%20baud).zip

The 2000-baud "AstroBASIC" version of the program, which I just converted to this format this morning, isn't online. If anyone needs it, then I can put the RAW version and the digitially archived version online at BallyAlley.com for testing purposes.

I timed the grandfather clock running under Bally BASIC and AstroBASIC on real hardware. I also timed the AstroBASIC version running under MAME. I used a digital stopwatch to get these estimates which are probably accurate to within one second. Here are the results:

1) Real Hardware - Bally BASIC: 1 Minutes = 1 minute in real time.
2) Real Hardware - AstroBASIC: 1 Minute = 38 seconds in real time.
3) Emulation - AstroBASIC: 1 Minute = 55 seconds in real time.

This means that it isn't my imagination that "AstroBASIC" runs significantly slower under MAME emulation. If my system speed makes any difference, my computer is a 64-bit, Windows 7 machine with an i7-4770@ 3.40Ghz with 8GB of RAM.

I've never noticed this timing difference using regular astrocade cartridge games. Then again, I've never taken this close of a look either.

If it's any help, using my Framemeister and AVerMedia Live Gamer Portable, I did record video of Bally BASIC and AstroBASIC running "Grandfather Clock." Using OBS Studio, I could also record footage of MAME running "Grandfather Clock." Maybe I could cobble together a video comparing all three at the same time. However, I've not done that before... so I'm not sure how to do it. I use Adobe Premiere Elements 14, so I'm pretty certain that there must be a way to do it. Anyway, I'm not sure if a video like this would even be useful.

I still can't get over that I can load an "AstroBASIC" program into the astrocade emulator that's part of MAME. That's simply too good to be true! Even if the speed is slow, it is still extremely useful to me, as I've always wanted to use MAME's debugger to observe BASIC's RAM "live."

Next up, I'm going to test loading an "AstroBASIC" program saved under MAME emulation onto real astrocade hardware.

Adam
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 07:04 PM

Paul is right about MAME's lack of "cartridge hot swapping." This is a missing feature that I should have already mentioned. So, special thanks to Paul for pointing it out to us.

"Hot swapping" was used extensively back in the 1980s on real hardware. Probably the most common reason that it was used was to switch-out the "AstroBASIC" cart for the Bally BASIC cartridge. Using a specific technique, this allowed a user to load a program into "AstroBASIC," then put in the Bally BASIC cartridge, which supported printing to a serial printer via a modified 300-baud interface. Once the Bally BASIC cartridge was inserted into the astrocade, then the command :PRINT could be used to list a BASIC program to a printer.

Here are the details of how users would swap the two different Astrocade BASIC cartridges:

http://www.ballyalley.com/basic/Cartridge_Conversion.txt

As Paul also mentioned, there are many cartridges, now referred to as BASICarts, that will load a BASIC program from the cartridge. This method didn't become very popular in the 1980s until around 1986 and wasn't mentioned until the very last issue of the Arcadian newsletter was published. Therefore, it didn't get much use back then. However, once the astrocade library began to be archived extensively in the early 2000's, many BASIC programs were converted by an Astrocade fan named Mike White to run from cartridge. Many of these are now on the various versions of multicarts that exist for the astrocade. They're also available from BallyAlley.com if you want to burn them to EPROM.

Since BASICarts are so prevalent in the astrocade library, it would be great if cartridge swapping was supported under the astrocade's MAME driver.

Paul also mentioned support for Music Maker. As Paul said, this uses the same 2000-baud interface as the "AstroBASIC" cartridge. I have been told, but have been unable to verify, that there is one significant difference between how the data is handled between Music Maker and "AstroBASIC." Apparently, what Music Maker outputs as a '1,' "AstroBASIC outputs is a '0' and vice-versa.

The outside of the Music Maker cart looks like this:

[Linked Image]

There are no recordings of any music or sounds in 2000-baud format that can be loaded into the Music Maker cartridge. There were only a few Music Maker cartridges available. I have one of them and it works, but I think my EPROM may be going bad in it, as when I tried to save music, the program now crashes.

The modem driver that Paul archived is for use with a Star-brand modem. I think it is also supported with the Blue Ram Utility 3.0. The Blue Ram hardware uses an Intel 8154 for I/O. I guess that would have to be emulated for input/ouput to work correctly. Then again, earlier in this thread, I did see that a Blue Ram BASIC program was loaded into MAME. In order for the I/O of the Blue Ram to work, I presume it must support the 8154 chip. So maybe that hardware is already emulated?

Yes, I do have the voice recognition hardware called the Computer Ear. The software for it, written in BASIC, is not archived in "tape" format (a WAV file). However, the BASIC listing of the program is available. I've always meant to type it in, but I have never done it before now. As far as I'm aware, even though about about eighty of the Computer Ear devices were made, I am the only person who has one now.

Adam

Oh, and thanks for letting me know to link to pictures rather than expecting support for in-line pictures for posts.
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 07:20 PM

I don't know the keyboard matrix layout of either the Viper or Blue Ram keyboard. Possibly, there is some helpful information about the blue ram keyboard in these documents:

http://www.ballyalley.com/perkins/perkins.html#BlueRamKeyboardDocs

I have a Blue Ram keyboard, but it has somehow become lost in my garage. Either that, or I lent it to someone, but I can't remember who has it now.

Here is a datasheet for the keyboard that I think is used in the Blue Ram keyboard:

http://www.ballyalley.com/documenta...meco_JE_610_ASCII_Keyboard_Datasheet.pdf

A commented disassembly of the Blue Ram keyboard driver is available. Maybe that will have some useful information in it. It's here:

http://www.ballyalley.com/ml/ml_source/ml_source.html#BallyBASICKeyboardDisassembly

The keyboard wiring directions for the Viper keyboard are here:

http://www.ballyalley.com/documenta...ard%20to%20Astrocade%20(Ed%20Larkin).pdf

The software and documentation for the light pen is here:

http://www.ballyalley.com/program_d...rams_i-p.html#Light-PenGraphicsProgramXB

As I mentioned previously, I'm pretty sure that the MAME doesn't currently support the light pen interrupt. Also, I don't know of anyone who has a light pen for the Astrocade.

It's great to see activity happening in the MAME community for the astrocade driver.

Adam
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/19/19 07:58 PM

I have now successfully saved an "AstroBASIC" program from MAME as a WAV file and loaded it onto a real Astrocade.

The program was a simple "HELLO, WORLD!" three-line BASIC program. After the file was saved, I trimmed the beginning and end silence from the WAV that was created from MAME. I then loaded that WAV file without any modifications onto my real astrocade. It worked fine and didn't give me a "?" (question mark), which would have indicated a checksum error upon loading the program.

I wanted to make sure that the WAV file from MAME also could be processed properly using the 2000-baud digital archive programs for "AstroBASIC." I ran the WAV file created in MAME through BallyBin/AstroWAV 1.4 and it was processed without any errors. I then loaded the digitally archived output from AstroWAV onto my Astrocade without any issues. There were no issues at all.

What should I check now?

Adam
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/20/19 05:42 PM

Astrocade Emulation MAME Speed Difference

Based on these two facts of running "Grandfather Clock" loaded from tape (see early post in this thread):

1) Real Hardware - AstroBASIC: 1 Minute = 38 seconds in real time.
2) Emulation - AstroBASIC: 1 Minute = 55 seconds in real time.

If I've done my math right here, then 55/38 = 1.4474.

This means real hardware runs "Grandfather Glock" about 1.45 times faster than it runs under MAME emulation. I noticed this real hardware vs. emulation speed difference when I loaded "The Gate Escape" from tape. I'm pretty shocked by this speed difference, as I don't remember seeing a speed difference like this between other non-BASIC cartridges.

Any ideas of why this speed difference is happening?
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/21/19 02:26 AM

Michael Di Salvo, on the BallyAlley Yahoo group, suggests this update to the astrocade MAME driver:

----------

Its too bad we couldn't have gotten support for the bankswitched cart added to MAME - that would have been awesome. I'm sure it would have made a difference for Michael Garber to be able to test his game engine and any demos in MAME without having to flash to the cart all the time.

We probably could have gotten more people interested in the cart and its capabilities and maybe gotten some more carts into programmers hands to play around with.

I know its been 8 years now and we've all moved on from that project but I still think about what a 512k game on the Astrocade could have been like...

----------

Michael is referring to his cartridge, which made made in very limited numbers:

https://msdconsulting.wixsite.com/128kgames

More information about how it works is on BallyAlley.com, here:

http://www.ballyalley.com/documentation/bally128k-com/whatsnew.htm

More specifically, here is the memory map for this cartridge:

http://www.ballyalley.com/documenta...h/Astrocade_Maxflash_512K_Memory_Map.txt

This suggestion is probably a little far-out, but it would have been VERY useful when this cartridge was in development.

Adam
Posted By: R. Belmont

Re: Bounty: $100 for Astrocade Tape Support - 03/21/19 12:45 PM

Banked cartridges are easy nowadays in MAME, they would've been more problematic 8 years ago.
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 03/26/19 02:25 AM

Originally Posted by BallyAlley

I timed the grandfather clock running under Bally BASIC and AstroBASIC on real hardware. I also timed the AstroBASIC version running under MAME. I used a digital stopwatch to get these estimates which are probably accurate to within one second. Here are the results:

1) Real Hardware - Bally BASIC: 1 Minutes = 1 minute in real time.
2) Real Hardware - AstroBASIC: 1 Minute = 38 seconds in real time.
3) Emulation - AstroBASIC: 1 Minute = 55 seconds in real time.

I just used regular unaltered version of MAME 0.207 and the one that was modified for tape support. I ran a machine language cartridge called "Goldfish Demo." This program has a clock/timer built into it. I set the time and then timed it to see if it was accurate, and it seems to run about right::

Real Hardware - Machine Language Program (Goldfish Demo): 1 Minute = 1 Minutes
Emulation - Machine Language Program (Goldfish Demo): 1 Minute = 1 Minute

If anyone is curious and would like to try Goldfish Demo for themselves, then it can be downloaded here:

.zip]http://www.ballyalley.com/emul...he%20Bit%20Fiddlers)[Cart%20Version].zip

Again, I think the above link will fail due to the use of brackets in the filename. Here is a text version of the URL:

http://www.ballyalley.com/emulation/cart_images/cart_images/Goldfish%20Demo%20(1982)(The%20Bit%20Fiddlers)[Cart%20Version].zip

This leaves me wonder why "AstroBASIC" running a BASIC program under emulation runs slower than real hardware. Can anyone help explain why this might happen if another cartridge ("Goldfish Demo") runs at full speed?

Adam
Posted By: Edstrom

Re: Bounty: $100 for Astrocade Tape Support - 03/26/19 11:21 AM

In general there are a number of reasons why that could happen, for instance if the timing uses hardware vs delay loops.

On real hardware the delay loops is ok on a single application system but in emulation that might not work if the emulation of the CPU itself is not cycle exact or there are memory accesses that induces wait states in the delay loop that are not emulated exactly.

It could also be that there are different hardware timing possibilities, timers and VBI callbacks etc and some of them are not emulated exactly. It is also known that on some systems PAL and NTSC versions for some softwares on real hardware differ in speed even because it uses the 50 and 60 Hz as the basis for timing, hence the NTSC is 20% faster and they didn't care to fix that in the software.
Posted By: Haze

Re: Bounty: $100 for Astrocade Tape Support - 03/26/19 11:24 AM

Timing for the Astrocade arcade games in MAME was way off for a long time too, but I think people are generally happy with it now.

I don't know if the systems actually share code in MAME (or have code copy+pasted and had fixes only applied in one place) but it might be related if either fixes were only applied in one place, or all timings are based off a single arcade game (Gorf)


Posted By: R. Belmont

Re: Bounty: $100 for Astrocade Tape Support - 03/26/19 12:45 PM

Usually all the stuff Edstrom mentions means the emulation runs faster than hardware though. Having it be slower is much more rare.
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 04/01/19 09:02 PM

Thanks for the information about Astrocade timing under MAME.

I created a hardware timing test using real Bally Arcade/Astrocade hardware. Two programs are run that use clocks which can be used for timing real Bally Arcade hardware versus emulation. One program, Goldfish Demo, is written in machine language. The other program, Grandfather Clock, is written in BASIC. This video can be used to test how the emulation speed is for Astrocade emulation. You can view the video here:

https://www.youtube.com/watch?v=6QSTZ8v9Aa0

Each program is run for three minutes.

Bally Ellerson's "Grandfather Clock" running under BASIC:

1) Real Hardware - Bally BASIC: 1 Minutes = 1 minute in real time.
2) Real Hardware - AstroBASIC: 1 Minute = 38 seconds in real time.

Bit Fiddler's Goldfish Demo running on real hardware:

1) Real Hardware - Goldfish Demo: 1 Minutes = 1 minute in real time.

This video is broken into several parts, to make viewing it easier for those interested in only certain portions of this video.

0:00 - Overview of Time Testing Process
0:06 - Goldfish Demo (Cartridge), Running and Overview of Time Testing Process
3:29 - Grandfather Clock (Bally BASIC), Program Running for 3 Minutes
6:50 - Grandfather Clock ("AstroBASIC"), Program Running for 3 Minutes
9:02 - End Credits

I hope that this video allows comparing real hardware versus emulation easier for those that don't have astrocade hardware.

Adam
Posted By: BallyAlley

Re: Bounty: $100 for Astrocade Tape Support - 04/28/19 05:05 PM

Yesterday I created a video called "Loading and Saving Astrocade 'AstroBASIC' 'Tapes' using MAME Emulation." I uploaded it to various places today.

YouTube:

[video:youtube]https://www.youtube.com/watch?v=jVOG-gs2OLY[/video]

Archive.org:

https://archive.org/details/LoadingandSavingAstroBASICTapesusingMAMEEmulation

BallyAlley.com:

http://www.ballyalley.com/astrocade...dSavingAstrocadeAstroBASICTapesUsingMAME

AtariAge.com:

http://atariage.com/forums/topic/26...-the-bally-astrocade/page-2#entry4265585

This tutorial explains how to load and save Bally BASIC programs in the Astrocade emulator in MAME. Specifically "AstroBASIC" programs are loaded on the emulated Bally Arcade/Astrocade console, a game system released in January of 1978. The steps required to get the MAME emulator up and running with the system ROMs are explained in a previous tutorial called "Setting up Astrocade Emulation Using MAME."

The main idea of this video is to get a user loading programs from "tape" (actually WAV files archived on BallyAlley.com) as quickly as possible. After the instructions in the tutorial have been followed, any user of a Windows system that has at least version 0.208 of the MAME emulator setup can load and save software to and from "tape."

Some short examples from the following type-in programs are provided here:

Loading:

1) 4D2 (Video Art, Machine Language)
2) Electronic Blanked (Video Art, BASIC)
3) M-III Plus (Video Art, BASIC)
4) The Pits (Game, BASIC)
5) Astro Zap 2000 (Game, BASIC)
6) MOD 2 (Graphic Demo, BASIC)

Saving:

1) THANKS.WAV - A short 2-line BASIC Program that's supposed to say "THANKS, 'JUST DESSERTS!,' but I noticed just before uploading this video that I misspelled DESSERTS as DESSETS. No program runs without an error, right?

Note: Occasionally during this video, the screen "flashes." This doesn't happen when using the software. This is a side effect of the Open Broadcaster Software that I used to make this recording. Rest assured, when you run MAME and follow these steps your screen will have none of the flashing.

Adam
© 2020 Forums