跳到正文
Gbatemp· wavemotion·· 2 小时前AI 评分12

SugarDS - 用于 DS/DSi/XL/LL 的 Amstrad CPC 模拟器

SugarDS - An Amstrad CPC Emulator for the DS/DSi/XL/LL

AI 导读

SugarDS 作为面向 DS/DSi/XL/LL 的 Amstrad CPC 模拟器,已在 DSi 上初步运行 Amstrad CPC 6128 OS 与 BASIC,无限制帧率约 91 fps。

正文

Here is the official thread. At this point it's going to happen.

Though I swore not to do another emulator with a screen resolution that doesn't match the DS... here I am. Someday I'll learn :)

This year I've been playing around more with the British micros of the day... having gotten quite smitten by the ZX Spectrum after watching The Rubber Keyed Wonder documentary (if you haven't seen it, put this at the top of your list please!).

And eventually I came around to some of the "lesser" players in the 80s micro scene. The Amstrad CPC was somewhat the 'third wheel' of micros in the UK with the Commodore 64 and Spectrum taking up positions 1 and 2.

The first Amstrad machine is the CPC 464 and I'll admit I love the coloring and stylings on this guy... The whole thing is super-wide... could be used as a canoe paddle in emergencies I suppose.

1747914578583.png

And with that lovely color scheme, I tinkered around in GIMP (my paint program of choice) and came up with this:

1747914378454.png

Still... a keyboard graphic doesn't make an emulator... but I also designed a little 32x32 icon for Twilight Menu:

1747914387830.png

And.. of course, a keyboard graphic PLUS an icon doesn't make an emulator.

I looked at the source code for croco-ds and found it hard to fully understand... not to mention it doesn't compile with the modern toolchains of the 2020s.

I've asked Alekmaul for the sources to AmEDS but haven't heard back yet.

But I did have about half of the needed emulated components for an Amstrad CPC - which are:

✔ Solid Z80 Core running at 4MHz
✔ AY Sound Chip (same as ZX Spectrum 128K)
x 8255 PPI Interface Chip
x 40010 Gate Array
x 6845 CRTC (Cathode Ray Tube Controller)

And I thought... why not just do the work of figuring out the missing components.

So last night I threw together what must be the worlds worst Gate Array emulator that only handles Mode 1 graphics (320x200) with absolutely no handling of any other modes or colors... and I managed to get a 128K RAM CPC machine running with the Amstrad CPC 6128 OS and BASIC:

1747914958761.png

The keyboard doesn't really work yet (just a few keys functional) and you can see that it's running at ~91 frames per second unthrottled... on a DSi (which means a DS will be roughly half that - still not bad considering the target is 50fps for a PAL machine).

This has no optimization so I know it can be much faster. But I'm not concerned about optimization today - just trying to cobble in the missing components. It's going to take significant work to get the Video Gate Array and the CRTC chip fully up to spec... and it's games that pull tricks that will really stress the implementation here.

My near-term goals:

  • Get a real 8255 PPI driver in place and hook up the keyboard, joystick and sound chip.
  • Improve the Gate Array to handle proper memory banking and interface to the CRTC.
  • Improve the CRTC to handle Mode 0 (160x200 in 16 colors) and Mode 1 (320x200 in 4 colors) and leave Mode 2 (640x200 in 2 colors) for the distant future.
  • Add basic .SNA snapshot (memory dump) handling so I can actually load up a game and play
  • Add CPC .dsk handling which is the more standard way of loading Amstrad CPC games

Encouragement of any kind is appreciated. This stuff is not easy and the time commitment is formidable.

来源:Gbatemp · gbatemp.net