Jump to content

Ryan Witmer

+AtariAge Subscriber
  • Content Count

    683
  • Joined

  • Last visited

Everything posted by Ryan Witmer

  1. Like @carlsson said, the argc, argv stuff is for command line arguments. The first is the file you want to read, the second is the name of the file you want to write to. Assuming the code does what you want (which I'm still not certain of) you shouldn't need to make any changes, apart from possibly fixing my misspelling of "destination" early in main().
  2. This might do what you want: #include <iostream> #include <fstream> #include <string> #include <vector> #include <algorithm> #include <cstddef> #include <cstdlib> unsigned string_to_byte(std::string value) { unsigned byte = 0; std::for_each(value.crbegin(), value.crend(), [&byte] (char c) { byte <<= 1; if (c == 'X') { byte |= 1; } }); return byte; } int main(int argc, char *argv[]) { if (argc < 3) { std::cerr << "Source and desination arguments required\n"; return EXIT_FAILURE; } std::ifstream in(argv[1]); if (!in) { std::cerr << "Unable to open input file\n"; return EXIT_FAILURE; } std::vector<std::string> lines; std::string line; while (std::getline(in, line)) { lines.push_back(line); } if (lines.empty()) { return EXIT_SUCCESS; } std::vector<std::string> columns(lines[0].length()); std::for_each(lines.cbegin(), lines.cend(), [&columns] (const std::string &line) { for (std::size_t x = 0; x < line.length(); x++) { columns[x] += line[x]; } }); std::vector<unsigned> data; std::for_each(columns.cbegin(), columns.cend(), [&data] (const std::string &column) { for (std::size_t x = 0; x < column.length(); x += 8) { data.push_back(string_to_byte(column.substr(x, x + 8))); } }); std::ofstream out(argv[2]); if (!out) { std::cerr << "Unable to open output file\n"; return EXIT_FAILURE; } for (std::size_t x = 0; x < data.size(); x++) { out << data[x]; if (x != data.size() - 1) { out << ','; } } return EXIT_SUCCESS; } Although, the example output you posted doesn't match up with the input you posted based on your description. I tried to make the most sense out of it that I could. This logic is... weird, and I could really use a better description.
  3. Queen Sugar: Sugar Burst The mighty fairy queen launches beams of sweetness that explode into damaging candy hearts. This sugary attack comes from behind your opponent, forcing them closer to the dangerous shooting stars, as well as the deadly heart shaped candies. The queen is truly a fearsome foe!
  4. The Sega Master System has some really great light gun games.

    1. save2600

      save2600

      Yes it does! Cool you're experiencing some of them.   :)

    2. Ryan Witmer

      Ryan Witmer

      The only one I got to play back in the day was Safari Hunt.  Now I have Wanted!, Gangster Town, and Missile Defense 3D which are all excellent.  I also have Marksman/Trap shooting which is... not so excellent.

  5. Zevasha: Darkness Falls Powerful beams of pure malignant energy fire from the center of the screen. These things are fast and you'll need to react quickly to avoid damage. The dark fairy queen shows no mercy, not even to her cat.
  6. 7ZC-BX: Atomic Cleaning Laser This is a fun one. Upon activation, a targeting crosshair will appear and begin chasing your opponent around the screen. The crosshair will periodically stop and turn red. That's your warning that this is about to happen: Two big honkin' lasers converge on the point where the crosshair stopped. After the lasers fire, the chase begins again until the attack times out.
  7. Xorex: Arctic Blast The socially-awkward ice-fairy unleashes his deadly magic in this rain of frozen death. Do your best to navigate a path through the shower of icy spikes. That cat's not having a good day.
  8. It's been a while since I've posted about this project, but plenty has been done and I wanted to show off some of the cool stuff I've got going on. The biggest thing left to do for this game is the character specific attacks, and I've got half of them done at this point. I got an idea this morning for what might be the next one, but that needs some more thought. Anyway, the character attacks are really the heart of the game because they're what makes every character different. So, in the order I coded them, let's check them out! Pork-Chop: Gator Rush Our intrepid ratcatching hero makes use of those horrible sewer alligators that make his day job so dangerous. These guys will cross the screen in waves, one from each side, and they're fast! Be quick on that trak-ball and avoid them to prevent damage to yourself. The gators are upside down here because everything on the top screen is upside down. Poor evil Zevasha is about to get chomped.
  9. That does seem very strange. I use DASM and don't have any trouble at all with labels inside macros. ; This macro defines subroutines that play sounds in the ; various channels. The sound should have its address ; placed in $fe-$ff. ; Arguments are: ; {1} the AUDC register. ; {2} the AUDF register. ; {3} the sound pointer. ; {4} the timer location. ; {5} the control location. mac start_sound ldy #0 ; 0 index. lda ($fe),y ; Load the AUDC value. sta {1} ; Fill AUDC. sta {5} ; Save AUDC for rests. iny ; Step forward. lda ($fe),y ; Load the AUDF value. sta {2} ; Fill AUDF. iny ; Step forward. lda ($fe),y ; Get the frame count. sta {4} ; Save it. inc $fe ; Move the pointer to the first record. bne .no_carry inc $ff .no_carry lda $fe ; Store the record address. sta {3} lda $ff sta {3} + 1 rts endm This macro in particular is repeated four times in immediate succession without issues. This is a basic function of macro assemblers and I'd be shocked if yours didn't support it. Perhaps there's some special syntax for a "macro-local" label in that assembler.
  10. I'm guess I'm lucky in that I'm not trying for boxes/manuals/overlays/variations. I'll take them if I can them for a reasonable price, but it's not worth my time to go tracking them down.
  11. If it gets one, I need to know what voodoo was used to produce that 64KB cartridge. The things I could do with another 32KB...
  12. Great Ice Hockey ain't.

    1. Zoyous

      Zoyous

      Great Baseball, Great Golf, Great Volleyball, and Super Tennis are all pretty good in the context of 1986. Great Basketball, Great/Sports Pad Football, and Great/Sports Pad Hockey are not.

    2. Ryan Witmer

      Ryan Witmer

      I like Great Baseball, but I had that as a kid so there may be some bias.  Great Golf seems pretty good, although I don't have the patience for golf games anymore.

       

      Great Football is awful but that doesn't stop me from liking it.

    3. Zoyous

      Zoyous

      I had Great Baseball, as a kid, too! It did have a season and a pennant race, and a home run derby, so it had some long-term replayability.

       

      My main beef with Great Football was its single player mode, which wasn't a full game - it began in the 4th quarter with you down to the CPU, who might have as much as a 42-0 lead, and you would see if you could come back to win it. I never did play it two-player, though. I think it was the first game I ever returned to the store!

       

      The Sports Pad sports games are, surprisingly, not tuned well to use the Sports Pad, so the peripheral got a bad reputation... but using it in "Digital" mode on other games, it's a very responsive and accurate controller... works great for precision on shooters.

    4. Show next comments  39 more
  13. I may have just tracked down a six month old bug in my 5200 project.  Time will tell...

    1. Giles N

      Giles N

      What is your 5200 project (about)?

       

       

    2. Ryan Witmer

      Ryan Witmer

      Fairies, shooting, trak-balls, and more fairies.

       

      But mostly fairies.

  14. Surely you can let go of one of those inferior two-port models.
  15. The Sega Saturn. I'm a huge fanboy for this system, and it has some truly amazing games, many of which were exclusive to the console and often never made it out of Japan. The claim I like to make is that while its competitors (the Playstation and Nintendo 64) may have had more good games, at least in the US, the best games on the Saturn were better than anything on those two systems.
  16. Will game developers ever learn the difference between a magazine and a clip?

    1. Albert

      Albert

      People still read magazines?

  17. Curling doesn't use the trak-ball, at least not on purpose.
×
×
  • Create New...