Jump to content

hxlnt

Members
  • Posts

    21
  • Joined

  • Last visited

Everything posted by hxlnt

  1. Very cool! I love the idea of an Astrocade port of Bad Apple. Regarding the color conversion, the script converts the image to a static color palette of eight colors: red, magenta, blue, cyan, green, yellow, black, and white. This works well for full-color images but will miss grays on grayscale images. I could probably add some kind of grayscale detection to the script someday, but in the meantime, a quick hack would be to recolor your gray pixels to, for example, red (#FF0000) and green (#00FF00) in an image editor. Then you can tweak the palette in the .asm back to grays. On the other hand, you could probably do some nice compression on the Bad Apple graphic data if it's only two-color, as you'd only need one bit per pixel to represent it...
  2. OK, I got a laptop charger and pushed the correct version to GitHub. Please see the updated script at https://github.com/hxlnt/astrocade/tree/master/tools/astroimg. (You'll notice that it says the file was last updated 3 days ago, but it is indeed the new version. It's just showing the "last edited" date, which was indeed 3 days ago.) I just checked this on my Windows 10 PC, and the code compiles straight away with no need to edit anything. Famous last words, but it SHOULD be fixed now. Looking forward to seeing some more Robotech goodness... EDIT: You will probably get best results by hand-tweaking and downsampling the colors in the image in advance, as you did, but it is not necessary. You can give it a full-color image, too. Add --dither at the end to dither the image. I tested JPG, PNG, and even PSD! They all worked. Sometimes the results of passing in a full-color image are kinda bad. But sometimes they are pretty cool. It's fun to experiment with different methods.
  3. I know exactly why you're having this issue. It's because I uploaded an old version of my code. (Source control is great if you REMEMBER. TO. USE. IT. Argggh!) The laptop with the final version has a dead battery, and someone has my charger, so it might be a day or so before I can upload the corrected version of the script. The reason that the ROM exiting quickly is that it can't write all 4,080 bytes that are in the graphics file. I believe the final version of the code comments out the last 40 bytes of graphics, sets VBLANK to the 101st line instead of 102nd, and MOVEs 101 lines of pixel data instead of 102. You can try altering your .asm and .gfx files accordingly if you like, but there may be other fixes that I can't remember off the top of my head. Sheesh, rookie mistake uploading the unfinished code. (That "wb" and PRGNAME string fix is part of the final version, too.) Haha. Oh, well--it happens to the best of us! Will post here when I get my laptop powered on again and upload the final version.
  4. Wow, good to know. I do have a mostly-functioning Astrocade, but I wasn't able to load the Color Organ .WAV into Bally BASIC, which I now think is due to the .WAV being non-KCS. I thought the PRG of Color Organ might be more like a cartridge ROM, but it is in fact just the BASIC data, so loading it into my flash cart won't work, either. The third option is to type the hundred or so lines straight into Bally BASIC (assuming the flavors of BASIC are compatible). It's doable, but my controllers are a bit finicky. (I think the controller chip inside my Astrocade is semi-busted, because there is often interference between Player 1 and Player 2 input. Makes two-player games extra... interesting.) Is there another option I'm not thinking of? I would love to see a video of this software, but not at the expense of you typing it in manually. Haha, please, think of your fingertips~!
  5. Oh my god, 80s Robotech!! YES!! <3 You are most certainly not doing anything wrong. In fact, kudos for giving it a shot while it's still a work in progress! It's hard to find beta testers for niche software for niche hardware. Haha... In the future, if you have `pip` (Python's package manager, which often installs alongside Python), you can run `pip install -r requirements.txt` from within the directory, and it will install all the necessary packages such as PIL. You can check if you have pip installed by typing `pip --version` and seeing if a version number comes up. `pip install -r requirements.txt` is a common pattern for setting up Python script dependencies--just a tip if you come across a requirements.txt file in the future! I'll be sure to add that to the forthcoming readme. Anyway, I think I tracked down the issue you were having with the script... not your fault at all. I may have forgotten to push a change after testing on my PC. On lines 340 and 397 of astroimg, try changing the "wb" to "w", then save the file and retry the script. If that works, I'll make the corresponding change in the GitHub repo. Regarding your previous question about image size, the script squishes everything to 160 x 102 regardless of the size of the input image. So for best results, you should start with an image that has the right aspect ratio (eg., 1600 x 1020, 800 x 510, and so on). The generated .gfx will comment out the last line, and VBLANK fires at line 101. OK, let me know if that does or doesn't work for you! I have tried to test in lots of different versions of Python and on different platforms, but Python seems to behave differently on each. (And I'm fairly new to the language myself.) Thanks, Adam!
  6. Ah, yes--I went back through some of the documentation I saved and saw that it was meant to be used with an "L&M Software Interface Unit." Maybe a Bally BASIC dupe with a stereo audio in? I wonder if that hardware was ever even created. I am especially curious about Color Organ. I've never seen video of it. I'll see if I can get it running somehow...
  7. I coincidentally cracked open the WAV file for the Color Organ cassette today. Although Color Organ is 300-baud Bally BASIC compatible, it doesn't look like 300-baud KCS to me. For instance, the Color Organ signal is AM rather than FM. I'm working on decoding it now and seeing if it maps to some other existing protocol.
  8. Just wanted to throw in some updates on Astrocade dev tools I've been working on... I've released the first version of astroimg, a little Python script that takes any image and converts it to ready-to-compile Astrocade source code. The script actually produces two files--the ROM itself, which simply displays the graphic, and a separate .gfx file that contains the raw graphic data. One cool feature is that it optimizes for the Astrocade's 8-color palette by determining the best place to position the horizontal color boundary, creating separate palettes for each half of the image, then putting that boundary and palette into the resulting ROM. Here's an example: This image isn't the best, in part because I used a webcam photo with poor lighting and a messy studio behind me. And in the real world, you would probably choose a softer color palette than the bright red and magenta shown here. But hopefully you get the idea. You can also dither the image by passing in a --dither flag at the command line. If you're comfortable running Python scripts without an accompanying instruction guide, you can grab the tool at https://github.com/hxlnt/astrocade/tree/master/tools/astroimg. The code works OK, but it's in serious need of some refactoring, so that's what's next for me. I wrote it all in about 2 nights, so it definitely looks like frenzied-girl-at-a-hackathon code. I may also try to do some smart resizing/cropping, as right now the script just squashes everything to 160x102 regardless of the image's original aspect ratio. I'd like to eventually make astroimg interoperable with my astropaint tool so that you can convert an image, upload it into astropaint, and tweak it by hand. Instead of doing that useful work this weekend, I used astropaint to sketch out an adventure game title screen instead... Additionally, I posted another demo on GitHub. You may recognize it as a shameless ripoff of tribute to the COLOR PICK demo, but refactored to dynamically adjust the horizontal color boundary. I've been thinking about making a music composition tool next. Or a Bally BASIC WAV generator. (Does such a thing exist already?) OK, that's all for now. Let me know if you end up finding any of this stuff useful!
  9. You kind of read my mind with that 3D-printed case link! It never occurred to me to check Thingiverse for an existing model... how cool! I love the pink and white shell combo, too. In case anyones curious, I cut the hole in the Astrocade cart with a regular old X-Acto knife. I was originally going to use it just to score the cart before going in with a Dremel, but the plastic was so soft that I decided to give it a few passes with the X-Acto. It worked great, and the cuts ended up being much straighter than what I could have done freehand with a Dremel. (It was a little sad to deface a real cartridge, but I think it was OK to do one in the name of science.) I looked a bit at other flashcarts but havent investigated compatibility between those and the Astrocart yet.
  10. Since I started getting into Astrocade homebrew dev, I've been thinking about making a little dev cart so I can test my ROMs on real hardware. Well, a few months later, here's the result: Astrocart! It supports a 512KB flash ROM chip, which is bankswitchable with the switches at the left. It's also socketed so you can easily pull it out, reburn, and reseat as needed. As for the magic... well, I believe that beautiful electronics are pleasant to use and share with friends. I designed the board with a galaxy of gold and white stars to help make homebrew development all the more fun and magical. Many thanks are owed to my friend @batslyadams, who did a fantastic job with all PCB routing and general Eagle wizardry. As of right now, this is the only fully assembled Astrocart in existence, but, y'know, maybe more to come.
  11. i just pushed a quick fix that should get it partially working on safari and firefox now. you can click to draw, but you can't click and drag to draw just yet. use this link going forward; the old one was just good for that specific build. oops. https://rawgit.com/hxlnt/astrocade/master/tools/astropaint/index.html i'll try to finish up the fix this week. thanks again for the heads up! it might also be good to zoom out on the page a bit (Ctrl + -) until I can put in a fix the scaling issue.
  12. whoooaaa, very strange! but thanks for the feedback--obviously i should work on fixing that! i've tested the app in chrome on mac osx and in chrome and edge on windows 10. i just pulled it up on safari, and i'm seeing the "not able to draw" issue in mac osx as well. i'll try to push out a fix for that soon.
  13. I'm also throwing Astrocade dev stuff on Github at https://github.com/hxlnt/astrocade. There, you'll find a few things I've made: Demos (compiled and source). Compile and launch batch script. Astropaint, a browser-based tool for drawing Astrocade screens. It outputs a .gfx Z80 file that can be INCLUDEd in your source. Demo it here. Here's an example of something I made with Astropaint. As you can see, it incorporates the Astrocade color palette and movable color boundary. If anyone ends up using anything here, let me know!
  14. hxlnt

    paint900

    From the album: astrocade dev

    © 2018 hxlnt

  15. hxlnt

    astrocade dev

  16. Dev update: Still making demos . About to get into animation and sound. The UPI concept is pretty interesting. Speaking of sound, I noticed a request on the Bally Alley website to clean up some of the notes in the Happy Birthday music demo, so I took a shot at it. Here's my version: ; Title - Happy Birthday Music MUSSTK EQU $4F12 ; Music Stack Pointer INCLUDE "HVGLIB.H" ORG $2000 ; First byte of Cartridge DB "U" ; User System Sentinel DW MENUST ; Next menu link DW PRGNAM ; Address of title for program DW PRGST ; Jump here if prog is selected ; Main Program PRGST: DI SYSTEM (INTPC) ; DO (SETOUT) ; UPI - Set Display Ports DB 90*2 ; ... Vertical Blanking Line (Line 90) DB 44 ; ... Left/Right Color Boundary DB $08 ; ... Interrupt Mode ; DO (COLSET) ; UPI - Set Color Registers DW COLTAB ; ... Color Table ; DO (FILL) ; UPI - Screen Fill DW NORMEM ; ... Destination DW 4000D ; ... Bytes to move DB $00 ; ... Background color ; DO (STRDIS) ; UPI - Display String DB 10 ; ... X coordinate DB 30 ; ... Y coordinate DB 01101000B ; ... Options (2x X-OR Write in Color 2) DW STRING ; ... Address of string to display ; DO (ACTINT) ; UPI - ACTivate sub timer INTerrupts ; DO (BMUSIC) ; UPI - Begin Playing "Happy Birthday" Music DW MUSSTK ; ... Music Stack DB 11000000B ; ... Setup Voices, Use Tone A DW BDAY ; ... Music Score for "Happy Birthday" ; EXIT LOOP: NOP JP LOOP ; Infinite loop ; Color Table #1 COLTAB: DB $00 ; Color 3 Left - Black DB $5A ; Color 2 Left - Red DB $77 ; Color 1 Left - Yellow DB $07 ; Color 0 Left - White DB $00 ; Color 3 Right - Black DB $5A ; Color 2 Right - Red DB $77 ; Color 1 Right - Yellow DB $07 ; Color 0 Right - White PRGNAM: DB "HAPPY BIRTHDAY (120 BPM)",0 STRING: DB " HAPPY BIRTHDAY!",0 ; "Happy Birthday" Music Score ; 1/8 Note = 15 1/2 Note = 60 ; 1/4 Note = 30 Full Note = 120 BDAY: ; Happy birthday to you MASTER OA1 ; Master Oscillator (User HVGLIB.H Note Value) VOLUME $0A, $00 ; Set Volumes TONE A = 10, Tone B = 0, and Tone C = 0 NOTE1 15,G5 ; 1/8 Note LEGSTA ; Turn on LEGATO NOTE1 15,G5 ; 1/8 Note NOTE1 30,A5 ; 1/4 Note NOTE1 30,G5 ; 1/4 Note MASTER OA3 NOTE1 30,C4 ; 1/4 Note NOTE1 30,B3 ; 1/2 Note LEGSTA ; Turn off LEGATO MASTER OA2 VOICEM 11110000B ; Set Voices, Use Tones A and B VOLUME $AA,$00 ; Set Volumes, Tone A = 10, Tone B = 10, and Tone C = 0 NOTE2 30,F4,G4 ; 1/4 Note ; Happy birthday to you VOICEM 11000000B ; Set Voices, Use Tone A VOLUME $0A, $00 ; Set Volumes MASTER OA1 NOTE1 15,G5 ; 1/8 Note LEGSTA ; Turn on LEGATO NOTE1 15,G5 ; 1/8 Note NOTE1 30,A5 ; 1/4 Note NOTE1 30,G5 ; 1/4 Note MASTER OA3 NOTE1 30,D4 ; 1/4 Note MASTER OA2 NOTE1 30,C5 ; 1/4 Note LEGSTA ; Turn off LEGATO VOICEM 11110000B ; Set Voices, Use Tones A and B VOLUME $AA,$00 ; Set Volumes, Tone A = 10, Tone B = 10, and Tone C = 0 NOTE2 30,E4,G4 ; 1/4 Note ; Happy birthday, dear _____ VOICEM 11000000B ; Set Voices, Use Tone A VOLUME $0A, $00 ; Set Volumes, TONE A = 10, Tone B = 0, and Tone C = 0 MASTER OA1 NOTE1 15,G5 ; 1/8 Note LEGSTA ; Turn on LEGATO NOTE1 15,G5 ; 1/8 Note MASTER OA3 NOTE1 30,G4 ; 1/4 Note NOTE1 30,E4 ; 1/4 Note MASTER OA2 NOTE1 30,C5 ; 1/4 Note MASTER OA3 NOTE1 30,B3 ; 1/4 Note NOTE1 30,A3 ; 1/4 Note LEGSTA ; Turn off LEGATO ; Happy birthday to you VOICEM 11110000B ; Set Voices, Use Tones A and B VOLUME $AA,$00 ; Set Volumes, Tone A = 10, Tone B = 10, and Tone C = 0 NOTE2 15,F4,A4 ; 1/8 Notes VOICEM 11000000B ; Set Voices, Use Tone A VOLUME $0A,$00 ; Set Volumes, TONE A = 10, Tone B = 0, and Tone C = 0 NOTE1 15,F4 ; 1/8 Note LEGSTA ; Turn on LEGATO VOICEM 11110000B VOLUME $AA,$00 NOTE2 30,E4,G4 NOTE2 30,C4,G4 NOTE2 30,B3,D2 MASTER OA2 VOICEM 11000000B VOLUME $0A,$00 NOTE1 30,C5 VOLUME $AA,$00 VOICEM 11110000B NOTE2 15,E4,G4 QUIET
  17. A few updates with tips and tricks I learned along the way... I made a simple .bat file that compiles the source code, copies the ROM into the proper MAME folder, and opens the ROM in MAME all at once. It makes the dev/test cycle quite easy! zmac -o mygame.bin mygame.asm copy mygame.bin "C:\<your-path-to>\mame\roms\astrocde\" cd "C:\<your-path-to>\mame\" mame64.exe astrocde -cart "C:\<your-path-to>\mame\roms\astrocde\mygame.bin" I wanted to try full-screen graphics for the Astrocade, but after hand-coding 100 bytes or so of pixels, I realized it'd be nicer to write a web app to convert a BMP for me. So, I whipped up some Javascript that accepts a locally-stored 160x102 BMP and displays the byte codes row by row like this: ; ASTROCADE GRAPHICS ; Row 1 DB $0, $0, $0, $6, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $a0, $0, $0, $0, $0, $0, $0, $0, $6, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $c0, $0, $0, $0 ; Row 2 DB $0, $0, $0, $a, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $a8, $0, $0, $0, $0, $0, $0, $a, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $b0, $0, $0 ; Row 3 DB $0, $0, $0, $a, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $0, $0, $0, $0, $0, $a, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $aa, $a0, $0 ... The code is on GitHub, though it's suuuuper hacky and unfinished, as I made it as quickly as possible and just to convert my specific BMP rather than the full range of different BMP color depths, byte orders, etc. Right now, it's also hardcoded to accept just four colors. However, I'll continue working on it in December and host it on my site so it can actually be useful to other people! Here's the result from my BMP conversion as seen in the MAME Astrocade emulator: OK, this is too fun... (P.S. Adam, you can see some of my NES projects such as ConnectedNES on my website, nobadmemories.com.)
  18. Ahh, thank you so, so much! This loaded my helloworld.bin homebrew like a charm! I recently acquired an Astrocade after spending hours reading through the great stories and source code on Bally Alley. I've been blown away by the tech (for its time) and am looking forward to developing for it. I think it would be fun to make a reflashable cart for personal dev testing on real hardware, but I don't have any big plans other than just learning the ins and outs of the CPU and having fun. My background is in making cutesy, girly homebrew games for the NES, so I'll likely be making... cutesy, girly games for the Astrocade. Thanks again for the help and for all you do with Bally Alley! It's awesome!
  19. Does anyone have any tips on getting homebrew to run in the MAME emulator? I compiled an Astrocade ROM from source, added its info to the XML file in the hash folder along with the CRC/SHA-1/ROM size info, and was able to load it MAME. However, I'm just seeing the Astrocade 1-2-3-4 menu, not the actual game. As a test, I made a dupe of Zzzap/Dodgem and added it to the XML software list as described above, and I got the same result: the Astrocade menu (as if no cartridge were inserted). That kind of confounds me, since the entry looks pretty much identical to the working version of Zzzap/Dodgem, only with a different .bin and .zip name (which I changed in the software list to match). I'm trying to get this up and running so I can start in on my own Astrocade homebrew ROMs. Assuming I can get the emulator working, my plan is to write a script that automatically overwrites the SHA-1 every time I recompile the .asm.
×
×
  • Create New...