Welcome, Guest. Please login or register.

Author Topic: FPGA Replay Board  (Read 821395 times)

Description:

0 Members and 8 Guests are viewing this topic.

Offline amigadave

  • Lifetime Member
  • Hero Member
  • *****
  • Join Date: Jul 2004
  • Posts: 3836
    • Show only replies by amigadave
    • http://www.EfficientByDesign.org
Re: FPGA Replay Board
« Reply #329 on: March 27, 2011, 08:42:12 PM »
Quote from: Darrin;624888
A question for Mike if he happens to drop in:

Are there any plans to include a "boot loader" similar to the C-One where you can select at startup which core you want to run?

I am pretty sure, as the name implies, that MikeJ intends it to run more than just an Amiga core and has planned to have the Replay board run as many Arcade machine cores as are available.  I don't know about such cores, but searching for them on the Internet should turn up more than a few, I would think.

I don't know if you would need a separate SD card for each Arcade machine, or computer system that you are cloning, or if you can fit several onto just one SD card and as you said, choose which one you want to load from a boot loader.
How are you helping the Amiga community? :)
 

Offline espskogTopic starter

  • Full Member
  • ***
  • Join Date: Mar 2010
  • Posts: 210
    • Show only replies by espskog
Re: FPGA Replay Board
« Reply #330 on: March 27, 2011, 09:07:22 PM »
Quote from: amigadave;625130
I am pretty sure, as the name implies, that MikeJ intends it to run more than just an Amiga core and has planned to have the Replay board run as many Arcade machine cores as are available.  I don't know about such cores, but searching for them on the Internet should turn up more than a few, I would think.

I don't know if you would need a separate SD card for each Arcade machine, or computer system that you are cloning, or if you can fit several onto just one SD card and as you said, choose which one you want to load from a boot loader.


I aggree. A core-selector from the boot menu would make the board very nice :) But I suspect this is already in the pipeline, or already implemented.

Espen
 

Offline freqmax

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: FPGA Replay Board
« Reply #331 on: March 27, 2011, 10:27:08 PM »
Free from memory. The Action Replay uses an ARM cpu. It's a simple matter of loading the core of choice. Cores are written in VHDL or Verilog.
Cores designed for other board designs should be easy to adapt (wishbone?). So a massive amount of cores should appear soon after the release.
Macintosh 68k and 80386+VGA based demos ought to be quick. All 8-bit variants should pose no problem.

It's unclear weather the default firmware for the ARM will allow programs to be loaded into it and then executed. (mikej?)
 

Offline nicholas

FPGA Replay Board
« Reply #332 on: March 27, 2011, 10:48:33 PM »
Quote from: lou_dias;625120
Neat!  How did you get the sources?




EmuTOS and FreeMiNT are to Atari what AROS is to Amiga.
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline desiv

  • Hero Member
  • *****
  • Join Date: Oct 2009
  • Posts: 1270
    • Show only replies by desiv
Re: FPGA Replay Board
« Reply #333 on: March 27, 2011, 11:06:29 PM »
Quote from: nicholas;625150
EmuTOS and FreeMiNT are to Atari what AROS is to Amiga.

He also said they had the sources to Atari TOS, which I think was more interesting...

desiv
Amiga 1200 w/ ACA1230/28 - 4G CF, MAS Player, ext floppy, and 1084S.
Amiga 500 w/ 2M CHIP and 8M FAST RAM, DCTV, AEHD floppy, and 1084S.
Amiga 1000 w/ 4M FAST RAM, DUAL CF hard drives, external floppy.
 

Offline nicholas

Re: FPGA Replay Board
« Reply #334 on: March 27, 2011, 11:15:15 PM »
Quote from: desiv;625152
He also said they had the sources to Atari TOS, which I think was more interesting...

desiv

So he did, I didn't notice that.

Maybe they just disassembled it?
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline Mathias

  • Newbie
  • *
  • Join Date: Feb 2011
  • Posts: 7
    • Show only replies by Mathias
Re: FPGA Replay Board
« Reply #335 on: March 28, 2011, 01:19:46 AM »
Quote from: lou_dias;625120
Neat!  How did you get the sources?

Both Madusa as Milan are involved at the Atari Coldfire Project. And both bought licences for their computers mid of the 90ies. The contracts were done with the original Atari Inc. before it was sold to JTS in 1996. So we have the original TOS sources, not disassembled code.
« Last Edit: March 28, 2011, 01:21:54 AM by Mathias »
 

Offline nicholas

Re: FPGA Replay Board
« Reply #336 on: March 28, 2011, 01:28:25 AM »
Quote from: Mathias;625176
Both Madusa as Milan are involved at the Atari Coldfire Project. And both bought licences for their computers mid of the 90ies. The contracts were done with the original Atari Inc. before it was sold to JTS in 1996. So we have the original sources, not disassembled code.


While you are here, can I ask you a question about the Firebee?

Specifically, how do you handle running old 68k binaries with no source available that use instructions that exist on both the Coldfire and 68k CPUs, but behave differently on each?
“Een rezhim-i eshghalgar-i Quds bayad az sahneh-i ruzgar mahv shaved.” - Imam Ayatollah Sayyed  Ruhollah Khomeini
 

Offline JimS

  • Hero Member
  • *****
  • Join Date: Mar 2002
  • Posts: 1155
    • Show only replies by JimS
Re: FPGA Replay Board
« Reply #337 on: March 28, 2011, 01:38:32 AM »
Quote from: freqmax;625147
Free from memory. The Action Replay uses an ARM cpu. It's a simple matter of loading the core of choice. Cores are written in VHDL or Verilog.
Cores designed for other board designs should be easy to adapt (wishbone?). So a massive amount of cores should appear soon after the release.
Macintosh 68k and 80386+VGA based demos ought to be quick. All 8-bit variants should pose no problem.

It's unclear weather the default firmware for the ARM will allow programs to be loaded into it and then executed. (mikej?)


If you look at the demo video mike posted on youtube, you can see him selecting demo disk menus from an onscreen display.
Obsolescence is futile. You will be emulated. - Amigus of Borg
 

Offline Iggy

  • Hero Member
  • *****
  • Join Date: Aug 2009
  • Posts: 5348
    • Show only replies by Iggy
Re: FPGA Replay Board
« Reply #338 on: March 28, 2011, 03:14:36 AM »
Quote from: freqmax;625147
Free from memory. The Action Replay uses an ARM cpu. It's a simple matter of loading the core of choice. Cores are written in VHDL or Verilog.
Cores designed for other board designs should be easy to adapt (wishbone?). So a massive amount of cores should appear soon after the release.
Macintosh 68k and 80386+VGA based demos ought to be quick. All 8-bit variants should pose no problem.

It's unclear weather the default firmware for the ARM will allow programs to be loaded into it and then executed. (mikej?)

Really? Which ARM CPU?
"Not making any hard and fast rules means that the moderators can use their good judgment in moderation, and we think the results speak for themselves." - Amiga.org, terms of service

"You, got to stem the evil tide, and keep it on the the inside" - Rogers Waters

"God was never on your side" - Lemmy

Amiga! "Our appeal has become more selective"
 

Offline freqmax

  • Hero Member
  • *****
  • Join Date: Mar 2006
  • Posts: 2179
    • Show only replies by freqmax
Re: FPGA Replay Board
« Reply #339 on: March 28, 2011, 03:48:06 AM »
The ARM CPU that configures the FPGA with bitfiles and fakes floppydisc.
 

Offline Iggy

  • Hero Member
  • *****
  • Join Date: Aug 2009
  • Posts: 5348
    • Show only replies by Iggy
Re: FPGA Replay Board
« Reply #340 on: March 28, 2011, 03:58:37 AM »
Quote from: freqmax;625227
The ARM CPU that configures the FPGA with bitfiles and fakes floppydisc.

That's not quite what I meant.
What type of ARM CPU?

And Nicholas' question is of particular interest.
"Not making any hard and fast rules means that the moderators can use their good judgment in moderation, and we think the results speak for themselves." - Amiga.org, terms of service

"You, got to stem the evil tide, and keep it on the the inside" - Rogers Waters

"God was never on your side" - Lemmy

Amiga! "Our appeal has become more selective"
 

Offline Mathias

  • Newbie
  • *
  • Join Date: Feb 2011
  • Posts: 7
    • Show only replies by Mathias
Re: FPGA Replay Board
« Reply #341 on: March 28, 2011, 07:12:57 AM »
Quote from: nicholas;625179
While you are here, can I ask you a question about the Firebee?
Of course! ;)
Quote from: nicholas;625179
Specifically, how do you handle running old 68k binaries with no source available
I am not a developer, so I doubt I can give you a real satisfying answer. But let´s try; there is - inside our Basis-System – a usermode, supervisormode, and a real hidden supervisormode. This 3rd new mode is unaccessable by the Operating System, and with heavy usage of MMU and illegal instructions handler most applications will work.
Quote from: nicholas;625179
that use instructions that exist on both the Coldfire and 68k CPUs, but behave differently on each?
Especially that issue is unsolved recently. We got cf68klib implemented inside the OS, but that few instructions are not done. But as I understood Atari applications make very few usage about them. I have to discuss it again with our OS-gurus, but I belive there are 2 instructions (?) that behave different. There are some ideas/concepts, but work on it will start this summer, as we also plan to do our own 68k handler, once the first series is out to the customers.
 

Offline vidarh

  • Sr. Member
  • ****
  • Join Date: Feb 2010
  • Posts: 409
    • Show only replies by vidarh
Re: FPGA Replay Board
« Reply #342 on: March 28, 2011, 09:20:17 AM »
Quote from: Mathias;625239
There are some ideas/concepts, but work on it will start this summer, as we also plan to do our own 68k handler, once the first series is out to the customers.


An idea for you guys: Look into a tracing JIT. Effectively you start by putting a breakpoint at the very start of the application. Then when the breakpoint is hit, the trap handler checks each following instruction until a branch point. At the branch point you insert another breakpoint.

If any of the found instructions are "unsafe" (differ between M68k and Coldfire) you rewrite it to an equivalent safe variation or patch in a jump to a tiny dynamically generated function that emulates the right behavior and jumps back (if there's no space to change it inline). Then you let the instruction stream execute until the next trap, and repeat.

Initially things will run slowly, but after each code path has been executed once, it'll have been rewritten and will run *far* faster than having to run a trap handler for every hit.

This approach is what's used by modern Javascript JIT's - there it's complex because they have to do complex code generation, but for M68k => Coldfire most of the code is already valid so the JIT can pass over all safe instruction and only need to recognize the few cases that are not valid Coldfire code and know how to generate code to emulate just those instructions.

You could probably do a decent functioning tracer/JIT for M68k => Coldfire in a couple of thousand lines of code.
 

Offline Mathias

  • Newbie
  • *
  • Join Date: Feb 2011
  • Posts: 7
    • Show only replies by Mathias
Re: FPGA Replay Board
« Reply #343 on: March 28, 2011, 09:43:45 AM »
Quote from: vidarh;625251
An idea for you guys: Look into a tracing JIT.
Something like this is planned by Fredi Aschwanden. I just avoided the word JIT, because I do not completely understand it myselve, and the next question normally is "why not us a PPC than" ;)Such a "partial JIT" will solve everything except selfmodifying code as far as I understood. I will post your message insiode our development forum. Thanks.
 

Offline vidarh

  • Sr. Member
  • ****
  • Join Date: Feb 2010
  • Posts: 409
    • Show only replies by vidarh
Re: FPGA Replay Board
« Reply #344 from previous page: March 28, 2011, 11:09:05 AM »
Quote from: Mathias;625256
Something like this is planned by Fredi Aschwanden. I just avoided the word JIT, because I do not completely understand it myselve, and the next question normally is "why not us a PPC than" ;)Such a "partial JIT" will solve everything except selfmodifying code as far as I understood. I will post your message insiode our development forum. Thanks.


Well, you could just as well ask "why not switch to emulation", but then I guess most of us here aren't all that rational when it comes to our attachment to the M68k architecture :)

And the other thing is that a JIT from M68k to PPC is massively more complicated. A M68k to Coldfire JIT can just skip past most instructions, and so for almost all instructions all it needs to know is how to determine that they fall in the "safe/compatible" category, and how to figure out the length of the operands to skip them. For m68k that's very easy for most instructions - there aren't that many variations of the encoding.  

In theory there's nothing really stopping you from undoing relocation and generating/caching a new fully or partially translated binary through this process either, though it might not be much point adding the complexity.

Looking at the size of M68k instruction decoders, you can do enough of the instruction decode to skip the safe instructions in at most a couple of hundred lines of code (the only one I happen to have sitting on my hd is 457 lines of C to decode instructions fully to text - a decoder that for most cases only needs to figure out the type of instruction and size would be far smaller).

Beyond that it's the code to manage breakpoints and splice in "fixed" instructions, but that shouldn't be huge either.