Jump to content

stepho

Members
  • Posts

    172
  • Joined

  • Last visited

Everything posted by stepho

  1. I'm a bit late to the party - oh well... @Andrew Davie's bit twiddling reminds me of DEC's radix50 method to pack 3 characters (selected from a set of 40) in 16 bits. See https://en.wikipedia.org/wiki/DEC_RADIX_50 Relies on cheap multiplication to pack them and cheap division to unpack them. Packed format was essentially char*40*40+char2*40+char3 Each character takes log(40)/log(2) = 5.32 bits. I used it on an ARM project a couple of years ago where I had to send text in very small radio packets between 2 devices. The reduced character set was adequate for my purposes.
  2. If going the USR route then you could have a simple assembly routine that simply does the AND #01 instruction to get the lowest bit. No FP required.
  3. x MOD 2 just returns the lowest bit: 0 or 1. Replace with x/2<>int(x/2) Sure wish Atari Basic has bit operators. I agree with Rybags, probably meant to be (D-2) MOD 2 and (D-1) MOD 2. Except that (D-2) MOD 2 is always exactly the same value as D MOD 2 . (2 MOD 2) is of course just 0 and (1 MOD 2) is always 1 .
  4. For me in the late 80s and 90s on non gaming devices, I'd build my binary on a DOS based PC, burn the image to an EPROM, plug the EPROM in and see what happens. Also had a big pile of EPROMS being erased under a UV lamp. A RAM based EPROM simulator certainly would have made my job much easier - oh well, 20/20 hindsight. My equipment was modified to have a bank of LEDs hanging off it that my code would trigger on/off as it passed through various points (eg turn on LED3 when entering interrupt handler, turn off when exiting handler, or turn on LED5 when a particular state is reached). I'd hook up an oscilloscope to these LEDs, record a run and look at the recording to see the timing and which routines/states were being reached. I still use this technique for time sensitive code that can't be single stepped with a modern debugger (typically when my code is watching external signals that can't be slowed down).
  5. Since we mostly want to store frequency, volume and modulation effects, that's a pretty good match for MIDI.
  6. Sandbagging came from drag racing. Run the early part of the day with a bag of sand in the car, hidden from prying eyes. For the final race, secretly remove the sandbag. This works because to go faster you have to overstress the engine. Going faster means risking the engine blowing up, which would lose the race. If you think your opponent can do a 5 second run then you stress your engine to do a 4.9 second run. But if he removes the sandbag then he can do a 4.7 second run and win. You can second guess him by stressing your engine even more but if he hasn't used a sandbag then you have stressed your engine more than it needs and maybe blow it up when you didn't have to.
  7. Australian spec 2600s output to VHF channel 3 or 4. We didn't have UHF stations at all in the early 1970s and only the more expensive TV's had UHF receiver channels in anticipation of it coming soon.
  8. Might be useful to remember what BCC and BCS stand for: BCC - Branch if Carry is Clear (ie previous operation did not require a carry) BCC - Branch if Carry is Set (ie previous operation did require a carry, typically) CMP is really just SUB that throws away the results but keeps the flags. So CMP XXX is really SUB XXX, which is really (reg A - XXX).
  9. From the image, the part number is CO14806-12. As pseudografx said, 8302 is the production date.
  10. If the VR is getting way too hot then it is probably shorting something. Be careful that you don't replace it and then simply fry the new one too.
  11. Wasn't that based on this thread? https://forums.atariage.com/topic/330879-16k-3d-engine/
  12. Cool ! My uni used Compucolour as terminals to the VAX VMS systems. First week at uni they gave us am 8" floppy and a few minutes of "insert disk, turn on, press '1', then login" for the less bright among us. Not many students realised that there was a full computer inside it.
  13. At school (8th grade) we had dial up access to a PDP-11/45 running Basic+. Later the school bought some CP/M machines for which I wrote a Z80 disassembler and some machine language graphic routines. Then in Uni I moved up to big iron - DEC-10, PDP-11/70, VAX-11/750 and an IBM 360. But I bought myself a second-hand Atari 800+1050 and used it to prototype a mini payroll package for my Pizza shop boss (first paid SW job). Handed in my third year uni project printed by a 1020 plotter (ie half width and half height of standard paper but still 80 column).
  14. Sounds like the cable between the TV and Atari and the cable between the AtariVox and the speaker are joined somewhere. The AtariVox output is being put onto RF cable and merging with the RF signal. The TV interprets part of that signal as audio (hence hearing it on the TV) and part of it as video (hence lines on the TV). As someone said above, the sockets on the speaker are probably audio out (not in), so nothing is heard from them.
  15. Nicely done - especially little details like the "dot" at the back of the dog and how the branch bends as the bird bounces up/down.
  16. https://theswissbay.ch/pdf/Gentoomen Library/Programming/Python/Thinking in Python (Bruce Eckel%2C Rev 0.1.2) - 2001.pdf https://github.com/BruceEckel/ThinkingInPython You do need to think in new patterns. Eg, the FOR loop is usually the wrong way to do it in python. Basic is a very old style language and simplistic. We have made vast improvements in newer languages. Far from being a beginner's language, I've see it used as a substitute for MatLab (ie maths heavy stuff), as a string processor (eg generating C/C++ code from small config files), an application download manager and real-time management of vehicles on mining sites. Comparing equivalent algorithms in C/C++ code and python code, the Python code is far simpler, far more natural and far easier to understand/modify. Admittedly, speed is not its forte - but same issue for Basic. And it is memory hungry - ruling out most 8-bit systems.
  17. I definitely remember playing Breakout in Australia (a PAL country) as a kid. It was one of the games that practically every one had. I think it was an included game when we bought the console but that's just an (unreliable) memory.
  18. The extra sockets maybe to help avoid pin breakage when plugging in/out many times from the cartridge. If you break the occasional pin then you just replace that extra socket rather than losing the game.
  19. Very nicely done. But fun-fun-fun will always be the theme song to Red Dwarf: It's cold outsideTheres no kind of atmosphereI'm all alone, more or lessLet me fly far away from hereFun Fun Fun, in the Sun Sun SunI want to lie, Shipwrecked in-comatoseDrinking fresh mango juiceGold fish shoalsNibbling at my toesFun Fun Fun in the Sun Sun SunFun Fun Fun in the Sun Sun Sun
  20. Generally clean code. Some nit picks... rand_target = (rand() % player_limit) + 1; // generate "computer's guess" If player_limit is 65535 then you have a small chance of the target being 65536, which would become 0 for uint16_t . Since you also want to eliminate 0, you probably want : rand_target = (rand() % (player_limit-1)) + 1; // generate "computer's guess" You can find boundary conditions like that by testing with a small limit of, say, 7 and then noticing if you occasionally get an 8. Or by changing uint16_t to uint8_t and testing enough to see the occasional 0, then changing back to uint16_t . Always test boundaries - its where the majority of bugs like to hide. All uppercase is considered SHOUTING, which my mother taught me is rude! Just say no! Even most old devices just display lowercase as uppercase, so it works on most old devices too. For the very, very, few that don't display nice things for the lowercase letters, there are alternatives that I can elaborate on later. Generally considered bad form to bomb out deep down inside code. In particular, the exit() calls in get_limit() . I would have had get_limit() return int32_t and use negative values to represent bad cases. Then main() can decide whether to: bomb out doing exit(-player_limit); or better yet, calling quit(); This can be particularly important if there is clean-up code required for some future platform. ask again substitute a sane value and play anyway.
  21. My guess would be: colour cycling (also often used in waterfall images) page flipping Multiples pages (screens) are set up in memory and the Dl (display list) is altered to select the current page to display. Flip through the pages quickly like old cartoon time flip books. And of course you can combine them.
  22. We could always buy it. And when it arrives without the hard drive, monitor and mouse then force him to ship those (assuming he can find a PBI interface for an IDE hard drive or an SD card interface) because they were explicitly in the description. Shipping a monitor overseas could be expensive. Even more fun if the fragile monitor arrives damaged and he has to ship it again. But I'm guessing it was just a copy/paste error from an ST auction.
×
×
  • Create New...