Jump to content

Tjoppen

Members
  • Content Count

    222
  • Joined

  • Last visited

  • Days Won

    1

Everything posted by Tjoppen

  1. Thanks! I hadn't thought of using both channels to double the effective amplitude. But wouldn't the maximum effective amplitude be 30? So it's just a tad shy of being true 5-bit sound, more like 2^5-1 sound. Yes, of course. It comes to log2(31) = 4.95 bit which you might as well round up to 5-bit I think you should (ideally) update on every line with this method, even during VBLANK and VSYNC. And if possible, updating twice per line would be better than updating once per line. Yes, this is probably doable for a demo. For a game, less so, except maybe a static screen. Regarding near exact reproduction of certain notes, you could always "not care" like lft suggested in his talk at Revision this year ( , VCS mentioned in the middle somewhere). I already looked a bit, but now I'll have to take a closer look.
  2. I've given this problem some thought as well, and there are a couple of ideas: The simplest is to set AUDC0 (or 1) to zero and put raw 4-bit PCM values in ADVC0 at your sampling rate. You can bump the resolution to 5-bit by using both channels. You need to update AUDV0 at regular intervals with this method, which is probably going to be tricky. If you only update it in your display kernel you'll get a ring modulator effect (think Dalek) since you're not updating it during VBLANK. Free audio effect or annoying distortion depending on how you look at it The method I'd probably shoot for is some kind of vector quantizer. Build a big codebook where each entry corresponds to the spectrum of every combination of the audio registers in one or both channels. Then just do a brute force search for the spectrum of the audio for each frame of your effect. I'd probably stick to one channel in order to avoid having to worry about phase. For voice you can probably get away with something very simple. If you accompany it with text just getting the volume right with some white noise could suffice. In the demo world, this is what (core) seems to do - see http://pouet.net/prod.php?which=30236 . Another example that seems to be using a similar technique is Robotic Liberation (http://pouet.net/prod.php?which=10626), though that is on a VIC-20.
  3. Sounds reasonable. FYI all PAL TVs we tested the Harmony on with the NTSC BIOS worked fine. There was some interference in the bottom of the screen on one TV, but the interface was entirely usable.
  4. Just a very simple suggestion that I thought of yesterday: If you put the PAL BIOS on cartridges shipped to PAL regions it'll most likely improve the first-time experience for users. Luckily we didn't have a problem since the TV we used handled the NTSC-like signal just fine (except for the colors being wrong of course). Others might not be so lucky though, hence this thread. That is all.
  5. Me and a friend got our Harmony carts yesterday (the deluxe + regular sent to Sweden if you're wondering). They work great - awesome work Popped in one of my WIP games and it worked perfectly on the real thing. I have some questions and suggestions, but I'll take them in separate threads.
  6. Yay, raster bars Was it presented via an emulator or a real VCS? Anyway, good to see more VCS demos on pouet. Hopefully I'll get my creation done for next Assembly and posted shortly after.
  7. Regarding voltages and such: Since the VCS uses a 7805 regulator (judging by PCB photos) it should take any DC voltage between 8-35 V (give or take on the upper bound). So the supply giving a little more voltage with less load is definately not an issue unless you're using a 24 VAC supply (-> 36 VDC when rectified) or something like that.
  8. Yes, I agree. Anyway, since this seems to fix the only issue I have with the program I'll probably place an order today or tomorrow.
  9. The con workaround doesn't seem to work for me. I found an alternative solution in the following thread on stackoverflow: http://stackoverflow.com/questions/54536/win32-gui-app-that-writes-usage-text-to-stdout-when-invoked-as-app-exe-help Implementing Hugh Allen's suggestion seems to work quite well. The only downside I can see is that there is a temporary console visible for a split second when starting the GUI app from a shortcut. A slightly better solution would be to use the .com/.exe trick, but I don't know how to set up the Qt project for that. There's a project called dualsubsystem on Google Code for this, which may be easier to work into Stella at least: http://code.google.com/p/dualsubsystem/ Anyway, proof-of-concept patch attached. 0001-Switch-to-the-console-subsystem-on-Windows-and-ditch.patch.txt
  10. I tested the patch on Windows (yay for Qt being 1.5 GB) and I was wronng about the problem. HarmonyCart.exe works just fine - it just doesn't produce any console output because it doesn't use the console subsystem. To get the console output, redirect the program's output to a file (or pipe to cat in MinGW), like: c:\Program Files (x86)\HarmonyCart>HarmonyCart.exe -help > c:\work\test.txt c:\Program Files (x86)\HarmonyCart>type c:\work\test.txt Harmony Programming Tool version 1.1 Usage: harmonycart [options ...] datafile Run without any options or datafile to use the graphical frontend Consult the manual for more in-depth information Valid options are: -bios Treat the specified datafile as an EEPROM loader BIOS image Otherwise, the datafile is treated as a ROM image instead -bs=[type] Specify the bankswitching scheme for a ROM image (default is 'auto ') -help Displays the message you're now reading This software is Copyright (c) 2009 Stephen Anthony, and is released under the GNU GPL version 3. c:\Program Files (x86)\HarmonyCart> However, this is tedious. I managed to figure out that adding "CONFIG += console" to the project file fixed this problem. One problem is that this causes a useless console to pop up when the GUI is launched. The attached file adds a new project called harmonycart-cli just for Windows. I also modified main.cxx slightly to be more console friendly (show help rather then the GUI when run without options). Ah, and having a .txt file extension makes the file attachable - yay! 0001-Add-harmonycart-cli-project-for-Windows-to-work-arou.patch.txt
  11. Here's a patch that makes the program use QApplication::arguments(). Feel free to incorporate it into the next version. So far I've only tested it in Ubuntu since I don't have Qt set up on any Windows machine atm. I might try it later though. edit: hrm, the forums won't let my upload .patch files. I pasted it below instead: From eed32d0c6cd862f79f444528cf116fc7255fd6ba Mon Sep 17 00:00:00 2001 From: Tjoppen <[email protected]> Date: Wed, 13 Apr 2011 09:52:18 +0200 Subject: [PATCH] Use QApplication::arguments() instead of argc/argv since the latter doesn't work on Windows --- main.cxx | 30 +++++++++++++++++------------- 1 files changed, 17 insertions(+), 13 deletions(-) diff --git a/main.cxx b/main.cxx index 3312227..9e027b0 100644 --- a/main.cxx +++ b/main.cxx @@ -27,22 +27,22 @@ #include "HarmonyCartWindow.hxx" #include "Version.hxx" -void runCommandlineApp(HarmonyCartWindow& win, int ac, char* av[]) +void runCommandlineApp(HarmonyCartWindow& win, const QStringList& args) { string datafile = ""; BSType bstype = BS_AUTO; bool biosupdate = false; // Parse commandline args - for(int i = 1; i < ac; ++i) + for(int i = 1; i < args.size(); ++i) { - if(strstr(av[i], "-bs=") == av[i]) - bstype = Bankswitch::nameToType(av[i]+4); - else if(strcmp(av[i], "-bios") == 0) + if(args.at(i).indexOf("-bs=") == 0) + bstype = Bankswitch::nameToType(args.at(i).mid(4).toStdString()); + else if(args.at(i) == "-bios") biosupdate = true; // else if(...) // add more options here else - datafile = av[i]; + datafile = args.at(i).toStdString(); } Cart cart; @@ -102,7 +102,15 @@ void runCommandlineApp(HarmonyCartWindow& win, int ac, char* av[]) int main(int ac, char* av[]) { - if(ac == 2 && !strcmp(av[1], "-help")) + // The application and window needs to be created even if we're using + // commandline mode, since the settings are controlled by a QSettings + // object which needs a Qt context. + QApplication app(ac, av); + + // Get the arguments via Qt since av contains empty strings on Windows + QStringList args = QApplication::arguments(); + + if(args.size() == 2 && args.at(1) == "-help") { cout << "Harmony Programming Tool version " << HARMONY_VERSION << endl << endl @@ -123,13 +131,9 @@ int main(int ac, char* av[]) return 0; } - // The application and window needs to be created even if we're using - // commandline mode, since the settings are controlled by a QSettings - // object which needs a Qt context. - QApplication app(ac, av); HarmonyCartWindow win; - if(ac == 1) // Launch GUI + if(args.size() == 1) // Launch GUI { // Only start a 'connect' thread if we're in UI mode win.connectHarmonyCart(); @@ -138,7 +142,7 @@ int main(int ac, char* av[]) } else // Assume we're working from the commandline { - runCommandlineApp(win, ac, av); + runCommandlineApp(win, args); } return 0; -- 1.7.1
  12. Yes, I remember this feature now that you mention it This is probably the preferred method since it will do everything for you. I admit I haven't played around with this very much. There's still the question of why it doesn't seem to do anything with extra arguments on Windows. I tested it in cmd on both Vista and 7. Suspecting that it might have accidentally been compiled with older source code or something I ran strings on HarmonyCart.exe to see if it contained the usage text or not. It did, which has me confused. Maybe main() gets called from WinMain() without passing along the arguments or something? Here's part of the strings btw: Harmony Cart not detected Downloading BIOS file... Couldn't find BIOS file ' Couldn't open Harmony Cart Downloading single-load ROM file... Couldn't find ROM file ' -help Harmony Programming Tool version Usage: harmonycart [options ...] datafile Run without any options or datafile to use the graphical frontend Consult the manual for more in-depth information Valid options are: -bios Treat the specified datafile as an EEPROM loader BIOS image Otherwise, the datafile is treated as a ROM image instead -bs=[type] Specify the bankswitching scheme for a ROM image (default is 'auto ') -help Displays the message you're now reading This software is Copyright (c) 2009 Stephen Anthony, and is released under the GNU GPL version 3. edit: It seems one might need to call QApplication::arguments() to get the arguments on Windows. See http://stackoverflow.com/questions/2918353/obtaining-command-line-arguments-in-a-qt-application I also found this: http://web.mit.edu/qt-dynamic/www/qcoreapplication.html#arguments
  13. @batari: Thanks, that looks like it could work. Hopefully the lpc2isp binary you uploaded will suffice - I'd rather not deal with Yahoo. For future reference, lpc2isp seems to be accessible in source form via http://www.cmucam.org/browser/trunk/tools/lpc21isp, which I'm sure one could work out an SVN URI from. @alex_79: That sounds exactly like what I want, and might be the CLI batari mentioned. I checked the source code out and it seems to indicate that the programming tool should indeed work that way. Since I don't have the hardware yet, I can't test this properly. However, "HarmonyCart.exe -help" should display usage information according to main.cxx:105. It doesn't, which has me a little worried. Similarly, running "HarmonyCart.exe foo.bin" results in zero console output: If Windows requires a separate CLI tool it'd be great if it were bundled with the HarmonyCart installer. Thanks for the help so far. Assuming there's no problem shipping to Sweden I'll probably place an order in the near future
  14. I've been considering investing in a Harmony to be able to test my creations on a real VCS. It seems the Harmony can be in-system programmed judging by [1] and the programming tool. My question is: is there's a command line interface for downloading ROMs to the device? I use Visual Studio as my programming environment, so having this ability would enable me to have a target that when run will assemble, download and reset the system. That way I can develop with my laptop on the couch in front of the TV, which would be the killer app for me so to speak. I searched around the forums and couldn't come up with an answer, hence this post. [1] http://www.randomterrain.com/atari-2600-memories-batari-basic-commands.html#harmony (I'm not using bB though)
  15. Cool, thanks for the tip. I hadn't thought of using VisualbB. The editor isn't exactly the pinnacle of usability though, but it looks like it might do for now. Specifically, setting the colors per line is very cumbersome.
  16. Hi everyone. First post on these forums for me. I've been hacking away at a couple of VCS projects for the past months, and have come across a problem that I can't imagine is very unique: I want to create (symmetric) playfield graphics with per-line background/playfield colors. Sadly I can't find a working tool suitable for this job, so I was hoping someone has some tips. PlayfieldPal works well enough for painting monochrome backgrounds, but doesn't do colors. This is what I've used so far, with ok-ish color tables created manually. TiaPaint is very nice, but only works in DOSBox and only does per-frame background/playfield colors. VCS Graphics Editor looks pretty much like what I want, but I can't get the JAR to start and the Java Web Start thing doesn't appear to work correctly. I might end up writing my own tool, but GUI stuff isn't exactly my strong point. I'm thinking a command-line tool that takes a BMP and spits out PAL, NTSC or SECAM data. But that wouldn't be very WYSIWYG... Any ideas?
×
×
  • Create New...