News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu

Another CPC emu, with bunch of questions (about Z80 timings and FDC)

Started by Lone, 15:45, 08 July 13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Phi2x


TFM

There was an update beginning of December...




Sugarbox | Yet another CPC emulator...




It's worth to follow this site up more often.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Gryzor

Thanks for mentioning it, TFM! Indeed it progresses nicely. I like this:


QuoteXBox controller can be used as joystick

But I'd like to see it making progress in the GUI front...

Lone

Fell free to mention every thing you want !
After all, today is christmas...


And I try to have a complete to-do list, with everything needed by everyone (in what I'm good for, which does not include nice icons, for example ).

TFM

I'm sure that for nice icons an such things (I can't do that either) you will find help here. We got some great graphics creators on the forum.
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Gryzor

There are so many good icon resources out there it'd be pointless to really discuss it :D But anything would be better than a big 3D box with off-centre text.


Keep it up! :)

TFM

In general there are two philosophies: For some it is important how a program looks like, and for others it's important what a program can do. Personally I'm one of the latter category.


So - just IMHO - it's good to have a well emulator, the surface / interface can be improved later. What counts is what you got under the hood. But as stated - just IMHO.

TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Gryzor

Both are important, ever since 1988 or so. Of course functionality is more important, but once you get that, UI should be looked after. Especially when it's so easy.

arnoldemu

Quote from: Gryzor on 20:05, 31 December 13
Both are important, ever since 1988 or so. Of course functionality is more important, but once you get that, UI should be looked after. Especially when it's so easy.
Good UI is not always easy.

True it's easy to put some buttons and labels and text boxes, but making it in a way that makes it natural to use is not so easy.

True that accurate emulation is very important.

My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Gryzor

Oh, don't get me wrong, I know that UI/UX is a whole science unto itself, and it takes a lot of thought to have an emulator have the features you want, where the user wants them. But yes, I was taking about the looks of it, a few properly sizes and aligned buttons and a handful of nice, self-explaining icons.

Lone

A new version is available... here : Sugarbox 0.15 is out. | Sugarbox


Sorry for Gryzor, but no new sexy interface at this time. I promise I'll think about it for next release (don't forget that it's still in beta phase !)


Feel free to ask any question, or to report anything that goes wrong.


Here the log :


- CRTC detection tests are correctly passed (For CRTC 1 at least)
- Z80 : Lots of improvement in Interrupt and general timings
- Z80 : OUT write it's value with delay to the port (this make some demo works..)
- Z80 : When an interrupt is pending, EI / HALT works correctly (this make « L'arche du capitaine blood » original dump to work correctly)
- CRTC : Fix the adress computation : Only correct bits are compared. This correct the « The demo » demo.
- CRTC1 : Fix adjustement computation, when R5 > R9 (adjustement counter was only increased when VCC=R4)
- Gate Array : Corrected a bug in the MMR, that prevented Phortem demo to run
- Gate Array : IO handled at 4mhz to have precise timings for color changed- Ink changed should be pixel correct
- PPI8255 : CPC+ Feature of non-reset of Port ABC when writing control register implemented. This allow CRTC detection to be complete
- PPI8255 : Corrected a bug in PPI Control register, when bit7=0 (Shadow of the beast hanging bug in « press fire » screen is corrected)
- PPI8255 : Port B only readable.- FDC : Read Track correction, LATIS (Hercule2 – Translock) now ok
- FDC : Detection of end disk improved, even when GAP3 is wrong
- FDC : Disk with only MV – CPC now loads correctly- Monitor : Correction of a bug that prevented a detection of HBL in some case of the PLL ->Arkanoid I no longer crash the emulator
- Monitor : Rewrite the honrizontal synchronization mechanism.
- Monitor : Correction of HSync. CRTC R0=64 can be used now without hsync problems (The demo work better)
- Monitor : Improved handling of Hsync position via R2
- Monitor : Correct the garbage that occasionnaly appear on reset
- Monitor : Add handling of multiple HSync with correct synchronisation
- Reset is now fully implemented
- Settings : CRTC type is changed correctly
- Settings : Change does no longer reboot the CPC

TFM

Just checked it out! It works like a charm! And I like the interface: Found everything immediately.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Gryzor


TFM

Well, I like it simple. If it get too complex my GPU overheats and I see colored clouds and can't do anything for a while.  ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Lone

Hello there,


New version is available (0.16b) with some corrections, on the CRTC and FDC mainly.


It's now working with Windows XP, if Direct X is installed.


Testing it is a good way to discover the great job of all thoses demomakers !


Here it is : Sugarbox v0.16b | Sugarbox




Gryzor


Lone

Hi there,


New version available ! v0.17
Special feature are a better GUI, and a solution for the XInput XP problem : This version should run on windows XP, even without a correct XInput install.


Here's the link : Sugarbox v0.17b | Sugarbox
Here's the log :



- Gate array : MMR Corrected : If a 128k config is set, only 128k are available.
- Gate array : Corrected access to MMR and MMR through PAL
- Gate array : Mode 3 is handled
- Monitor : Change the function used for adjustement on HSync : Use a square root instead of a log, to make some demos more stable ("Camembert 4" demo for example)
- Timings : Adjust some timings for out command. "From scratch" demo now display correct colours at the correct place
- FDC : Reset is (really) fixed. It no longer set the FDC in a state that prevent it to be used
- FDC : Add delay during track change
- General : Load the Xinput lib in the code, to avoir non runing app on some XP systems.
- General : Screenshot option added
- General : Speed limit is more configurable, from 50% to no-limit
- General : Some code optimisations
- General : Screen size can change (from "full PAL display" to "standard CPC screen")
- General : Directories problems have been solved. It is now possible to drag'n'drop dsk file to a sugarbox shortcut (or to associate dsk with sugarbox)
- Sound : Volume slider added
- Sound : Mute option added
- Sound : Record is flushed, so the file is not only written at the end of the recording
- GUI : Current track number is displayed
- GUI : Add a "scanline" option
- GUI : Add nice icon for sound and disks
- GUI : Added Screenshot, settings and reset icons
- Startup : Associating "dsk" with sugarbox offer the possibilitty to load disk directly


TFM

WoW! That was a lot of work!!! Keep the project going!  :) :) :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Gryzor


Lone

Hello there,


New version is out.


SNA files are handled, and bug are fixed.
CRTC is a bit improved, and run almost all demos I can found.
By the way, if something is not working, drop me a line !


Here is the version :


Sugarbox v0.18 | Sugarbox




redbox

Quote from: Lone on 21:48, 26 March 14
New version is out.

I enjoyed playing with this.

Would be nice to hear a bit about how you are finding the development of an emulator - such as: how did you write it, was it easier/harder than you thought and what's been the biggest challenge etc...?

Lone

Well...


In fact, writing an emulator was in my mind since I discover the first one, in the early '98, i believe. I didn't have enough time and competence, but I keep thinking about it since that day. Obvious target would be the CPC, as it's a "simple" computer, and, most of all, my first one when I was a child.


Since that day, I improved my coding skill through my work, and my experiments. Then, at the end of year 2012, I began to have a bit more time : My wife was pregnant, so she slept the whole evenings on the sofa, and all my current projects where finished, or at least I lost the motivation to continue them (I was running a really small blog on coding ).


So, I wrote the first lines, which was not that hard, as I was thinking of "how I would do if I want to" since about 14 years...


The whole process was not really difficult since that day, since LOTS of informations are available on the net (see the grimware, the cpcwiki and all data gathered by arnoldemu since that day).


Also, with twins at home, I have more time than I can afford to think, as giving 10 or 12 bottles a day (half of it incombed to me) let me think about it, at least when I was trying not to fall asleep.


Running basic was, at this time, easier than expected. Then come the two challenging parts I faced : Having an emulator that runs protected games, and all demos.
On these two parts, really few informations are available. Believe me or not, I became a real pro about googling particular subjects, to find the two sentences that can give me missing informations.


With a bit of support of really dedicated guys (Simon Owen, for example, send me couple of hints that were really precious about FDC support), I finally managed to make it run almost properly... But I still have lot's of question that didn't find an answer yet !




Speaking of the emulator itself, it's written in plain C++, plain Win32, Gdi. I added XLib for XBox controller support (as I wanted to play game with it), and added a debugger with lots of specific feature (like, breakpoint on CRTC register value).


I see it as experiment, so the code is not really nice, with lots of "Todo" mark, lots of things that should be rewritten, and so on... As I don't have enough time to do everything, I have to use priority to order what I would like to add and fix. Which is, basically, running on amstrad 6128 with CRTC 1, all the demos I find, and all protected softwares (and Futur OS, of course)


Then I will add CRTC 0, 2, 3, 4 support, second drive, CPC+ support, special hardware, etc...


I plan to add Direct X or other support when other parts will work correctly, as it's not necessary at this time (emulator running at 400% on my a bit modern i7 processor).


Sometime, also, I add GUI improvement, as it's fun to code (I had good time writing the sound slider for example), and make the emulator easier to use.


Also, I write on my todo list almost every comment made on it (not so many I can confess), which give me idea on what I can add.


I finally get a real CPC, but I'll have to fix the drive to use it (and believe it or not, finding this 5.25" drive cabble is not so easy by now...). I plan also to write specific tests, (on the CRTC of course !) to use the scientifi method on it : Hypothesis, experiments, conclusions. All these projects should keep me busy for the ten next years, I think !


redbox

Thank you for the insight, nice to hear about it.

I'd love to write an emulator one day and you're experience has reinforced this for me :)

arnoldemu

I found about 90% of my answers through writing tests and running them on real machines.
I have a collection of tests for ay, 8255, keyboard, crtc, plus features, fdc.

But when I find information I do share it and document it.

Still there are some questions I haven't answered yet:

- exactly what state is the crtc type 3 and 4 in after reset; are all registers reset to 0 like on the others or something else?

There are a few more questions I need to answer.


I didn't release these tests yet because I wanted to make sure my emu passed them LOL.
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Lone

Here is a new version, at least ! v0.19 is freshly compiled !


Lot's of effort on FDC support, with IPF, RAW, SCP and CT-RAW support (and a completely new paradigm).
Also some other features....




Here's the link : Sugarbox v0.19 | Sugarbox

Powered by SMFPacks Menu Editor Mod