Jump to content
IGNORED

Getting Started in Lynx Programming


disjaukifa

Recommended Posts

Crud. Server down again. LOL

Karri...I like your site. looks really nice! Let me know if you got anywhere with the proto roms. They needed encryption added to them, if I recall correctly.

 

Thanks

 

Thanks. Perhaps I need to add some monitoring script for it :)

 

I should really go through them all now as we understand the boot process.

 

--

Karri

 

That would be awesome. If you need me to resend them, just let me know.

I'd really love to spend the holidays testing and playing them. But if not, I always have other cold and snowy nights ahead.

Link to comment
Share on other sites

Crud. Server down again. LOL

Karri...I like your site. looks really nice! Let me know if you got anywhere with the proto roms. They needed encryption added to them, if I recall correctly.

 

Thanks

 

Thanks. Perhaps I need to add some monitoring script for it :)

 

I should really go through them all now as we understand the boot process.

 

--

Karri

 

That would be awesome. If you need me to resend them, just let me know.

I'd really love to spend the holidays testing and playing them. But if not, I always have other cold and snowy nights ahead.

 

Yeah. I should get back to work on the Lynx because

All work and no play makes Jack a dull boy,

All work and no play makes Jack a dull boy,

All work and no play makes Jack a dull boy,

All work and no play makes Jack a dull boy,

All work and no play makes Jack a dull boy,

...

Link to comment
Share on other sites

I have not read this thread in like a week, I need to go back to the beginning and get my head to the point that I understand what ya'll are talking about . . .

 

That won't help. I am just helping Eric in going through a large pile of unknown protos in a hope to find something of value. So far we have mainly got multiple development copies of existing games. Plus a few very weird things that won't run on anything. All previous content was in private emails.

 

--

Karri

Link to comment
Share on other sites

I have not read this thread in like a week, I need to go back to the beginning and get my head to the point that I understand what ya'll are talking about . . .

 

That won't help. I am just helping Eric in going through a large pile of unknown protos in a hope to find something of value. So far we have mainly got multiple development copies of existing games. Plus a few very weird things that won't run on anything. All previous content was in private emails.

 

--

Karri

 

Not sure if there is anything of extreme value there. LOL But being that I did get a different version of Super Asteroids in that lot, I'd love to be able to check out the version of DameonsGates that are included with this. Could be a more finished version... you never know!

Link to comment
Share on other sites

Now that we fully understand the lynx boot process, it would be possible to use one of the new 16MB carts and a new multi-game loader to create a single cart with all of the protos out there.

 

--Wookie

 

I actually had a dream for writing a front end to such a cart.

 

The basic idea would be to create a database of games. The database would be in XML format with cart images, 32 by 32 icons, wml-style (simplified html for mobile phones) descriptions of the games, user interface description for the game and cheats.

 

A small example of the wml format:

<?xml version="1.0"?>
<!DOCTYPE wml PUBLIC "-//WAPFORUM//DTD WML 1.1//EN"
"http://www.wapforum.org/DTD/wml_1.1.xml">
<wml>
<card title="Warbirds review">
<img src=wb.spr>
<p>
Snoopy would be pleased
By Derek Patenaude. From Atari Times.
</p>
<p>
I remember playing this game for the first time with my friends, and all I could think of (and my friends agreed) is how did the tiny Lynx manage to pull off a polygon/scaled sprite flight simulator that rivaled or surpassed its larger scale counterparts. While the single player has some shortcomings, the multiplayer option makes this definitely one of the shooters to own if you have an Atari Lynx.
</p>
<p>
Warbirds is a circa World War I flight simulator that allows you to pilot a biplane against up to three computer controlled opponents on the single player mode and up to four players when comlynxed. There are a ton of options that are easily laid out for you to customize your battles, from your supply of ammo, ability to take damage, collisions and mission choice. Do you think biplanes are too slow for you? Put the game into arcade mode and strap on a faster engine with better steering. If there is one minor complaint about the options presented is that there is no story mode where the battles could be put into a context and give you a goal for the game. Such an option would have probably made the single player experience a much more rewarding one.
</p>
<p>
That being said, once you enter the world of Warbirds you will be amazed at the graphical content. The background consists of a polygon-based countryside that scrolls across at a fairly good framerate (far superior to the sluggish Steel Talons). A sprite-based cockpit frames the screen and your opponents and clouds around you consist of some wonderfully drawn scaled sprites. The resolution does decrease as you close in on a target or cloud but this does not hamper the impressive effect that the game leaves on the player whatsoever. There is no in game musical theme, nor does it feel like their should be. What is there, is a competent set of sound effects for the rat-a-tatting of the machine guns, whir of the engine and propeller as you descend climb or idle, and the echo of one of your prey (or yourself) as the plane drops to the ground. The intro musical theme is well done and you are treated to some very nice digitized photos after the end of your battles.
</p>
<p>
But how does she fly you may ask? And the answer would have to be, spectacularly. Whether you are playing simulator or arcade mode, the plane seems to have the right amount of give and resistance whether you are trying to pull a sharp turn, nose dive, or loop de loop. There are little framerate issues and leaves the game with an extremely polished feel to the controls. You are also able to look all around your plane by holding on to the B button and choosing the appropriate direction to scan around the plane for targets. This is a simple to use, wonderful in execution and adds significantly to gameplay. You can almost picture looking over your left shoulder seeing an opponent trying to get around you or watching an opponent trying to loop over your head. The only weapon is a machine gun and although sometimes it is hard to detect whether or not you are hitting a target there’s an audio cue that does so.
</p>
<p>
There also lots of subtle nuances which make the game special, such as the ability to cut your engine and glide, and the ability to look at the gauges in your cockpit. The range of enemy AI is quite good and provides enough challenge for the rookie and those who want to master the intricacies of shooting down WWI flying aces such as the Red Baron.
</p>
<p>
Since there is no real story mode the real way to get the most out of this title is to find a friend and duke it out with one another. The multiplayer is loads of fun and can add a lot more length to an already quality cart. The strength of Warbirds is its spectacular scaling graphics, and it easy to pick up but harder to master gameplay, these pluses and the multiplayer more than outweigh the tile’s lack of story mode and make it one of the highly recommended titles that can really show off what the Lynx can do.
</p>
</card>
</wml>

 

From this database you could choose which games to include in the cart image. The build system would then assemble the cart and build a cool front end.

 

The game icons would form a giant N x M icon sphere that could be scrolled in all directions. Pressing A would boot the game image.

 

Pressing B would show the textual description of the selected game and the cheats.

 

The only tough question is how to legally add cart images to a database. Perhaps the easiest way would be to just provide the framework and let people insert their cart images into this framework.

 

The palette for the icons would be fixed to this:

DEFPALETTE:     .byte   >$000
               .byte   >$007
               .byte   >$070
               .byte   >$700
               .byte   >$077
               .byte   >$770
               .byte   >$707
               .byte   >$777
               .byte   >$333
               .byte   >$00F
               .byte   >$0F0
               .byte   >$F00
               .byte   >$0FF
               .byte   >$FF0
               .byte   >$F0F
               .byte   >$FFF
               .byte   <$000
               .byte   <$007
               .byte   <$070
               .byte   <$700
               .byte   <$077
               .byte   <$770
               .byte   <$707
               .byte   <$777
               .byte   <$333
               .byte   <$00F
               .byte   <$0F0
               .byte   <$F00
               .byte   <$0FF
               .byte   <$FF0
               .byte   <$F0F
               .byte   <$FFF

/* Color defines (default palette) */
#define COLOR_BLACK             0x00
#define COLOR_RED               0x01
#define COLOR_BLUE              0x02
#define COLOR_GREEN             0x03
#define COLOR_VIOLET            0x04
#define COLOR_PURPLE            COLOR_VIOLET
#define COLOR_CYAN              0x05
#define COLOR_PEAGREEN          0x06
#define COLOR_GREY              0x07
#define COLOR_NAVYBLUE          0x08
#define COLOR_LIGHTRED          0x09
#define COLOR_LIGHTBLUE         0x0A
#define COLOR_LIGHTGREEN        0x0B
#define COLOR_LIGHTPURPLE       0x0C
#define COLOR_LIGHTCYAN         0x0D
#define COLOR_YELLOW            0x0E
#define COLOR_WHITE             0x0F

 

This happens to be the default palette installed by the tgi driver at boot time (in cc65 programs).

 

--

Karri

Link to comment
Share on other sites

That would work. I've also been toying with the idea of putting 2 MBytes of SRAM on a cart with an Atmel microcontroller and an SD card slot. If the card was using the Atmel AT90USB1286 it could also have a miniUSB port too. Since the AT90USB1286 has 46 I/O pins it could sit directly on the Lynx address and data buses. This would allow the Atmel chip to be what the Lynx reads from when it boots. The Atmel chip could decode the address and write back to the Lynx data from it's internal flash memory. The data there would be a Lynx executable that is a menu for sending commands to the software running on the Atmel chip. Since the Atmel chip has i2c support, the command channel from the Lynx to the Atmel chip could be over i2c. The commands would be stuff like list the games on the SD card. Load a game from the SD card. Run the game in SRAM, etc...

 

The flow would look like this:

 

0: Power On

- Atmel chip powers on and enters Lynx load state

- Lynx powers on and enters load and decrypt state

 

1: Load State

- Lynx is putting address values on the address bus and reading bytes from the cart

- Atmel is decoding address values and writing bytes from the Lynx menu rom stored in its internal flash

 

2: Run State

- Lynx finishes loading the menu rom from the Atmel chip and runs it. the menu rom sends an "running" command over i2c to Atmle chip.

- Atmel chip sees the "running" command on the i2c bus and switches into command mode.

 

3. Menu State

- Lynx rom sends commands over i2c to get the list of games on the SD card and displays them on screen. The user selects a game from the list and the rom sends the "load game X" command over i2c to the Atmel chip.

- The Atmel chip reads in the rom from the SD card and copies it over to the SRAM chips. it inspects the rom header to figure out what mapper the game uses and puts itself into the correct mapper mode. The atmel chip will be the logic decoder for deciding which SRAM chips get their /OE (output enable) lines activated. It will also act as the EERPOM save game chip, both the BLL and i2c varieties. The Atmel chip will answer load status request commands over i2c. After it sends "loading done" back to the Lynx, it immediate goes into mapper mode.

- The Lynx rom polls the Atmel chip over i2c for the loading status. When the Atmel chip returns the "loading done" status, the Lynx rom will set up the zero page variables used by the RSA load/decode ROM code, it will set up the address latch and counter and then it will jump to the RSA load/decode ROM function to simulate coming out of reset. The Lynx will then boot like it does with any other game.

 

If the usb port is present on the cart, then the Atmel chip can communicate to a host PC over USB to enumerate and load ROM images. It could also relay debugging messages coming in over i2c from the Lynx or just read addresses and stuff as the game is running. This would be really handy for debugging new games.

 

--Wookie

Link to comment
Share on other sites

The Atmel AT90USB1286 is 5V tolerant so no voltage stuff will need to be done. Also, Samsung makes a great 5V 2 MByte SRAM chip

 

I like the Atmel-approach a lot. I still have to read through your ideas a few time to understand the details.

 

In 42Bastian/Duranik games the AUDIO I/O is used as a 9th address bit.

In EOTB the AUDIO I/O is used as a SRAM/ROM selection line.

In most hobby games the AUDIO I/O is used for passing data to/from a serial EEPROM for high scores.

I believe that the CART 1 line is used as a Write strobe in all cart implementations.

But the Atmel could be aware of how different programs use the AUDIO I/O line.

 

--

Karri

Link to comment
Share on other sites

But the Atmel could be aware of how different programs use the AUDIO I/O line.

--

Karri

 

Exactly. The Atmel chip would be on the address and data bus along with the SRAM chip. The SRAM chip's /OE (output enable) and /WE (write enable) lines would only be connected to the Atmel chip. This means that the Atmel chip controls the SRAM, not the Lynx. When a game is being played on the Lynx, the Atmel chip will be configured so that it monitors the audio i/o line and the cart 1 line and generates the correct /OE signal and possibly upper address line values.

 

For instance, let's say a game uses the cart 1 line to do simple bank switching between two 512 KByte blocks of memory. With this card, there is only a single 4 MByte SRAM chip. So the Atmel chip monitors the cart 1 line and when it is asserted, the Atmel asserts the 20th address bit on the SRAM chip so that the address from the Lynx maps to the second 512 KByte block of memory in the SRAM chip. The Atmel chip is acting like an address/logic decoder.

 

There's only a few different memory organizations and access patterns on the Lynx. It would not be difficult to make the Atmel properly handle all cases and then to either configure itself based on the lynx header data or have it store a small database of games and their memory organizations.

 

The goal here is to make a cart for developers though. :)

 

--Wookie

Link to comment
Share on other sites

The Atmel chip runs at 16 MHz which should make it plenty fast enough to read the state of address pins and output any /OE /WE and address values to the SRAM chip in time to allow the Lynx to read the data from the SRAM.

 

Edit: especially if I hook up interrupts on those pins instead of polling in the Atmel chip.

 

--Wookie

Edited by Wookie
Link to comment
Share on other sites

  • 1 month later...

Everytime I venture back to this thread... or this forum (programming) I usually leave it with such a defeated look on my face. This is alllll greek to me. I have no clue how I'm ever going to learn this stuff. :(

 

 

Karri... were you able to get anywhere with those protos?

I really have no clue how to add a header to get these to work right, yet I'd really like to get a good understanding of it.

 

Basically, if the Lynx boot process has been figured out... whats the next step to getting the 13 or so protos up and running?! Eventually, I'd like to have the process added to the rom... and then burn a new game cart for each of these protos.

Link to comment
Share on other sites

  • 3 weeks later...

That would work. I've also been toying with the idea of putting 2 MBytes of SRAM on a cart with an Atmel microcontroller and an SD card slot.

 

I just realized the problem with this idea is that the power to the cart is under software control from the Lynx. This is a problem because the Atmel chip would constantly be rebooting and unless the SRAM chip has a battery to keep the data in the chips valid, the SRAM chips would lose their contents whenever the software cut the power to the cart.

Link to comment
Share on other sites

That would work. I've also been toying with the idea of putting 2 MBytes of SRAM on a cart with an Atmel microcontroller and an SD card slot.

 

I just realized the problem with this idea is that the power to the cart is under software control from the Lynx. This is a problem because the Atmel chip would constantly be rebooting and unless the SRAM chip has a battery to keep the data in the chips valid, the SRAM chips would lose their contents whenever the software cut the power to the cart.

 

There is no reason to use the software switched power for powering the SRAM. You can get pure 5V also. I usually use the software power for chip enable instead.

 

--

Karri

Link to comment
Share on other sites

That would work. I've also been toying with the idea of putting 2 MBytes of SRAM on a cart with an Atmel microcontroller and an SD card slot.

 

I just realized the problem with this idea is that the power to the cart is under software control from the Lynx. This is a problem because the Atmel chip would constantly be rebooting and unless the SRAM chip has a battery to keep the data in the chips valid, the SRAM chips would lose their contents whenever the software cut the power to the cart.

 

There is no reason to use the software switched power for powering the SRAM. You can get pure 5V also. I usually use the software power for chip enable instead.

 

--

Karri

 

Hello Kids :)

 

1. you are off-topic

 

2. If you want play demos, buy flashcard from lynxman - you dont need to design a new hardware for that. The next time the flashcard gets a new firmware that allows .o files start directly without creating a complete binary with the lynxer.

 

3. Write games instead of another type of flashcards, or if you want do something with hardware then design a bridge to use modern TFTs with the Lynx.

 

Regards

 

Matthias

Link to comment
Share on other sites

2. If you want play demos, buy flashcard from lynxman

 

I keep trying, he won't get back to me. Besides, my goal is to design a new, easy-to-use (i.e. USB) flash cart and to be reliable source of inexpensive flash carts for development.

 

--Wookie

Link to comment
Share on other sites

2. If you want play demos, buy flashcard from lynxman

 

I keep trying, he won't get back to me. Besides, my goal is to design a new, easy-to-use (i.e. USB) flash cart and to be reliable source of inexpensive flash carts for development.

 

--Wookie

?

Lynxmans Flashcard runs with USB. and its very easy to use. Its also cheaper as other cevtools like skunkboard i.e

Link to comment
Share on other sites

Just to be sure you are talking about the same product, Matashen is speaking about this one Flashcard :

http://www.atariage.com/forums/topic/113219-my-lynx-flash-card-what-do-you-think/

 

I don't know if Lynxman still have some in stock right now, but he already said he will make new batchs as long as people will have demand for it.

Link to comment
Share on other sites

2. If you want play demos, buy flashcard from lynxman

 

I keep trying, he won't get back to me. Besides, my goal is to design a new, easy-to-use (i.e. USB) flash cart and to be reliable source of inexpensive flash carts for development.

 

--Wookie

 

I send you a PM today.

 

Sorry, i was very busy the last 2 weeks.

Link to comment
Share on other sites

 

I send you a PM today.

 

Sorry, i was very busy the last 2 weeks.

 

Hey no problem. I've been wanting to use my Teensy++ in some project anyway. I still have to write a little code to make it act like a cart. If it works, I've got a schematic for a cart version of what I've built. It won't have much memory, only 128KB of flash on the atmel chip, but the upside is it is CHEAP. Due to the low bill of materials and cheap chips, the boards themselves would cost about $30 US to make.

 

--Wookie

Link to comment
Share on other sites

Just reminds me Vince's first attempt in 2004 at the Jaguar connexion :

 

OK, this was only a support for EPROM, but we managed to test the very first alpha version of Space Lock (with ugly graphs) on real Lynx with it.

 

It seems I had a problem with image posting :ponder:

So here is the pic :

jc2k4_lynx_vince2.jpg

Link to comment
Share on other sites

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...