Jump to content
IGNORED

Math FPU


Recommended Posts

This is a great topic... I ran into this topic googling FPU. I think today you can use more modern controllers that have FPU on them, which you can get very cheaply. Then there the atmeltiny chips you can buy for less than a dollar in some cases that can be used on an Atari 2600 to help breath some new life into these old system; I have no problems that. I'm still waiting on the Atari 7800 XM module that'll will worthy sound processors for such a graphical 8-bit system with extra ram to do more stuff with the 6502 CPU. I wish I had the skill to do my own cartridge to help enhance the retro Atari 2600 and bring it to the 21st century; call it cheating or whatever, I see no problems using extra hardware even if it is a little overkill for the Atari 8s. Consider it to be like the FX chip for the SNES or the SVP cartridge for the Genesis, imagine a virtual racer style game for the 2600.

 

  • Like 1
Link to comment
Share on other sites

For what it's worth, when I'm done with the expansion box, having an FPU is certainly a target of mine. I've already talked about implementing fast 6502 co-processors in the thread, It wouldn't be *too* hard to get an FPU in there as well - from a verilog perspective, floating point isn't overly difficult, and since it's only competing with a <2MHz 6502, it ought to be possible to seriously improve the speed - from the perspective of the 6502, a quaternion multiply ought to be feasible in a single clock cycle :)

 

The approach would simply be memory-mapped using the memory-aperture technique I describe in the thread above. Basically you'd just write the values to multiply to a given memory address, and read the result from a different address. Probably I'll have function registers as well, to choose between add, sub, mul, div, signed/unsigned, and 8/16/32-bit sizes. As I said above, we could probably get quaternion arithmetic and matrices as well :)

  • Like 3
Link to comment
Share on other sites

The UNO Cart is certainly capable of providing math support (e.g. through sharing the $D5xx registers) as the STM32F4 used has a h/w FPU.

 

I go back to the "delineation of work" statement as, for example when doing a mandalbrot, going back and forth for every single calculation would be overkill.

But a library of routines for assistance with 3D math and matrix operations etc would give flexibility to the programmer.

 

https://photos.app.goo.gl/Q1ytacxu9YfguZRn8

 

post-1822-0-94690600-1533549887.png

  • Like 4
Link to comment
Share on other sites

Isnt STM32 (arm) or FPGA or 16MHz Blitter/FPU cheating too?

Isnt 1MB or VBXE cheating??? I say NO! Its just technological

progress. How will A800 evolve without Atari ST range for example...

Basically it will be 100-200MHz 6502 :D plus maybe FDD emulator+ethernet.

 

It may sound weird, considering that I'm building an expansion board that provides the 8-bit with hardware add-on slots, USB, video, and more RAM than you can shake a stick at, but I think going all-out raspberry-pi is *too* much. It's a sliding scale, no doubt, and different people will come down at different points on that scale, but my take is that you have to preserve more than just "the keyboard and the joystick" to consider it an Atari computer.

 

I considered the raspberry pi as an option for the box - hell I even considered the Zynq to *really* spice things up, it may even have been cheaper than what I'm planning on. The issue, for me, though is that you lose what makes the Atari an Atari once you've got modern graphics, modern CPU and modern OS running on it. At that point, why not just use an emulator on the Raspberry Pi, or even run native games on it ?

 

I've chosen to retain the on-board 6502 as the main CPU (although I've proposed adding more of them, running faster, as co-processors in the FPGA fabric) - even so, the 6502 in the original box remains in charge, Antic remains the graphics device, and Pokey is doing the sound. The VGA output will (at least to start with) use the 8-bit's bus-traffic to reconstitute the graphics display, and yes, you'll be able to drive it higher (up to 1080p I think) eventually but I suspect this won't be a commonplace thing - the market for "those with an expansion box" will be pretty small, I suspect :) There's also the issue of how well an 8-bit CPU copes with drawing a high-resolution screen, even with hardware line/blit/sprite assist...

 

So things that simply ease the old hardware into the modern world (the VGA output, the USB keyboard/mouse input, more memory, an SD-card interface for storage) - those I can get behind without issue. Going slightly further, I've proposed an FPU and co-processors all memory-mapped to the main CPU. This is pushing the envelope for me, but it's nothing that you couldn't have theoretically done in "the old days". Well, ok, maybe you couldn't get a 100MHz 6502 added on, but the concept is there [grin].

 

As I said above, everyone's comfort-level with how much you modify the original design is going to be different, but I've tried to strike a balance of the old with the new that gives us new things and new options while retaining the character of the original. Sometimes I've rejected what I thought were good ideas just because they introduce too much change. Keeping the soul of the computer is important to *me* at least - YMMV :)

 

Cheers

Simon

  • Like 2
Link to comment
Share on other sites

  • 2 years later...

I'm going to *bump* this subject because it's fascinating.

 

And yes, there were "FPUs" in the 8-bit era although I do believe they were referred to as "ALUs" by AMD. 

 

Matej posted links to the AMD 9511/9512 and the Intel C8231A licensed clone.  

 

There were 1, if not 2, expansion boards for the Apple II line that used those chips back-in-the-day. Don't ask me if they were used for anything more than Visicalc though.

 

If I'm not mistaken, Atari Coin used earlier less-powerful versions of the AMD ALU in their "math box" for a few of their vector-based arcade games.

 

While there was a pic of a "modern" Apple II board using a Motorola 68881 FPU, that didn't happen back-in-the-day. However, a 68881 could work with a Motorola 6809 according to documentation found elsewhere and that was known after the 68881 debuted.

 

As for Nintendo's enhancements for the SNES, they actually shoved another 65816 into some of their carts to complement the on-board 65816 inside the SNES. That was certainly a smarter approach to say, Sega, with the SegaCD for the Genesis/MegaDrive that used its own faster 68000 which apparently supplanted the slower 68000 in the console instead of supplementing it. I guess nobody at Sega had appreciated C64 programmers offloading certain tasks to the 6502 inside the slow 1541 disk drives.

 

So, a good question to ask, if one didn't want to go the 65816 or modern microcontroller route, is how much an AMD/Intel ALU goes for these days and what's the supply like? Or how easy could their functions be replicated in a "cheap" FPGA? Such info could also be potentially useful to Atari vector arcade game collectors/enthusiasts...

Link to comment
Share on other sites

3 hours ago, Lynxpro said:

As for Nintendo's enhancements for the SNES, they actually shoved another 65816 into some of their carts to complement the on-board 65816 inside the SNES. That was certainly a smarter approach to say, Sega, with the SegaCD for the Genesis/MegaDrive that used its own faster 68000 which apparently supplanted the slower 68000 in the console instead of supplementing it. I guess nobody at Sega had appreciated C64 programmers offloading certain tasks to the 6502 inside the slow 1541 disk drives.

 

The Final Chesscard was probably the best example of this that I can remember. It had it's own 32k ROM, 8k RAM and additional co processor at 5Mhz:

 

http://blog.worldofjani.com/?p=3460

 

There was also the SFD1001 FDD which had a parallel interface and dual 6502's with 32k ROM and 4k of ram. Bearing in mind that the 1541 is only slow using standard IEC kernel routines, few game developers used these routines.

 

https://www.c64-wiki.com/wiki/SFD-1001

Edited by Mazzspeed
Link to comment
Share on other sites

3 hours ago, Lynxpro said:

I'm going to *bump* this subject because it's fascinating.

 

And yes, there were "FPUs" in the 8-bit era although I do believe they were referred to as "ALUs" by AMD. 

 

Matej posted links to the AMD 9511/9512 and the Intel C8231A licensed clone.  

 

There were 1, if not 2, expansion boards for the Apple II line that used those chips back-in-the-day. Don't ask me if they were used for anything more than Visicalc though.

Still have my California Computer Systems 7781 ALU board, uses the AMD 9511 chip. Very little commercial software recognized the board, if any. But the documentation was good and many scientific graphing applications were written as needed. Not much of that material survives today. It integrated rather well with Applesoft BASIC straight away.

 

3 hours ago, Lynxpro said:

If I'm not mistaken, Atari Coin used earlier less-powerful versions of the AMD ALU in their "math box" for a few of their vector-based arcade games.

Those would be bit-slice processors. Tempest used 4x 2901 to construct a 16-bit machine.

 

3 hours ago, Lynxpro said:

So, a good question to ask, if one didn't want to go the 65816 or modern microcontroller route, is how much an AMD/Intel ALU goes for these days and what's the supply like? Or how easy could their functions be replicated in a "cheap" FPGA? Such info could also be potentially useful to Atari vector arcade game collectors/enthusiasts...

Replicating those chips' functions in fpga should be simple enough. I mean MiSTer simulates micros like the Amiga and Mac and even a 486 system. And mame has been doing atari mathbox for over 20 years now.

Link to comment
Share on other sites

18 hours ago, Mazzspeed said:

The Final Chesscard was probably the best example of this that I can remember. It had it's own 32k ROM, 8k RAM and additional co processor at 5Mhz:

 

http://blog.worldofjani.com/?p=3460

 

There was also the SFD1001 FDD which had a parallel interface and dual 6502's with 32k ROM and 4k of ram. Bearing in mind that the 1541 is only slow using standard IEC kernel routines, few game developers used these routines.

 

https://www.c64-wiki.com/wiki/SFD-1001

 

So the Chesscard is for playing chess? Seems a bit of overkill unless going up against Kasperoff (sic). I mean, using that for an 8-bit FPS would seem like a better endeavor but to each their own.

 

As for the 1541, I'm not cutting Commodore slack. They tried to copy SIO and frakked up massively with their IEC. Perhaps they should've just approached Atari Inc about licensing SIO and making it into a standard back then instead. As for the SFD1001, they are rare and using 2 6502s seems a bit overkill. Although one wonders what the guys who made the Happy Drive could've done with that much power at their disposal on the rival platform. 

 

I ended up finding this particular thread after Googling "Atari ST+Weitek" after watching CPU Galaxy's recent YouTube vid on that FPU and vaguely - probably falsely - remembering some attempt a long time ago to get them to work on an Atari TT. Probably through the VME Bus since Sun offered Weitek options for their gear. For anyone interested in watching anything on the Weitek FPUs - I realize it's off-topic here but I digress - here's the URL:   

 

Link to comment
Share on other sites

17 hours ago, Keatah said:

Still have my California Computer Systems 7781 ALU board, uses the AMD 9511 chip. Very little commercial software recognized the board, if any. But the documentation was good and many scientific graphing applications were written as needed. Not much of that material survives today. It integrated rather well with Applesoft BASIC straight away.

 

Those would be bit-slice processors. Tempest used 4x 2901 to construct a 16-bit machine.

 

Replicating those chips' functions in fpga should be simple enough. I mean MiSTer simulates micros like the Amiga and Mac and even a 486 system. And mame has been doing atari mathbox for over 20 years now.

 

Bit Slicers? Sounds awesome. Do you know if the AMD 9511/2 can execute 2901 code?

 

Speaking of scientific papers, when I Googled "Atari ST+Weitek", I came across an academic paper from the late 80s that compared a bunch of math calculations on different hardware platforms. An Atari ST was basically used as a baseline for doing math calculations just with its 68000 vs. other systems that had their own dedicated FPUs.

 

The CCS board is one of those Apple expansion boards with the 9511, right? I'm surprised those Apple II retro enthusiasts haven't found other uses for it. They're pretty hardcore about their Mockingboards. Basically the only thing keeping them from maxing those sound card options out are the scarcity of Votrax speech synthesizers... the GI AY sound chip in comparison seems to be in endless supply...

Edited by Lynxpro
Link to comment
Share on other sites

1 hour ago, Lynxpro said:

 

So the Chesscard is for playing chess? Seems a bit of overkill unless going up against Kasperoff (sic). I mean, using that for an 8-bit FPS would seem like a better endeavor but to each their own.

 

As for the 1541, I'm not cutting Commodore slack. They tried to copy SIO and frakked up massively with their IEC. Perhaps they should've just approached Atari Inc about licensing SIO and making it into a standard back then instead. As for the SFD1001, they are rare and using 2 6502s seems a bit overkill. Although one wonders what the guys who made the Happy Drive could've done with that much power at their disposal on the rival platform. 

 

I ended up finding this particular thread after Googling "Atari ST+Weitek" after watching CPU Galaxy's recent YouTube vid on that FPU and vaguely - probably falsely - remembering some attempt a long time ago to get them to work on an Atari TT. Probably through the VME Bus since Sun offered Weitek options for their gear. For anyone interested in watching anything on the Weitek FPUs - I realize it's off-topic here but I digress - here's the URL:   

 

I'm not really interested in an 'us vs them', someone mentioned offloading duties to the 1541's 6502, I highlighted a few more little facts in relation to coprocessors on the C64. Obviously the coprocessor in the Chesscard wasn't overkill or else they wouldn't have done it, same with the dual 6502's in the SFD1001. Having said that, the 1541 has been faster than the SFD1001 with it's parallel interface using fastloader carts and JiffyDOS for decades anyway. Using RAMBoard's, the Commodore smart drives, like the A8 drives, can copy between themselves and bypass copy protection no problem - Chances are the parallel interface would actually hinder this capability.

Edited by Mazzspeed
Link to comment
Share on other sites

1 hour ago, Mazzspeed said:

I'm not really interested in an 'us vs them', someone mentioned offloading duties to the 1541's 6502, I highlighted a few more little facts in relation to coprocessors on the C64. Obviously the coprocessor in the Chesscard wasn't overkill or else they wouldn't have done it, same with the dual 6502's in the SFD1001. Having said that, the 1541 has been faster than the SFD1001 with it's parallel interface using fastloader carts and JiffyDOS for decades anyway. Using RAMBoard's, the Commodore smart drives, like the A8 drives, can copy between themselves and bypass copy protection no problem - Chances are the parallel interface would actually hinder this capability.

Was it Parallel or a better Serial like what the Plus/4 had plugging its drives into a different port and using the Plus/4's onboard 6551 to handle the serial transfer at a much higher speed? Whether Commodore or Atari, I guess it would be interesting to see Parallel mods for existing drives for almost all general purpose data transfers while retaining SIO and IEC just for the smart drive copying options. Or any other creative endeavors I'm not thinking of at the moment. Parallel might also lose the co-processor capabilities. 

Link to comment
Share on other sites

43 minutes ago, Lynxpro said:

Was it Parallel or a better Serial like what the Plus/4 had plugging its drives into a different port and using the Plus/4's onboard 6551 to handle the serial transfer at a much higher speed? Whether Commodore or Atari, I guess it would be interesting to see Parallel mods for existing drives for almost all general purpose data transfers while retaining SIO and IEC just for the smart drive copying options. Or any other creative endeavors I'm not thinking of at the moment. Parallel might also lose the co-processor capabilities. 

The SFD1001 was similar to the Plus4 as it used the cartridge port to facilitate the connection, however I don't believe the Plus4 used the same IEEE-488 parallel protocol the SFD1001 used. The NTSC Plus4 is a bit unique in that it runs it's processor at 2.2Mhz when the screen is blanked, making it one of the fastest 6502 compatible machines released. Using a bus expander you could use the IEEE-488 interface cartridge as well as any other cartridge on the C64 provided address spaces didn't conflict. 

 

However, as stated, the 1541 achieves transfer speeds of a little under 6000 bytes per second using modern S-JiffyDOS drive ROMS - Which is actually slightly faster than the SFD1001. However the SFD1001 had the advantage of capacity, being able to store up to 1MB of data.

 

Personally, I think it would be easier and more beneficial (and compatible) to implement an FPGA 6502 able to run at far higher speeds than any off the shelf or recycled FPU wouldn't it? The Ultimate 64 uses this method and can run up to speeds of 48Mhz, which is silly fast for any practical use, but more compatible than even aftermarket (and rare) accelerators using 6502 variants and likely more beneficial than an FPU which would require dedicated code in order to be utilized correctly.

 

Once again, please no 'us vs them'. I'm just mentioning the other product as there are some interesting implementations that as far as I'm aware have never been attempted on the A8 line.

Edited by Mazzspeed
Got my Mhz and Ghz mixed up!
  • Like 1
Link to comment
Share on other sites

8 hours ago, Lynxpro said:

Bit Slicers? Sounds awesome. Do you know if the AMD 9511/2 can execute 2901 code?

The extent of my programming experience with the AMD was through Applesoft. I doubt it however, because, the 2901 was a module, 1 part of many, of a complete microprocessor made from several ICs. The 9511/2 are complete solutions on a chip needing only glue logic.

 

8 hours ago, Lynxpro said:

The CCS board is one of those Apple expansion boards with the 9511, right? I'm surprised those Apple II retro enthusiasts haven't found other uses for it. They're pretty hardcore about their Mockingboards. Basically the only thing keeping them from maxing those sound card options out are the scarcity of Votrax speech synthesizers... the GI AY sound chip in comparison seems to be in endless supply...

Right. And no one really used the powerful 4MHz (and faster) Z-80's on the CP/M cards for anything other than CP/M. The 6809 fared little better. There were 68000 boards almost exclusively used in data acquisition.

 

ZipGS accelerator cards were popular for a while and selling for near $1000 on ebay not long ago. They've fallen off the map these days it seems.

 

I assume that faster/different processors changed the essence of the II series too much.

  • Like 1
Link to comment
Share on other sites

I'm working on building an RCA 1802-based machine in my spare time.  I e thing I stumbled on working on that project is a support chip that is usable in other CPUs as well.  The CDP1855 hardware mult/div chip.  Can stack 3 of them to get 24-bit hardware mult/div support that's much faster than the CDP1802 CPU pulling it off.

 

I think using an ARM or STM32 or something is cheating a bit but that's just me.  

  • Like 1
Link to comment
Share on other sites

 

I really would like to see a 200Mhz-400Mhz 6502 (primarily 8-bits) drop-in replacement card for the 800, to be installed on master CPU slot...  It would be (relatively speaking) so F-fast that it will service typical OS-interrupts, DLIs, and FP-library computations in just a tiny fraction of system clock-speed (on-bus).

 

It will auto-switch from 1.79mhz into hyper-speed, in proper sync. with the rest of the orchestra, and then back to 1.79Mhz... All of it lightning-fast, thanks to a brutal speed-differential between 1.79mhz and hyper-speed, plus its own ultra-fast RAM (thus filling tons of room between local clock-pulses).

 

3D-renderings and driving GTIA-directly for drawing (VCS2600-style) would all be a pee in the park... 

 

Now, THEN we'll be going places... ;-)

Edited by Faicuai
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...