FPGA Implementations

dave deleted the post by dave on Wed Jun 28, 2017 7:37 pm.
Display this post.

w4jbm
Posts: 23
Joined: Sun Jun 18, 2017 1:41 pm

Re: FPGA Implementations

Post by w4jbm » Wed Jun 28, 2017 7:55 pm

On disk emulation, I have mixed feelings...

Building something external would let you use it with either the FPGA or as a replacement for the drives on one of the original system. (I have a C4P MF stored away, but I know the disk drives and diskettes are the weak point and hesitate to fire it up and burn through what life they have left.)

If you set the track zero flag, just pulse the index hole indicator at some rate, and then follow that with a serial stream of the boot loader (Track 0), you could get started.

As I remember things and read through the documentation, I think the challenge would be that most tracks aren't truly sectorized. In other works, a track could contain 8 individual sectors (each of 256 kilobytes) but usually actually just contains one single written sector that of 2,048 kilobytes. The only thing individual sectors are or smaller chunks of sectors are used for is the directory and a few utilities.

I like the Drivewire solution they use on the color computer. Something like that could have "fake" files that contained things like the date & time so you could read that. Or another "fake" file would mirror the director but include things like time stamps. Or you could write a "fake" file of a certain name and have the contents dump to a printer connected on the "server" end of things.

But to do that, you would have to rewrite the disk drivers. That actually doesn't seem to daunting because it is easy to "fake" Track 0 and the boot sector. If you put the revised routines in there, it would be loaded with no changes to the original C4P.

Having said all that, I would much rather just have a full implementation in FPGA with an SD card used to store disk images. I think that serves a more functional purpose by focusing less on nursing old C4Ps along and more on a "next-gen" C4P in FPGA.

Thanks,
Jim

w4jbm
Posts: 23
Joined: Sun Jun 18, 2017 1:41 pm

Re: FPGA Implementations

Post by w4jbm » Wed Jun 28, 2017 7:59 pm

One other thing I haven't seen mentioned and had forgotten about is that the C4P (and I believe the later C1Ps) had a pair of joystick ports. I believe they were compatible with the old Atari joysticks. But basically it just had four directions and a fire button. It supported a pair of them.

Thanks,
Jim

Steve Gray
Posts: 194
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: FPGA Implementations

Post by Steve Gray » Wed Jun 28, 2017 11:35 pm

w4jbm wrote:
Wed Jun 28, 2017 7:59 pm
One other thing I haven't seen mentioned and had forgotten about is that the C4P (and I believe the later C1Ps) had a pair of joystick ports. I believe they were compatible with the old Atari joysticks. But basically it just had four directions and a fire button. It supported a pair of them.
They were NOT standard "atari" joystick pinouts. I had to rewire the A15 board on my C4P to be able to get them working.

Steve
C4P+D&N floppy not working, 2x C4P not working, C1P not working, Superboard not working.
505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested

RedskullDC
Posts: 41
Joined: Thu Jul 18, 2013 11:24 am

Re: FPGA Implementations

Post by RedskullDC » Thu Jun 29, 2017 3:42 pm

Hi Jim, Dave, Steve, et al.
w4jbm wrote:
Wed Jun 28, 2017 7:55 pm
On disk emulation, I have mixed feelings...
Building something external would let you use it with either the FPGA or as a replacement for the drives on one of the original system. (I have a C4P MF stored away, but I know the disk drives and diskettes are the weak point and hesitate to fire it up and burn through what life they have left.)
...
I like the idea of an external module which could also be used as a drive emulator on a real machine.

There are some very cheap 8Bit <=> USB/SD card modules (<$10) based on the CH375/376 chipsets.
That takes the whole file system burden out of the equation, also allows file-based disk emulation.

Looking at how WinOSI handles it, doesn't seem all that difficult.

const MAXTRK5 = 39; // maximum track number
const TRKSIZ5 = 0x0900; // image track size (less for a real disk)

So you end up with a disk image $0900 x 40 tracks = 92160 bytes long.

Away with work next week, but I'll explore the possibilities when I get back.

Also haven't decided how to emulate to sound DAC..

----

Got the colour stuff all working this evening.
I don't have a real C2/C4, so I used the RGB values from the WinOSI emulator.

Let me know if they don't look quite right:

Image

Cheers,
Leslie

Steve Gray
Posts: 194
Joined: Mon Oct 06, 2008 1:54 pm
Location: Markham, Ontario, Canada
Contact:

Re: FPGA Implementations

Post by Steve Gray » Thu Jun 29, 2017 4:00 pm

Awesome!

Steve
C4P+D&N floppy not working, 2x C4P not working, C1P not working, Superboard not working.
505 board, 610 board, Mittendorf board, TOSIE hacker board need testing, PicoDOS disk untested

w4jbm
Posts: 23
Joined: Sun Jun 18, 2017 1:41 pm

Re: FPGA Implementations

Post by w4jbm » Fri Jun 30, 2017 3:22 am

That really is amazing. FPGAs are something I think I could eventually make do a lot of things, but you are cranking out in days more than I realistically could in years.

Are you still using the Terasic Cyclone DE0 board? I feel like its time to step up from the Cyclone 2C5 board I've been using.

Thanks,
Jim

RedskullDC
Posts: 41
Joined: Thu Jul 18, 2013 11:24 am

Re: FPGA Implementations

Post by RedskullDC » Fri Jun 30, 2017 4:12 am

Hi Jim,
w4jbm wrote:
Fri Jun 30, 2017 3:22 am
That really is amazing. FPGAs are something I think I could eventually make do a lot of things, but you are cranking out in days more than I realistically could in years.
Are you still using the Terasic Cyclone DE0 board? I feel like its time to step up from the Cyclone 2C5 board I've been using.
For this project, I'm using the Terasic DE0-CV (Cyclone V) board:
http://de0-cv.terasic.com

49K Logic Elements, 308K Bytes embedded memory, PS/2, VGA, SD card, 2 x 40 pin GPIO ports.
It's pretty good value at $150 / $99 academic. You can get going straight out of the box.

Their Cyclone V GX starter kit is excellent value at $179 : http://c5g.terasic.com has a few more features, more logic.
Downside is that it only has HDMI video out. No VGA or PS/2 ports. You would have to wire them up yourself.
I have one of those too, but still getting my head around how to drive the HDMI.

That 2C5 board you have is great for tinkering with, and can be had for next to nothing.
They're a great way to figure out if FPGA's are "for you" so to speak.
One very quickly runs out of on-board resources though, hence the external SRAM.

---

It took me a good few years of part-time experimentation to become proficient with VHDL and Verilog.
Hardest part was thinking in terms of parallel processes, which meant breaking all the programming habits of a lifetime :)
"HDL Chip Design" by Douglas J Smith is an excellent text for learning synthesizable VHDL/Verilog.
A google search should be able to locate a PDF copy for you.
Terasic have their own VHDL manual to buy which is pretty good too, and tailored for their boards with Quartus II.

---

I still love tinkering with "real" antique computers by the way (current machine count is 35 and growing), and have nothing whatsoever against software emulators.

*But*... for all those ultra-mega-rare machines that I don't have a snow ball's chance in hell of ever seeing (let alone owning!), or if I want to control some real hardware, FPGA is the go.

Cheers,
Leslie

w4jbm
Posts: 23
Joined: Sun Jun 18, 2017 1:41 pm

Re: FPGA Implementations

Post by w4jbm » Fri Jun 30, 2017 5:30 pm

I just ordered the Terasic DE0-CV from Digi-Key and also found the book you mentioned. I had been wanting a stouter FPGA board and this seems to do what I'd like to do for some other projects also.

"Back in the day..." so many people used different color monitors that I'm not sure trying to be too definitive on how colors appeared would be worth the effort. I had a color video surveillance monitor I had swapped some work for that was probably better than average, but I don't remember the colors being particularly vivid. I also don't remember many programs making much use of color. Things like a solid blue background for pong or something along those lines might have been done, but character by character color wasn't worth the effort and a lot of people used black and white monitors even with the C4P because they were more affordable.

I'm kind of wondering if a full binary of OS65D could be loaded using a hex file loader bootstrap or something just to see if it works I'd have to take a look at the disk images available to see if I could pull that together.

As strange as it sounds, one thing I'd like to do is get the editor / assembler / monitor program that came with OS65D going. I did a fair amount of programming in that.

Thanks,
Jim

RedskullDC
Posts: 41
Joined: Thu Jul 18, 2013 11:24 am

Re: FPGA Implementations

Post by RedskullDC » Sat Jul 01, 2017 4:24 am

Hi Jim, et al.
w4jbm wrote:
Fri Jun 30, 2017 5:30 pm
I just ordered the Terasic DE0-CV from Digi-Key and also found the book you mentioned. I had been wanting a stouter FPGA board and this seems to do what I'd like to do for some other projects also.
....
I'm kind of wondering if a full binary of OS65D could be loaded using a hex file loader bootstrap or something just to see if it works I'd have to take a look at the disk images available to see if I could pull that together.

As strange as it sounds, one thing I'd like to do is get the editor / assembler / monitor program that came with OS65D going. I did a fair amount of programming in that.

Thanks, Jim
I've uploaded the current snapshot of the code + programming file to:
http://www.crisis.com.au/images/OSI_Searle_Q17.zip
in case you want to have a play with it when your board arrives.
(Or for anyone else who wants to check it out!)

This version is running at 1.0MHz only, but includes CEGMON C2 (F400), OSI BASIC, 48K RAM, colour, 64x32 + 32x32 screen modes, OSI Chargen, XGA [1024x768@60Hz] video out, UART.


I use a simple FTDI USB<=> TTL fly lead cable to connect to my PC for transferring programs.
The readme.txt will tell you what GPIO pins to connect it to.
(Remember to cross over your TXD/RXD lines, dumb terminal style).

Can't do any more with it for a week or two due to real-life commitments.

Cheers,
Leslie

Post Reply