Ze_ro Posted May 30, 2002 Share Posted May 30, 2002 I've recently become interested in Lynx programming, and was pleasantly surprised to find out that it wasn't as hard as I thought it would be (Of course, this is after I already tried my hand at programming the 2600 ). I haven't actually gotten too far into anything, but for anyone else who might be interested, I was able to write a simple paint program: Downloads: Source Code Compiled Code The program has a .o extension, but will work fine through Handy. The D-Pad moves the cursor around, which draws automatically. Press B to change colors (quickly!), and press Option 1 to clear the screen. It's a very simple program, and it doesn't even use sprites or anything fancy at all, so it should be pretty simple to read as long as you know C. --Zero Quote Link to comment Share on other sites More sharing options...
Songbird Posted May 30, 2002 Share Posted May 30, 2002 Yep, pretty cool isn't it? Shows you just how easy it is to get started, and from that point, doing simple Space Invaders or other one-screen classic games is not too hard to do. For your next lesson, use double buffering to swap between your displayed screen and your working screen. For an added challenge, only move the "cursor" around once per joypad press. BTW, you don't need the InitIRQ or InstallUploader in your routine, and OUTSIDE == A button and INSIDE == B button. Quote Link to comment Share on other sites More sharing options...
Ze_ro Posted May 30, 2002 Author Share Posted May 30, 2002 quote: Originally posted by Songbird: For your next lesson, use double buffering to swap between your displayed screen and your working screen. I've never been completely clear on the idea of double buffering... is that basically just holding two copies of the screen so you can modify the currently-undisplayed one, then swap them? In any case, I was planning on taking a look at sprites next... they look a little tricky, but once I get a hang of the data structure, they're probably not that hard. quoteBTW, you don't need the InitIRQ or InstallUploader in your routine, and OUTSIDE == A button and INSIDE == B button. Heheh, yeah, I know about the outside/inside thing... the story behind that is that I was looking through Epyx's developer manual to figure out how to read the joystick... and the D-Pad, and both option buttons were grouped together with two bits labelled "Inside" and "Outside". I didn't know what they were at first, and since I didn't see A and B referenced anywhere, I guessed (correctly) that those were them. I was going to use A and B within the code, but I figured something like "#define A joystick&0x01" would have some ... well.. "unwanted" effects As for the InitIRQ and InstallUploader stuff, they're remnants from one of the demo programs that I picked apart to figure things out. I'm guessing that InitIRQ sets up all the interrupt stuff (Which, of course, isn't used in this program), but what does InstallUploader do? Does it have something to do with the BLL stuff? --Zero Quote Link to comment Share on other sites More sharing options...
meltdown71835 Posted May 31, 2002 Share Posted May 31, 2002 Did you use assembely language, 68k whatever that is that was used for the jaguar, or a high level language? Quote Link to comment Share on other sites More sharing options...
Songbird Posted May 31, 2002 Share Posted May 31, 2002 quote: Originally posted by Ze_ro: I was going to use A and B within the code, but I figured something like "#define A joystick&0x01" would have some ... well.. "unwanted" effects Obviously, don't use just A or B. Use things like in the provided header files: JOY_A for example. Same with JOY_UP, JOY_OPT1, etc. what does InstallUploader do? Does it have something to do with the BLL stuff? Yes, it installs the BLL loader. Which is not a bad thing to have in your program, I was merely pointing out it is not required. Double buffering is quite simply: displaying one screen while drawing another. So you make all your updates to backgrounds, foregrounds, characters, etc. (usually each one a sprite), tell Suzy to paint the sprites, then display that screen. In the meantime, you start the process all over again but on a different screen buffer which is the exact same size as the first. Then you merely need to swap buffer pointers between screen refreshes. Quote Link to comment Share on other sites More sharing options...
eric_ruck Posted May 31, 2002 Share Posted May 31, 2002 Actually it would be cool to start collecting this knowledge, it could be the beginning of a new Lynx developer kit, if not "Lynx for Dummies". I started messing with newcc65 but I wouldn't count on me to produce anything you'd want to publish anytime soon, since I'm busy with a startup company. Eric Quote Link to comment Share on other sites More sharing options...
Songbird Posted June 1, 2002 Share Posted June 1, 2002 The InstallUploader function will enable BLL in your program, which means you can download games from your PC to Lynx RAM via a custom-made Lynx/PC cable. This function has nothing to do with booting a Lynx game or making it run on a real Lynx. Hope this helps... Quote Link to comment Share on other sites More sharing options...
Ze_ro Posted June 1, 2002 Author Share Posted June 1, 2002 quote: Originally posted by meltdown71835: Did you use assembely language, 68k whatever that is that was used for the jaguar, or a high level language? No, everything is written in simple C. Luckily, there are already some libraries out there that do most of the hard work for you (like drawing stuff on the screen). I believe Bastian Schick wrote them. Of course, you CAN still use assembly language if you want to, but it's not necessary. Once all the C code is finished, I used Bastian's newcc65 compiler (a modified version of CC65) to compile it into 6502 assembly language... then another program converts that assembly into an actual binary that can be run. So, there's a bunch of programs that have to be run before you get an actual binary... but as long as you can do the C programming, passing it through a handful of programs isn't a problem Carl: What exactly does the BLL loader do? I mean, this is for uploading it to an actual Lynx, right? So why does the game need to have specific code in it for that to work? (I basically only read the programming parts of the dev-kit) --Zero Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted June 1, 2002 Share Posted June 1, 2002 lynx is really easy to code... i coded a sample programm where a 256x128x16 taquart sprite could be zoomed in & out... but there is no fast emulator for it unfortunatly so i haven't done much more on it (as handy sux... ) if there is another emulator which runs perfect on p3 500mhz i will give a try next time... 1st i finish timepilot for atari 800xl 2nd i finish timepilot port for 5200 3rd i finish timepilot for a7800 or gameboy 4th maybe lynx only tough shit will be gameboy because of z80... so maybe 1st all 6502 machines because the core engine & game logic are the same... http://www.s-direktnet.de/homepages/k_nadj.../timepilot.html ps. i am still in jetlag after e3... is this possible???? Quote Link to comment Share on other sites More sharing options...
Jetboot Jack Posted June 2, 2002 Share Posted June 2, 2002 Heaven, What is the data format in the .RAW grx files in your Timepilot demo?? sTeVE Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted June 2, 2002 Share Posted June 2, 2002 steve, i gave every data the .raw extension when the data has a) no atari compatible binary header b) the data structure is unique and just unique for the project (no .mic, no .tif, etc...) raw data is stored in atari hardware format. f.e. the gamelogo is in raw because you can load it directly into vram. try in turbo basic: 0 gr.15 1 open #1,4,0,"d:logo.raw" 2 bget #1,dpeek(88),7680 3 close#1 it should quit with an eol error but you should see the timepilot logo appearing on the screen... the timepilot sprites are stored in "raw" as well but they have a slighty different data structure... maybe more conventional should be ".bin" but bin means in atari world "binary executable", right? i hope this helps... hve ps. "raw" = "raw data" = "not packed" Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted June 2, 2002 Share Posted June 2, 2002 just downloaded some roms for lynx... shadow of the beast rocks! a lot of games are quite good programmed... but what me makes wonder is that centipede sux... its more like milipede...with sidescrolling??? anyway... timepilot will be ported to lynx... decision made... hve Quote Link to comment Share on other sites More sharing options...
Tizoc Posted June 2, 2002 Share Posted June 2, 2002 quote: Originally posted by Heaven/TQA: 1st i finish timepilot for atari 800xl 2nd i finish timepilot port for 5200 3rd i finish timepilot for a7800 or gameboy 4th maybe lynx For whatever it's worth, here is one 7800 fan that would really like to see your timepilot version ported to the 7800. I have follwed your posts and the game looks great! The 7800 needs all the games it can get. Any plans for finishing Senso? Quote Link to comment Share on other sites More sharing options...
Heaven/TQA Posted June 3, 2002 Share Posted June 3, 2002 senso will be finished this year... (core engine works...just needs to be finished... baeh... this is the worst part of a project... ;=)) Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.