Author Topic: Sugarbox, a CPC emulator for windows (and raspberry pi, soon).  (Read 5190 times)

0 Members and 1 Guest are viewing this topic.

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Hello,


Since the last version was a long time ago, here's the new version of my emulator.


Here is what is worth pointing out about this one :


- Handle some disk formats, which it can read and write : DSK, EDSK, HFE, SCP, IPF (IPF is native : no use of SPS CAPS lib is needed)
- Read some more disk format (but can't write it at the moment) : CT-RAW, RAW (from kryoflux)
- Have a special support for 50 or 100Hz screen, for buttersmooth scroller (when sync is ON)
- Z80 emulation is precise : All z80 test from arnoldemu are corrects.
- Can drag'n'drop disk, snapshots, binaries (with AMSDOS header), tape





Current version is v0.26, (from tonight) it's available here : Sugarbox v0.26 | Sugarbox


Log for this version is following :




- [CT-RAW/IPF]       : Native support of these two format. CAPSLib dll from SPS is no longer used. This will fix some non-working dump( due to bug in the lib).
- [IPF]              : Add a SAVE IPF option. You can save your current disk in IPF format, to generate a 3" disk. You can even write dump with weak sectors.
- [HFE]              : Now it's possible to save HFE file !
- [edsk]             : Added some tuning to handle sector of header size lower than real size.
- [edsk]             : Fixed some nasty memory overrun.
- [edsk]             : Fixed the way of handling overlapped disk : "Corsarios (UK) (1988) (CPM) [Original].dsk" disk now run correctly. In fact, all dsk should now retrieve their original size of 6k/track
- [edsk]             : Fixed support for ALLGAP dumps
- [FDC]              : New paradigm : Weak bits are now handled by bit. Multi-revolution dump are converted to single revolution with weak bits data.
- [FDC]              : Fix a bug with the SZ byte = 0 in read track command (this fixed "War In Middle Earth (UK) (1987) (CPM) [Original].dsk" dump)
- [Tape]             : Add a delay when motor is on/off. This fixed "Last Mission"
- [Z80]              : Interrupt mode 0 is partially fixed : It does nothing, but no longer corrupt the Z80 registers
- [Z80]              : Fix some wrong behaviour of undocumented opcodes
- [Z80]              : Add the undocumented 'Q' register used for Flags, and fix the SCF/CCF instructions regarding this register
- [Z80]              : All Z80 tests from Patrik Rak, adapted to the CPC by Kevin Thacker, are now correct.
- [Display]          : Fixed wrong behaviour for 100%speed with 100hz screen without black frame insertion : Speed was twice what was intendeed
- [General]          : Add Autorun disk on insertion which try to guess the best file to run.
- [General]          : Optimization : Everything is now running 60-80% faster than before
- [General]          : Add a support for auto-executing BIN file (with AMSDOS header), through drag'n'drop.
- [General]          : Fixed the Spanish configuration for 464, and added support for Danish keyboard.
- [General]          : Added -fullscreen command line to enable fullscreen by default
- [General]          : Fixed the "-command" option : In order to run a disc, just launch your command as Sugarbox -command run\"disc\" for example
- [General]          : Added sound for disk drive
- [General]          : Fix copy/paste for english/spanish/danish
- [GUI]              : Added a feedback when loading tape/disk/SNA/SNR
- [GUI]              : Added a preliminary debugger, with Register edition, breakpoints, flags
- [Joystick support] : Fixed diagonals not supported with some joypads (now, games should be far more playable !)
- [Memory]           : Fixed the configuration : 64k computer no longer have improper PAL
- [Settings]         : Fixed some nasty bugs preventing the keyboard settings to work




« Last Edit: 00:37, 18 August 19 by Lone »

Offline TFM

  • Visit the mysteries of the CPC at www.futureos.de
  • Supporter
  • 6128 Plus
  • *
  • Posts: 9.899
  • Country: aq
  • Space Chicken for FutureOS is free!
    • index.php?action=treasury
    • FutureOS - The revolution on CPC!
  • Liked: 1976
  • Likes Given: 4650
Re: Sugarbox, a CPC emulator for windows.
« Reply #1 on: 19:33, 06 April 16 »
WoW! Awesome update list!  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: Sugarbox, a CPC emulator for windows.
« Reply #2 on: 10:47, 08 April 16 »
@Lone: There are some more tests in the cpctests directory (cpu.asm is one which tests interrupt reporting bug for ld a,i/ld a,r on nmos cpus - the types used in cpc. This bug is described by Zilog in their documenation), and one for testing r value for most opcodes (The test doesn't have all opcodes yet). I don't know if zexall or similar test R value.

I will move these into the z80 tests directory.

Also, the tests I converted have the out/in tests disabled because they are made for spectrum and it's ports, so I will be adding tests for those soon so we can confirm these on cpc too.

I am planning:
- a im0 test (which will run on plus; vector can be controlled so I can make a stable test), a more limited one for cpc (may need external device for this one).
- a nmi test (this will need a playcity or similar device that can cause an nmi).

But well done for making the tests run. Sugarbox emulates a Zilog NMOS Z80 :) (and full compatible Z80's).

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

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #3 on: 12:03, 08 April 16 »
One more time, thanks a lot for all these tests ! It's really a wonderfull work.


I'm looking forward to any update of this to improve my emulation !



Offline arnoldemu

  • Supporter
  • 6128 Plus
  • *
  • Posts: 5.332
  • Country: gb
    • Unofficial Amstrad WWW Resource
  • Liked: 2247
  • Likes Given: 3477
Re: Sugarbox, a CPC emulator for windows.
« Reply #4 on: 15:25, 08 April 16 »
One more time, thanks a lot for all these tests ! It's really a wonderfull work.


I'm looking forward to any update of this to improve my emulation !
You're welcome.

There will be an update soon (a week or two) which includes more crtc tests. You will see it at the same time I make another release of Arnold WIP :)

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

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #5 on: 23:24, 27 November 16 »
Hello there,


Here is a new version of Sugarbox (v0.27)


Source : http://sugarbox.free.fr/?p=151


And here's the log :



- [Emulation]        : Add some optimizations. MAX speed should be faster (about 100% gain from v0.26)
- [Emulation]        : Remove memory leaks in IPF writing process
- [Config files]     : Fix the '-' and '_' for french keyboard : "From scratch" now autorun properly.
- [Display]          : Screenshots are fixed : No more unwanted black line at the top.
- [Dump support]     : Fix the code used to compute multi revolution dump, to be more reliable (when a revolution is wrecked, dont use it)
- [FDC]              : Lots of fix in the FDC : The 'acid tests' of arnoldEmu are almost all corrects now.
- [FDC]              : Fix some bugs when reconstructing the tracks (fix some dump of "Le Necreomancien", and various CTRaw files also)
- [FDC]              : The 'Flip' fonction (used to flip double sided dumps) is now working correctly. Double faces IPF are now working
- [FDC]              : '10' bits used for bit synchronisation can be in a smaller number : 40 bits are enough to consider the PLL as correctly fixed between clock/data bits
- [General]          : Fix a deadlock that occurs when a command is used during a dump disk is read
- [General]          : Fix the autotype feature : the feature is more relevant. Also, the "|" character is correctly rtanslated to 'ù' on french keyboard.
- [General]          : Add a function to recording every frame into a screenshot
- [General]          : Autorun feature is a bit more reliable (more rules added)
- [General]          : Added some command line switches : -sn xx (load xx as a Snapshot file), -drivea xx to set xx into drive A, -driveb (same for drive B)
                        -fullscreen to start in full screen mode, -config xx to load xx as config file, -command xx to run xx as basic command at start
- [GUI]              : Fix the incorrect update of "Save as.." menu when inserting a disk.
- [Multiface II]     : Add preliminary support for Multiface II (no config yet)
- [PPI]              : Rewrite most of the 8255 implementation. Now run the 'acid test' properly (when it have meanings)
- [PSG]              : Correct lots of bugs (sound is now a LOT better, and digitized sound works correctly). Fix Dick tracy, Antiriad, Crazy cars 2, and probably a lot more !
- [PSG]              : Also run the 'acid test' of PSG correctly.
- [Z80]              : Support for NMI added

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #6 on: 16:45, 30 June 17 »
Hello,


New version is available :


http://sugarbox.free.fr/?p=166


Whats new : New z80 core, playcity and multiface II, and lots of bugfix



- [Gate Array]       : Fix mode changing : Imperial Mahjong now looks better !
- [Devices]          : Add support for the Playcity and the Multiface II cards.
- [Z80]              : Complete recoding of the Z80 core. It now use the real M and T states, and handle WAIT states correctly. More accurate.
- [General]          : ZIP support (only zip file at the moment) for tape and disks
- [IPF]              : IPF created is striclty equivalent to the original dump (in term of MFM track)
- [IPF]              : Minor fixes in IPF reading
- [DSK]              : Fix some wrong behaviour. Dsk reading should be more reliable (and will no longer crash)
- [DSK]              : Fix a bug in saving DSK file. It should no longer crash (anyway, if you can avoid using it, prefer HFE or IPF format !)
- [Emulation]        : All peripherals are now running in the correct timings.
- [FDC]              : Index detection fixed on Sector writing (Imperial Mahjong is able to save its configuration)
- [FDC]              : Dump with missing tracks will no longer crash Sugarbox
- [FDC]              : Fix wrong behaviour for double sided dumps that needs flipping of disk (fix altered beast double sided CTRaw)
- [FDC]              : Fix wrong status than can set "Seek end" incorrectly in some cases

Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.439
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
  • Liked: 1018
  • Likes Given: 579
Re: Sugarbox, a CPC emulator for windows.
« Reply #7 on: 19:06, 30 June 17 »
Very cool.  I like this emulator for it's ease of use and that it lets me use the d-pad of my gamepads rather than forced to use analog stick. :)

Having a bit of trouble with zips though.
If I load them through Disk menu at top it fails with loading error.   And if i try loading them by dragging the zip file into the emulator window it finds it and starts loading but eventually I get the CPC error "Drive A: Read Fail"
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #8 on: 19:18, 30 June 17 »
Thanks for the remark !


Concerning the zip support, I'll try to fix it (and complete it with other formats)
Is it possible to send me in any way the zip file with this "drive A: read fail" ?

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 693
  • Country: fr
    • urban exploration
  • Liked: 968
  • Likes Given: 610
Re: Sugarbox, a CPC emulator for windows.
« Reply #9 on: 18:11, 11 August 17 »



Sugar is going Plus  8)


(WIP)
use RASM, the best assembler ever made :p

I will survive

Offline ssg

  • Supporter
  • CPC664
  • *
  • Posts: 66
  • Country: tr
  • NOP
  • Liked: 18
  • Likes Given: 25
Re: Sugarbox, a CPC emulator for windows.
« Reply #10 on: 10:23, 10 November 17 »
The web site seems to be down?

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #11 on: 11:44, 10 November 17 »
The web site seems to be down?
 


I Just checked for it now, it's currently available (at least from france)


Offline ThomH

  • CPC664
  • ***
  • Posts: 57
  • Country: us
  • Liked: 39
  • Likes Given: 14
Re: Sugarbox, a CPC emulator for windows.
« Reply #12 on: 17:58, 10 November 17 »
  I Just checked for it now, it's currently available (at least from france)

It is however also seemingly unavailable from New York City. free.fr is reachable, but sugarbox.free.fr, which maps to perso153-g5.free.fr, times out.

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #13 on: 19:19, 10 November 17 »
Trying to connect through a US proxy, I get an error.
With a french proxy, same error.
With my default connexion, everything's fine



Also, everything seems ok from my provider point of view.


So it far beyond my IT skill :/


What I can suggest : If anyone needs any information (or binaries), I'll provide them here.




Offline Nich

  • Supporter
  • 6128 Plus
  • *
  • Posts: 690
  • Country: gb
  • CPC Game Reviews webmaster
    • CPC Game Reviews
  • Liked: 533
  • Likes Given: 652
Re: Sugarbox, a CPC emulator for windows.
« Reply #14 on: 22:25, 10 November 17 »
It is however also seemingly unavailable from New York City. free.fr is reachable, but sugarbox.free.fr, which maps to perso153-g5.free.fr, times out.

I was also unable to access the Sugarbox website using my default connection and I had to resort to using Tor to access it. The same thing happens with Tom et Jerry's site, http://tj.gpa.free.fr/ .

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #15 on: 19:17, 22 January 18 »

Hello,


A new release is available.
This release is mainly focus on the PLUS emulation, and a more precise sound emulation.


Version is available here :


http://sugarbox.free.fr/?p=173


What’s new :


  • Complete PLUS family support : 464+, 6128+, GX4000. All ASIC functions are supported (making modern demo like « CRTC3″ or « Eerie forest » functionnal).
  • SNA v3 is supported, with BRKS chunks (breakpoints generated by RASM or Winape)
  • Various fix on full screen management (should not crash anymore)
  • Various fix on DSK management. More dumps should be analyzed correctly
  • IPF support : Generated IPF file should be more reliable (no more crash with Samdisk or DTC from kryoflux)
  • Joystick support is better
Sound have also been been reworked.


I'm aware that the website seems to be unreachable from outside of France. I'll try to find another place to put them (and update this post as soon as I can find something better)




Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.439
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
  • Liked: 1018
  • Likes Given: 579
Re: Sugarbox, a CPC emulator for windows.
« Reply #16 on: 20:56, 22 January 18 »
Website seems fine to me in England. Downloaded now but am off out to a rehearsal so will give it a go tomorrow. :)
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline tjohnson

  • Supporter
  • 6128 Plus
  • *
  • Posts: 685
  • Country: gb
    • index.php?action=treasury
  • Liked: 215
  • Likes Given: 135
Re: Sugarbox, a CPC emulator for windows.
« Reply #17 on: 22:27, 22 January 18 »
Hello,


A new release is available.
This release is mainly focus on the PLUS emulation, and a more precise sound emulation.


Version is available here :


http://sugarbox.free.fr/?p=173


What’s new :


  • Complete PLUS family support : 464+, 6128+, GX4000. All ASIC functions are supported (making modern demo like « CRTC3″ or « Eerie forest » functionnal).
  • SNA v3 is supported, with BRKS chunks (breakpoints generated by RASM or Winape)
  • Various fix on full screen management (should not crash anymore)
  • Various fix on DSK management. More dumps should be analyzed correctly
  • IPF support : Generated IPF file should be more reliable (no more crash with Samdisk or DTC from kryoflux)
  • Joystick support is better
Sound have also been been reworked.


I'm aware that the website seems to be unreachable from outside of France. I'll try to find another place to put them (and update this post as soon as I can find something better)


I've never been able to access your website, I'm in the UK and on a mainstream broadband supplier.

Offline roudoudou

  • 6128 Plus
  • ******
  • Posts: 693
  • Country: fr
    • urban exploration
  • Liked: 968
  • Likes Given: 610
Re: Sugarbox, a CPC emulator for windows.
« Reply #18 on: 22:34, 22 January 18 »
free provider has trouble today, try in a few days
use RASM, the best assembler ever made :p

I will survive

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #19 on: 14:32, 23 January 18 »
You can download the latest version from the Emu-france website here :

Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.439
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
  • Liked: 1018
  • Likes Given: 579
Re: Sugarbox, a CPC emulator for windows.
« Reply #20 on: 20:35, 23 January 18 »
Update seems great.  And I love that it has better joypad configuration than most CPC emulators. 
How do you load carts?  I see a 'default cart' option in the settings and have set the CPC type to 6128 Plus EN but I don't see a load cartridge thing in the menu or button at the bottom like I do with tapes/disks.  I played a bit of Burnin' Rubber just fine.  :)
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #21 on: 21:08, 23 January 18 »
Sorry, I'll have to do a tutorial once :)


Like any other medias, the best way to load CPR is drag'n'drop.


Offline Carnivius

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.439
  • Country: gb
  • Mayhem Attack Squad
    • index.php?action=treasury
  • Liked: 1018
  • Likes Given: 579
Re: Sugarbox, a CPC emulator for windows.
« Reply #22 on: 21:22, 23 January 18 »
I tried that (as clumsy as it is) but it only seemed to work once per instance of emulator.  So, I played one cart then when i wanted to switch, I tried dragging another and rebooting but it still booted up the previous cartridge again so I had to close down the emulator, reload it, then open explorer again and navigate to game folder if I'd closed it for some reason, and drag another game cart in.  It certainly does play the Plus stuff well when I get a game in there though. :)
Favorite CPC games: SwitchBlade, Stryker in the Crypts of Trogan, Turrican II, UN Squadron, Oh Mummy

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #23 on: 21:28, 23 January 18 »
Thanks for the first official bug of this version !


I'll have to figure out how to fix this (I hope I can reproduce it !), and I guess i'll have to setup next version quick !

Offline Lone

  • Supporter
  • CPC664
  • *
  • Posts: 94
  • Country: fr
  • Liked: 169
  • Likes Given: 74
Re: Sugarbox, a CPC emulator for windows.
« Reply #24 on: 00:01, 16 August 18 »
Hello,


Here's a new release of Sugarbox.
Mostly refactoring of code and bug fix, with a new Configuration selection mode (quicker and simpler)
Also, a BIG fix on tape, allowing most of tape dump to work now.


Note that I moved to github to allow everybody worldwide to download it easily.
I'll add the source code later (when it will work with more than as single OS !)


Complete log & bins here :


https://github.com/Tom1975/Sugarbox/releases/tag/v0.30