Page 1 of 1 [ 11 posts ] 

C64boy
Yellow-bellied Woodpecker
Yellow-bellied Woodpecker

User avatar

Joined: 5 Aug 2009
Gender: Male
Posts: 53

15 Oct 2013, 12:23 pm

Hi Im going to take a programg class next sermester and something I whant to work on is an Apple II Emulator writen in C++ I'll be using Visual Studio and would like for you guys to help by giveing me some base code so I can add more code to it to improve it.

Thanks,
Hunter (c64boy)



ScrewyWabbit
Veteran
Veteran

User avatar

Joined: 8 Oct 2008
Gender: Male
Posts: 1,158

16 Oct 2013, 1:13 pm

That might not be so simple - to start you'd need to write an emulator for the 6502 CPU. I'd start there. Beyond that you'd need to be able to get access to a usable copy of the ROM, and would possibly need to write emulators for other aspects of the hardware.



Meistersinger
Veteran
Veteran

User avatar

Joined: 10 May 2012
Gender: Male
Posts: 3,700
Location: Beautiful(?) West Manchester Township PA

16 Oct 2013, 6:42 pm

I hate to burst your bubble, but there are several open source Apple // emulators available on the net. Instead, why not try to write an original 68k Mac emulator. Better yet, why not try writing a replacement for Rosetta without infringing on Apple's intellectual property? I'm sure they're many Mac-heads, like myself, that would love to play some of the older Mac games, like Burning Monkey Solitaire, or even AppleWorks.



LupaLuna
Veteran
Veteran

User avatar

Joined: 14 Jan 2013
Age: 55
Gender: Male
Posts: 1,551
Location: tri-cities WA

26 Oct 2013, 3:17 pm

ScrewyWabbit wrote:
That might not be so simple - to start you'd need to write an emulator for the 6502 CPU. I'd start there. Beyond that you'd need to be able to get access to a usable copy of the ROM, and would possibly need to write emulators for other aspects of the hardware.


A few years ago. I designed a 6502 on an FPGA. but that was quite easy. doing an 6502 emulator for running on another CPU might be more difficult. Never tried it.



MyFutureSelfnMe
Veteran
Veteran

User avatar

Joined: 26 Feb 2010
Age: 47
Gender: Male
Posts: 1,385

28 Oct 2013, 9:18 am

It shouldn't be much harder for someone with programming experience to do it in C++ than for you to do it in Prolog or whatever you're using on the FPGA. The problem is, once you've emulated the CPU, you still have to emulate numerous other hardware devices.



LupaLuna
Veteran
Veteran

User avatar

Joined: 14 Jan 2013
Age: 55
Gender: Male
Posts: 1,551
Location: tri-cities WA

29 Oct 2013, 10:56 am

MyFutureSelfnMe wrote:
It shouldn't be much harder for someone with programming experience to do it in C++ than for you to do it in Prolog or whatever you're using on the FPGA. The problem is, once you've emulated the CPU, you still have to emulate numerous other hardware devices.


because FPGAs are not CPUs. They are a self-rewiring logic device. All I am doing is taking the logic/circuit layout of 6502 chip and telling the FPGA to wire itself accordingly. It's all at the logic/gate level and no translating/emulating is taking place. As far as emulating the numerous other hardware devices go. All I need to do is get the design of those chips and port there logic/gate functions over and if there is enough room on the FPGA. It possible to port the entire system over and run it on the FPGA. Although I have not seen a AppleII on an FPGA yet. There is an entire C64 computer that will run on a single FPGA.



MyFutureSelfnMe
Veteran
Veteran

User avatar

Joined: 26 Feb 2010
Age: 47
Gender: Male
Posts: 1,385

29 Oct 2013, 12:39 pm

LupaLuna wrote:
MyFutureSelfnMe wrote:
It shouldn't be much harder for someone with programming experience to do it in C++ than for you to do it in Prolog or whatever you're using on the FPGA. The problem is, once you've emulated the CPU, you still have to emulate numerous other hardware devices.


because FPGAs are not CPUs. They are a self-rewiring logic device. All I am doing is taking the logic/circuit layout of 6502 chip and telling the FPGA to wire itself accordingly. It's all at the logic/gate level and no translating/emulating is taking place. As far as emulating the numerous other hardware devices go. All I need to do is get the design of those chips and port there logic/gate functions over and if there is enough room on the FPGA. It possible to port the entire system over and run it on the FPGA. Although I have not seen a AppleII on an FPGA yet. There is an entire C64 computer that will run on a single FPGA.


Okay, I understand what you're doing now. I thought you were using Prolog and writing it like a program.

That being said, I guess it should be possible to use a software shim to allow you to do more or less the same thing.



LupaLuna
Veteran
Veteran

User avatar

Joined: 14 Jan 2013
Age: 55
Gender: Male
Posts: 1,551
Location: tri-cities WA

29 Oct 2013, 10:05 pm

MyFutureSelfnMe wrote:
LupaLuna wrote:
MyFutureSelfnMe wrote:
It shouldn't be much harder for someone with programming experience to do it in C++ than for you to do it in Prolog or whatever you're using on the FPGA. The problem is, once you've emulated the CPU, you still have to emulate numerous other hardware devices.


because FPGAs are not CPUs. They are a self-rewiring logic device. All I am doing is taking the logic/circuit layout of 6502 chip and telling the FPGA to wire itself accordingly. It's all at the logic/gate level and no translating/emulating is taking place. As far as emulating the numerous other hardware devices go. All I need to do is get the design of those chips and port there logic/gate functions over and if there is enough room on the FPGA. It possible to port the entire system over and run it on the FPGA. Although I have not seen a AppleII on an FPGA yet. There is an entire C64 computer that will run on a single FPGA.


Okay, I understand what you're doing now. I thought you were using Prolog and writing it like a program.

That being said, I guess it should be possible to use a software shim to allow you to do more or less the same thing.


I have never heard of Prolog but I do my FPGA stuff in Verilog which is a Hardware Descriptive Language(HDL).



MyFutureSelfnMe
Veteran
Veteran

User avatar

Joined: 26 Feb 2010
Age: 47
Gender: Male
Posts: 1,385

29 Oct 2013, 10:25 pm

Doh, I meant Verilog. That shows you what I know about FPGAs. Prolog is something else.

I never understood how HDLs work but was led to believe it was like writing a C program.

I see there are Verilog compilers for the PC.



LupaLuna
Veteran
Veteran

User avatar

Joined: 14 Jan 2013
Age: 55
Gender: Male
Posts: 1,551
Location: tri-cities WA

30 Oct 2013, 1:17 am

MyFutureSelfnMe wrote:
I never understood how HDLs work but was led to believe it was like writing a C program.


That's one of the BIG reasons why most people never get into FPGA development. They assume that FPGAs are CPUs and they approach HDLs as Just Another Programming Language. HDL is NOT a programming language at all. Programming languages describe chronological events were as HDLs describe how to build something (architecture).



MyFutureSelfnMe
Veteran
Veteran

User avatar

Joined: 26 Feb 2010
Age: 47
Gender: Male
Posts: 1,385

30 Oct 2013, 12:44 pm

Maybe you can help me understand the solution to a problem I'm trying to solve.

I want to decode h.265 video at 60 fps in 4k resolution. Doing this on a CPU requires an inordinate amount of CPU, possibly 24 cores. But there is a company that sells IP that can be installed on an FPGA and they claim that the Arria V is fast enough. I'm seeing "starter kits" for development for $850 which seems like a good deal if it can do what I need it to do. The thing is, this is for a product that might sell thousands of units. And I need to get the decoded frames into system memory, which means PCIE only, preferably 8x or 16x.

How hard is it to install one of these boards, install the IP on it, and get the decoded frames into a C program?