Jump to content


  • Content Count

  • Joined

  • Last visited

Community Reputation

79 Excellent

About OldAtAtari

  • Rank

Profile Information

  • Gender
  • Location
    Oak Ridge, NC

Recent Profile Visitors

1,832 profile views
  1. Oh! Perfect. Right, that makes sense. The __fastcall__ line is already defined in stdlib.h, and because of that, I can simply use srand() and rand() in my code, as long as I've included stdlib.h at the top of my file. Karri, thank you for correcting me on this. It's a basic piece of understanding that I was missing completely. I really appreciate your help with this.
  2. I found what works for me, regarding srand (). I figured out that the following line has no effect in my code, with seed being a variable representing any number I assign it: void __fastcall__ srand (unsigned seed); The following, more standard C style srand() command works great: srand (seed); I don't know how well it will play on the actual Lynx hardware, but in Handy, srand (seed) works fine. I'm still curious what I'm doing wrong with the __fastcall__ line, but for now, I'm going to stick with srand ().
  3. Karri, that's a nice explanation of srand. Thanks for that. This is the first explanation of it that made sense to me. I still think I'm using it wrong. It never changes the start of my sequence no matter what I set it to. Sounds like it's not really necessary for the game I'm working on now, but I would still like to figure out what I'm doing wrong. Maybe I'll figure it out today. Thanks again.
  4. Thank you, Karri. I really appreciate your thoughts on this. I like the idea of using the player's movements to generate the illusion of randomness. By calling rand() on every movement, you are advancing the sequence one by one. Such that when you need a pseudo random number, you have it based on the number of movements up to that point, which is different in every play session. Is that right? I really like that plan. But my implementation of srand() still doesn't do anything. Would you mind letting me know if I've gotten things mixed up in the code?
  5. Hello. I've been playing with random (psuedo-random) number generation today, and no matter what I set my seed to, or even if I don't use srand() at all, my random numbers are the same every time. Surely I'm doing something wrong. Does anyone have any advice? In this experiment, I'm generating 4 numbers between 0 and 3, and I'm displaying them side-by-side. My code is below, along with three screenshots, where the random number is printed up top and the seed below. I really appreciate all the advice you might have. Thank you! #include <lynx.h> #include <conio.h> #include <joystick.h> #include <tgi.h> #include <stdlib.h> #include <time.h> #include <unistd.h> #include <string.h> unsigned char checkInput(void); extern unsigned char reset; unsigned char pal[] = { 0x00,0x0F,0xE9,0x06,0x08,0x00,0x0C,0x08,0x0F,0x04,0x0A,0x00,0x00,0x04,0x04,0x0C, 0x00,0xFF,0x00,0x66,0xD3,0xF0,0x11,0x01,0x0F,0x4F,0x0F,0x0F,0xFF,0x5B,0x07,0x6F, }; void drawscreen(char x, char random) { char randomText[20]; itoa(random, randomText, 10); tgi_setcolor(8); // Yellow tgi_outtextxy(x, 10, randomText); } void game() { char random; char x = 10; char seedText[60]; int seed = 1; void __fastcall__ srand (unsigned seed); tgi_setpalette(pal); if (!tgi_busy()) { while (x < 50) { random = rand() % 4; drawscreen (x,random); tgi_updatedisplay(); x = x + 10; } itoa(seed, seedText, 10); tgi_setcolor(8); // Yellow tgi_outtextxy(10, 50, seedText); exit(0); } }
  6. I struggle with the BMX. I can rarely reach the finish line, unless I totally give up on doing tricks. I haven't actually played Hard Drivin' on the Lynx. I have it for the Sega Genesis. It's bad enough on there. I can't imagine it on the Lynx.
  7. Yeah, I thought about going with rechargeable AA batteries, but I have such a fear of battery corrosion. So the USB solution works for me. Like I say, I just carry the battery in the case. I think I've seen the LION instructions for the Lynx I, not sure about the Lynx II. It would be really cool, for sure. Yes, I like California Games, too. It would be tough if that didn't work... I want to like Hard Drivin', but I just don't.
  8. These are good questions. Perhaps I could still cram some double-A batteries in there and get the battery cover on it. I haven't tried. And I decided not to try the thing with the internal lithium battery. I don't know how it would fit. So I just keep a couple rechargeable power banks in my case, and when I play, I just have it plugged in, with the battery in my lap. Something like this: https://www.amazon.com/POWERADD-EnergyCell-Compact-Portable-Charger/dp/B07Y572SDR/ref=sr_1_1_sspa?dchild=1&keywords=5v+power+bank&qid=1612799235&sr=8-1-spons&psc=1&smid=A2UX2NOV6U33XD&spLa=ZW5jcnlwdGVkUXVhbGlmaWVyPUEzMDFJNTZRQU1SRUVXJmVuY3J5cHRlZElkPUEwMTA2NTk4M0M1QUQ2Q09PQkVZQiZlbmNyeXB0ZWRBZElkPUEwMzQ5ODM5MTk3UURHNTg2TVpQSSZ3aWRnZXROYW1lPXNwX2F0ZiZhY3Rpb249Y2xpY2tSZWRpcmVjdCZkb05vdExvZ0NsaWNrPXRydWU=
  9. I should mention that I wrapped the usb cord around one of the screw posts inside, to relieve the stress on the solder joints. I think I saw that tip in a YouTube video.
  10. My heart is breaking for you, Bstar. I hope your Lynx II gets back up and running soon.
  11. Bstar, I was able to replace the caps on mine without too much issue. I did the power regulation circuit too, which was more difficult, but doable. While I was in there, I also did the USB power cord mod at cap 41, which was really easy, and has been amazing since I can run my Lynx with a 5V power bank, or with an extension USB cord, I can use a 5V wall charger. https://atarigamer.com/articles/adding-a-micro-usb-power-socket-to-an-atari-lynx I didn't do the thing in those instructions with the little USB port. I just ran the other end of the USB cord out through the battery compartment, and it just hangs there waiting to be plugged into a power source.
  12. Brilliant idea, karri. These machines are pretty old now, and repairing them might become an essential skill for all of us soon.
  13. Thank you, Karri. That's a bummer for Suzy. Hopefully it won't affect any more games.
  14. And Karri, what do you think of this theory of bad RAM being the cause of our problems with California Games and Zarlor Mercenary? Is there something more likely that we're not considering?
  15. I'll still let Bstar try it first if he still wants to. 🙂 But I wouldn't mind having a few of those chips on-hand.
  • Create New...