Jump to content
IGNORED

FPGA Lynx


loconut

Recommended Posts

I'm working on building an FPGA based Lynx, and have read all the handy specs and understand the Suzy chip pretty well at this point, but the one thing I'm running into is that there are about two 6502 cores available, and one 65C02 that is incomplete. The better looking 6502 takes an extra clock cycle for most ops. Interfacing a real 65C02 doesn't seem to be an option since all of the real ones seem to be 4 MHz max. How did Atari/Epyx get it to run at 16 MHz? Smaller feature size/fab tech?

 

Anyone experienced able to speak to this problem?

 

Are any of the 65C02 specific opcodes actually used in the lynx or would a 6502 work? My guess was not.

 

Thanks in advance. Meanwhile I'm going to see if I can create Suzy's VHDL.

 

P.S. still need to know what I can use for a lynx cartridge socket.

 

edit: typos everywhere! I'm having a bad day :)

Edited by loconut
Link to comment
Share on other sites

I'm not that great with a caliper, but these were fairly repeatable for the couple carts I checked

 

cart width: 57.12 mm / 2.249 in (for Zarlor mercenary at least though califronia games is 5 thousandths bigger (57.13 mm) and Im guessing the spec is actually 57.15 mm / 2.25 in)

 

cart thickness (across contacts): 2.50 mm / 0.098 in (probably supposed to be 2.54 mm / 0.1 in)

cart thickness (across prom square): 2.63 - 2.75 mm / 0.1035 - 0.1075 in (depending on cart)

 

 

pin pitch (very approx) 1.4 mm / 0.056 in

 

 

anyone know of a connector part number I can order? It looked like a PCI slot or PCIe x16 slot might work by eyeball anyway.

edit: PCIe x16 is the only one wide enough for the cart, but it appears card thickness is a max of ~1.5 mm / 0.06 in from a scale drawing which wouldn't

be wide enough. It also appears that pitch is 0.8 mm / 0.03 in, not 1.4 mm. Bummer. This is all interpreted from a couple dimensions of a scale drawing and measured on screen to convert screen size to real size so theres a margin of error- any reason to think I'm wrong.

 

edit: s/foirly/fairly - preview preview. doh. p.s. have new dvorak

Edited by loconut
Link to comment
Share on other sites

I'm working on building an FPGA based Lynx, and have read all the handy specs and understand the Suzy chip pretty well at this point, but thu one thing I'm running into is that there are about two 6502 cores available, and one 65C02 that is incomplete. The better looking 6502 iakes an extra clock cycle for most ops. Interfacing a real 65C02 doesn't seem to be an option since all of the real ones seem to be 4 MHz max. How did Atari/Epyx get it to run at 16 MHz? Smaller feature size/fab tech?

 

Anyone experienced able to speak to this problem?

 

Are any of the 65C02 specific opcodes actually used in the lynx or would a 6502 work? My guess was not.

 

Thanks in advance. Meanwhile I'm going to see if I can create Suzy's VHDL.

 

P.S. still need to know what I can use for a lynx cartridge socket.

 

You need the few extra opcodes in the 65SC02 core. I can check what they are from the www.cc65.org site.

 

What kind of FPGA are you planning to use? The Spartan 3 perhaps...

 

The Lynx cartridge is a 10-bit counter plus 8 bit parallel port connected to memory address lines.

 

I would go for flash memory and an usb-connector. You could of course leave holes for the original cart

connector on the PCB so that it would be possible to move a socket from an old Lynx to the PCB.

 

But the most interesting thing is to develop the FPGA core for the GamePort hardware. www.gameport.tv

--

Karri

Link to comment
Share on other sites

You need the few extra opcodes in the 65SC02 core. I can check what they are from the www.cc65.org site.

 

What kind of FPGA are you planning to use? The Spartan 3 perhaps...

 

The Lynx cartridge is a 10-bit counter plus 8 bit parallel port connected to memory address lines.

 

I would go for flash memory and an usb-connector. You could of course leave holes for the original cart

connector on the PCB so that it would be possible to move a socket from an old Lynx to the PCB.

 

But the most interesting thing is to develop the FPGA core for the GamePort hardware. www.gameport.tv

--

Karri

 

I have a DE2 board that I own handy, which should be enough, but I also have on loan a stratix ii board that I can use.

 

I'm going to be doing this all on a dev board for now- if it all works out, perhaps I'll fab a board. Cart interface will have to be via the santa cruz connector on the stratix board or the expansion ports on the DE2 (I have a santa cruz adapter for that).

 

SRAM on the DE2 is exactly 64K for system ram- the rest can be done in M4K for col/vid buf, etc.

 

clock is 50 mhz on DE2, mult by 8, div by 25 in the pll gives 16 MHz easily.

 

also, can use the VGA and audio chips on the DE2 as well.

 

edit: changed spartan to stratix- i always mix them up. I probably can get a couple xilinx boards, but I'm more familiar with Altera offerings.

Edited by loconut
Link to comment
Share on other sites

One more question about the design of the Lynx

 

With the cartridge reader sharing pins with the buttons/pad, how does pushing a button during a cart read not mess up the data? Wouldn't the pull up resistors end up giving you 1's wherever a button was pushed?

(if during cart read)

Link to comment
Share on other sites

update: spoke with WDC and hopefully am getting a 65C02 core to use under NDA. This will at least let me get it working for my class project and you can either hook to an external CPU or implement your own later, but Mikey and Suzy would at least be taken care of. Again, I won't be able te release the CPU core, but hopefully youll be able to just drop in one or hook to a physical one via IO.

Link to comment
Share on other sites

update: spoke with WDC and hopefully am getting a 65C02 core to use under NDA. This will at least let me get it working for my class project and you can either hook to an external CPU or implement your own later, but Mikey and Suzy would at least be taken care of. Again, I won't be able te release the CPU core, but hopefully youll be able to just drop in one or hook to a physical one via IO.

 

I am more than interested in Mikey/Suzy implementation also. I have several PowerPC + Spartan 2 boards with 150kgate chips on them. The FPGA can bus-master to the main memory. These were originally used for wirespeed 3DES, AES, MD5 etc encryption. But the linux device driver implements the FPGA as a bin-device so I could quite easily drop in parts to help with running a FPGA based Handy also.

 

So please publish the Mikey/Suzy part when it works.

 

--

Regards,

 

Karri

Link to comment
Share on other sites

I am more than interested in Mikey/Suzy implementation also. I have several PowerPC + Spartan 2 boards with 150kgate chips on them. The FPGA can bus-master to the main memory. These were originally used for wirespeed 3DES, AES, MD5 etc encryption. But the linux device driver implements the FPGA as a bin-device so I could quite easily drop in parts to help with running a FPGA based Handy also.

 

So please publish the Mikey/Suzy part when it works.

 

--

Regards,

 

Karri

 

I have some plans to create a "SuperLynx" which will basically have widened busses (32 bit?), ditch color palletes in favor of true color, and bump the resolution to 720x480 (better ideas?). The games will be incompatible of course, but conceivably, if the details otherwise remain similar would lend for easy porting. It probably has no real use, but it seemed like a fun idea. I've always been interested in game systems and after studying up on Suzy, I'm even more hooked on expanding that knowledge through experimentation.

 

For now, it looks like I'm committed to finish another project first, but expect to start in on this in parallel - though with decreased time slices and resume full bore next semester. (I'm a non traditional student at ISU and work full time).

Edited by loconut
Link to comment
Share on other sites

I have some plans to create a "SuperLynx" which will basically have widened busses (32 bit?), ditch color palletes in favor of true color, and bump the resolution to 720x480 (better ideas?).

 

Oh yes! The resolution could be 480 by 234 as it is available in GamePort. There is also a 300kgate Spartan 3 and a RISC processor. With 65C02 plus Suzy/Mickey in the FPGA you could implement a tgi_480_by_234 driver in the www.cc65.org libraries (I can do the driver for that). That would make the SuperLynx compatible with the Lynx at source level. I could recompile MegaPak for it! The double-buffered screen and the collision buffers could be outside the 64k RAM area making much more RAM for the Lynx code.

 

The reason why GamePort interests me is that it is supposed to be around 50-75 USD's. And it has everything needed for a SuperLynx. It just lacks someone with the skills to do the FPGA part.

 

The SuperLynx could easily become the native GamePort programming environment with Suzy/Mickey code in the FPGA and using the 28.64 Mhz(NTSC) / 35.46 Mhz(PAL) RISC processor and 256k of memory for the games. Oh, and it also has TV-out for connecting the SuperLynx to the big screen. The 65C02 CPU is more important for running existing games. For SuperLynx stuff I could retire the 65C02 and work in C. Existing graphics can easily be stretched by 3 horizontally (3 x 160 = 480) and by 2 vertically (2 x 102 = 204, almost 234). So porting games coded in C for the Lynx is almost trivial.

 

--

Karri

Edited by karri
Link to comment
Share on other sites

Interfacing a real 65C02 doesn't seem to be an option since all of the real ones seem to be 4 MHz max. How did Atari/Epyx get it to run at 16 MHz? Smaller feature size/fab tech?

 

I'm pretty sure Western Design's 65C02 is rated at 14MHz.

Link to comment
Share on other sites

Interfacing a real 65C02 doesn't seem to be an option since all of the real ones seem to be 4 MHz max. How did Atari/Epyx get it to run at 16 MHz? Smaller feature size/fab tech?

 

I'm pretty sure Western Design's 65C02 is rated at 14MHz.

 

Yeah, they claim it'll do up to 28 MHz IIRC. The one I had found on jameco was only to 4. All that was cleared up when I called them- apolofize for not clearing the air on that one.

Link to comment
Share on other sites

Oh yes! The resolution could be 480 by 234 as it is available in GamePort. There is also a 300kgate Spartan 3 and a RISC processor. With 65C02 plus Suzy/Mickey in the FPGA you could implement a tgi_480_by_234 driver in the www.cc65.org libraries (I can do the driver for that). That would make the SuperLynx compatible with the Lynx at source level. I could recompile MegaPak for it! The double-buffered screen and the collision buffers could be outside the 64k RAM area making much more RAM for the Lynx code.

 

The reason why GamePort interests me is that it is supposed to be around 50-75 USD's. And it has everything needed for a SuperLynx. It just lacks someone with the skills to do the FPGA part.

 

The SuperLynx could easily become the native GamePort programming environment with Suzy/Mickey code in the FPGA and using the 28.64 Mhz(NTSC) / 35.46 Mhz(PAL) RISC processor and 256k of memory for the games. Oh, and it also has TV-out for connecting the SuperLynx to the big screen. The 65C02 CPU is more important for running existing games. For SuperLynx stuff I could retire the 65C02 and work in C. Existing graphics can easily be stretched by 3 horizontally (3 x 160 = 480) and by 2 vertically (2 x 102 = 204, almost 234). So porting games coded in C for the Lynx is almost trivial.

 

--

Karri

 

I hadn't heard of the GamePort, I'm going to have to increase my knowledge on that. That sounds like a pretty killer plan. I'm fairly new to computer architectures so I have a lot to learn. I've mostly done logic driven designs and pipelines, not very much architecture. I'm knowledge hungcy and will do my best to make the curve :)

 

It sounds like we'd have to keep the palleted graphics in there- could we do a compatibility mode so new games could run full color and old games could stick to their 16 swatch pallete and 16 bit color limit?

Link to comment
Share on other sites

It sounds like we'd have to keep the palleted graphics in there- could we do a compatibility mode so new games could run full color and old games could stick to their 16 swatch pallete and 16 bit color limit?

 

Actually on the level of 420 by 234 we already have 98280 pixels in memory. I would go for 4 bit/pixel as in the Lynx as a screen would fit in 48k. A double-buffered system would need 96k and with a collision buffer we are up to 144k. This already eats up more than half of the available 256k.

 

The higher available resolution can then be used for dithering the game graphics. So I would not go for more than 4 bits/pixel because of memory usage.

 

The higher resolution would open up new type of games like Jazz Jackrabbit style platformers and top-down maps for adventure games. Streaming videos is already done on everything else so I would skip that path.

 

The sprite engine should have all the bells and whistles that the original Lynx had. In addition it should have a "compatibility mode" that automatically enlarges all sprites by 3 in horizontal and by 2 in vertical direction.

 

Another important piece to do is the 4-channel sound engine. Emulating it does not work well.

 

--

Karri

Link to comment
Share on other sites

The sprite engine should have all the bells and whistles that the original Lynx had. In addition it should have a "compatibility mode" that automatically enlarges all sprites by 3 in horizontal and by 2 in vertical direction.

I think it would be better to keep the aspect ratio the same, and enlarge the graphics x2 in each direction.

 

I always thought it would be cool to have a Lynx with 8-bits per pixel available and at least 256KB RAM. :)

Link to comment
Share on other sites

  • 1 month later...

Just found this thread when googling for 'FPGA lynx' :)

Is this project still alive?

 

It would be cool if someone could replace the internals of an 'VG Pocket System' with some lynx hardware :P

 

For the video, I would stick with the standard resolution, scaled up to a video/vga output.

It would be nice if you don't need extra memory for double buffering. The lynx does the same and writes the location of the buffer into a register from Mikey. So you know where to look. But I don't know if this is actually possible because the memory would need to be accessed more frequently then.

 

Roland.

Link to comment
Share on other sites

  • 2 months later...

Alright, I finished my other project and am now starting to get geared back up for this project. Anyone that's still interested should get together via email or something and try to get something organized.

 

My preference is strongly in favor of VHDL- is that going to be an issue?

 

P.s. I don't recall if I mentioned it- the development kits I own are an Altera DE2 (Cyclone 2 w/ 35K LEs, a 10-bit vga dac, and a smidge of SRAM and SDRAM) and a Xilinx XUP-V2P board (Virtex II Pro, DDR socket with 512 MB installed, and an 8 bit VGA dac).

Edited by loconut
Link to comment
Share on other sites

  • 1 year later...

Sorry to bump this age-old thread, but I'm interested in getting a group of people together to work on an official design.

 

I'm definitely in favor of the SuperLynx approach and would like to see (if possible) the primary CPU as a 65816, 65GZ032 (or something unique we create) with whatever modifications (if any) that would be needed to make it 100% 65C02 compatible versus the "mostly" compatible I read about in the documentation from WDC.

 

We could set up an OpenGoo project (I'll host if you'd like) and/or a Wiki.

 

I'd eventually like to make a handheld FPGA with a screen and everything, but for now just working with assorted dev kits would be fine.

 

Is anyone interested in trying to make some real headway on this, starting with some discussion and planning?

Edited by loconut
Link to comment
Share on other sites

Sorry to bump this age-old thread, but I'm interested in getting a group of people together to work on an official design.

 

I'm definitely in favor of the SuperLynx approach and would like to see (if possible) the primary CPU as a 65816, 65GZ032 (or something unique we create) with whatever modifications (if any) that would be needed to make it 100% 65C02 compatible versus the "mostly" compatible I read about in the documentation from WDC.

 

We could set up an OpenGoo project (I'll host if you'd like) and/or a Wiki.

 

I'd eventually like to make a handheld FPGA with a screen and everything, but for now just working with assorted dev kits would be fine.

 

Is anyone interested in trying to make some real headway on this, starting with some discussion and planning?

 

I cannot write VHDL or make FPGA designs, but i wrote a lynxgame maybe i can help.

 

I think the first stage should be, create a bridge between suzy and the LCD, to use an modern LCD. The bridge could later be used for compatibility, until that it would be a important part to see the other units of the core work.

The second thing should be suzy and the last chip mikey.

I think its better to integrate the chips step by step into an FPGA so its easier to find bugs.

Maybe after that three things it should be possible to integrate RS232 from the comlynx or other ICs into the FPGA.

After do the lynx into an FPGA, we can talk about an lynx-III

 

Regards

Matashen

  • Like 1
Link to comment
Share on other sites

I cannot write VHDL or make FPGA designs, but i wrote a lynxgame maybe i can help.

 

I think the first stage should be, create a bridge between suzy and the LCD, to use an modern LCD. The bridge could later be used for compatibility, until that it would be a important part to see the other units of the core work.

The second thing should be suzy and the last chip mikey.

I think its better to integrate the chips step by step into an FPGA so its easier to find bugs.

Maybe after that three things it should be possible to integrate RS232 from the comlynx or other ICs into the FPGA.

After do the lynx into an FPGA, we can talk about an lynx-III

 

I hadn't considered tearing apart a Lynx (I wouldn't part with mine)- but maybe I can find one with a broken screen. I'd say it'd be a pretty cool step to replace the LCD / circuitry and CPU with an FPGA- but I'm concerned about the number of connections out of the CPU to RAM, Suzy, Mikey, etc. I have a wirewrap board for my FPGA kit, but I'm not sure I'm patient enough to try and get memory (albeit relatively slow) both wired and working that way. It's probably going to end up harder just because we'll have to do it all in the FPGA at once. Hopefully we can cobble together a text mode and do some diagnostics on the CPU / LCD with that before needing to implement the rest. I think we can still probably take it a piece at a time.

Link to comment
Share on other sites

If you do this then I would definitely increase the resolution by 3 at least and find some suitable widescreen LCD.

As a programmer - get much more RAM. I would go for 256M.

Suzy needs to operate like it does today but the target bitmap has to be much bigger.

mp3 player chip for sound output

The games would run from an USB drive

 

So the FPGA would contain a sprite engine and control of the LCD. Then you need a mp3 player chip, CPU, RAM, USB bridge and FTDI serial chip. It could have several USB sockets for adding WiFi, Ethernet etc.

 

The controller would be one or two standard PS2 controllers or a Wii Nunchuck controllers. I would integrate the PSU, Lynx and screen into one box and have the controller connected with a cable. This allows you to play with a friend on the same console.

 

In compatibility mode you could run a 65C02 core inside the FPGA together with the ROM image.

 

But I would not suggest to run the decryption using the 65C02. In my own Handy version I decrypt the cart using Intel stuff. The result is identical and it is much, much faster.

 

The SuperLynx could also have built-in EEPROM emulation for saving high scores back to the USB drive. You could then have files on the USB like:

solitaire.lnx

solitaire.sav (for high scores)

solitaire.m3u (playlist for the coolest background tunes)

entertainer.mp3

fairytale.mp3

...

 

Karri dreaming again...

Link to comment
Share on other sites

  • 3 weeks later...

Just throwing two cents out here...

 

Have you considered talking to Atari, Inc? Perhaps they would give some kind of "help" in regards to pushing this as a "Flashback 3" sort of project. I love the idea of seeing a new Atari console on the market. I know the Flashback systems can be seen as "new consoles" but they were not really put out to do anything other than cash in on retro gaming. Also, having a higher res, more powerful, Lynx handheld out there to put the name "Atari" back on the minds of the casual gamer feels good. Perhaps dethrone the king and queen of Hand Held gaming?

 

Are you planning to retain the cart socket on this device as to allow backward compatibility with the original carts?

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...