[CPCBox] 1st CPC emulator in Javascript
phi2x - 24 March 2012 - 21:09:57
|
131 posts |
|---|---|
| I began a wild quest, searching CPC6128 machines with different CRTC chips, to be able to emulate those chips in CPCBox in the future. And today, I want to address a big thank to the french retrogaming association MO5.com. They've kindly accepted to help me in my quest, by exchanging one of their CPC 6128 (type 2) with one of mine (type 1). I especially want to thank Philippe (president of MO5.com) and Sébastien for their efforts in finding an appropriate CPC in their huge pile of retro wonders. |
|
phi2x - 25 March 2012 - 09:47:56
|
131 posts |
|---|---|
| CPCBox 20120325 changelog: - Made a few bugfixes to the FDC emulation. Fixed R-Type 128K :) |
|
TotO - 25 March 2012 - 10:12:18
|
127 posts |
|---|---|
| :) | |
phi2x - 27 March 2012 - 22:15:47
|
131 posts |
|---|---|
| It's time to kick ass and chew bubble gum... and I'm all out of gum! :) CPCBox 20120327 changelog: - Added a settings panel - Implemented monochrome monitor rendering - Implemented floppy drive B support - Implemented 512KB RAM extension |
|
phi2x - 31 March 2012 - 23:10:41
|
131 posts |
|---|---|
| CPCBox 20120331 changelog: - Added support for type 0 & type 2 CRTC chips. Choice is offered in the settings panel. It's preliminary stuff, so don't expect too much from it yet! |
|
phi2x - 09 April 2012 - 23:40:17
|
131 posts |
|---|---|
| CPCBox 20120409 changelog: - Fixed an IRQ misfiring bug. It had its roots in how the vsync signal is generated by the CRTC chip (all CRTCs impacted). That fixed the demo "Wake up!". - Refined CRTC0 and CRTC2 implementation. |
|
phi2x - 05 June 2012 - 23:41:26
|
131 posts |
|---|---|
| I just released an update to CPCBox. Until recently, the only way to manipulate a pixel in the canvas was by accessing its rgb subcomponents one by one. Thanks to recent changes of the Canvas API, we now have direct access to canvas pixels. So, I modified the CPCBox renderer to take advantage of this new feature. The net result is some non negligible speed improvements. The downside is that it levels up the browser requirements for CPCBox. But, it's ok with Chrome 20+, Opera 12+ and Firefox 9+. CPCBox 20120605 changelog: - Reworked the canvas renderer to use direct 32-bit access, as allowed by the new HTML5 Canvas API specification. - Fixed a nasty memory leak that was caused by a bug in Mozilla's Audio Data API. - Some internal code refactoring, shuffling things around. |
|
krusty - 06 June 2012 - 09:16:31
|
327 posts |
|---|---|
| In my webbrowser, Firefox 16.0a1 (2012-06-05) on Linux, I cannot use cpcbox, because the emulator does not intercept the key events. So maybe cpcbox will break with the next firefox versions |
|
phi2x - 06 June 2012 - 10:55:16
|
131 posts |
|---|---|
| I tried to reproduce the problem. I used an Ubuntu 12.04 VM with Firefox 11. CPCBox handles key events properly somehow. But I noticed that some keycodes are different, and so CPCBox doesn't recognize some keys. That's also a problem I saw with the Opera browser on Windows. The problem is that there is no real W3C standard for keycodes. So each browser is somehow incompatible with others. It's a real PITA :( And it's an untractable problem to me as it also depends on your keyboard type, azerty keyboards have slight keycode compatibility problems than qwerty keyboards with some browsers too :/ |
|
phi2x - 06 June 2012 - 16:20:40
|
131 posts |
|---|---|
| I searched a bit more about this issue on the web and I think I have a clear explanation now. Mozilla is currently reworking the way Firefox handle keyboard events. Look this entry: https://bugzilla.mozilla.org/show_bug.cgi?id=680830 So it appears there will be new methods to scan the keyboard, starting with Firefox 16. That's probably why keyboard events are broken in the current Firefox nightly build. But that's great news! As I said, the current way of dealing with keyboard events is a broken mess. I hope they will clean all that stuff. |
|
phi2x - 10 June 2012 - 13:53:01
|
131 posts |
|---|---|
| CPCBox 20120610 changelog: - Canvas maximizing/minimizing animations now use CSS3 Transitions instead of JavaScript. - Fixed the algorithm that handles CRTC vertical adjust lines. - Fixed a timing issue dealing with CRTC R9 changes. |
|
phi2x - 19 June 2012 - 17:42:59
|
131 posts |
|---|---|
| I've been looking to the different tape file formats and I've been struck by the whole mess we're in now. Here is a quick tour of the different file formats being used by the CPC community: - WAV: Lossless audio file format. Strictly speaking it's a container, but usually it contains PCM audio data. Simple, no-nonsense file format that can interact with audio software on PC. Useful to have. - VOC: Other lossless audio file format. Seems obsolete and redundant with WAV. - MP3: Lossy compressed audio file format. Very useful for MP3 players to use on real CPCs. Needs a specific library to be used by emulators. - CSW: Pulse (Tape) file format. No-nonsense, simple compressed file format. Files are much bigger than CDT but much less than WAV. Is it really useful? - TAP: Old tape file format. Can't handle tape protections. Replaced by the TZX file format. Obsolete. - CDT/TZX: The official tape file format on CPC. Was designed with ZX in mind and it shows. The file format is much too complex and cumbersome for nothing. Also, a new file format named PZX appeared in 2007 on the ZX community to replace the TZX file format. Its popularity is rising. A much cleaner file format than TZX. But it hasn't been caught by the CPC community yet. |
|
PulkoMandy - 19 June 2012 - 18:11:27
|
633 posts |
|---|---|
| I vote for PZX. It's possible to convert existing CDT/TZX files to this format, and it is much simpler and much less work for the emulator. It is also closer to the hardware. In my CrO2 (usb to tape adapter) project, I will use this format, it is the only one that allows cross platform operation in a way that makes sense :) |
|
phi2x - 19 June 2012 - 21:13:54
|
131 posts |
|---|---|
| Yep, the PZX format needs some support from the CPC community. I hope we'll see CPC emulators implementing it... Reloaded? ACE? ;) We really have no excuse. The format is clearly more robust and clean, the ZX community is behind it, and tape conversion tools are available. |
|
OffseT - 19 June 2012 - 22:34:36
|
83 posts |
|---|---|
| Why not, but tape support is not in top priority for ACE atm. | |
PulkoMandy - 20 June 2012 - 19:06:04
|
633 posts |
|---|---|
| Not sure when I'll touch reloaded again. I wait for OffseT to send me the source of ACE so I can do a port to Haiku and get something clean to work on. Does it work in MESS ? |
|
phi2x - 20 June 2012 - 20:01:12
|
131 posts |
|---|---|
| I've not checked it, but my guess is probably not. It would be nice if some C genius added support for PZX in MESS though! | |
phi2x - 01 July 2012 - 01:23:43
|
131 posts |
|---|---|
| I just reworked the CPC color palette in CPCBox. That stuff puzzled me for a while. But I found the complete infos I needed in the Grimware ;) So, I bolted on that green half-intensity signal boost, fixing the CPC palette. CPCBox 20120630 - changelog: - Improved the color palette, to be closer to the real CPC. - Reworked the UI. |
|
phi2x - 05 August 2012 - 03:27:53
|
131 posts |
|---|---|
| I've modified CPCBox to make use of the HTML5 Fullscreen API. As this API is quite new, it only works ok on Firefox 15+ and Chrome 20+. Give it a try, you'll enjoy it ;) |
|
TotO - 05 August 2012 - 09:53:24
|
127 posts |
|---|---|
| I though that the CPC goes in full screen, not windowed on a full screen. :p But sure it's nice. |
|
phi2x - 08 August 2012 - 02:28:37
|
131 posts |
|---|---|
| Did you ever wonder why CPCBox runs so slowly on Chrome? Yeah, me too... Look what I found: http://cpcbox.com/bench.htm :/ |
|
Optimus - 09 August 2012 - 12:29:43
|
334 posts |
|---|---|
| Wow, it finally runs 50fps here on Firefox with sound. I remember in the past I was a bit better on Chrome but still not 50fps and without sound. Things have improved since then. |
|
phi2x - 09 August 2012 - 20:41:13
|
131 posts |
|---|---|
| :) | |
phi2x - 01 September 2012 - 14:50:11
|
131 posts |
|---|---|
| CPCBox 20120901 changelog: - Improved PC keyboard handling -> that fixed keyboard problems due to keycode changes in Firefox15+ - Added CPC firmware selector. You can select between the English, French and Spanish flavors. The CPC6128 Danish firmware dump is still MIA... :/ |
|
phi2x - 10 November 2012 - 01:32:53
|
131 posts |
|---|---|
| I've rolled out a new release of CPCBox. Check it out! Here's what's new (v20121110): - Implemented a VDU timeout to trigger VBLank. (the Matrix effect in ClimaxG renders corrrectly now). - Improved VDU HSync display adjust (Fixed a broken part in Divine Megademo). - Fixed Z80 DD/FD prefix fetching behaviour with undocumented instructions (Fixed the Interrupt Wait test in PlusTest). - Implemented CRTC Type2 weird behaviour when R2+R3 > R0 (No VSync signal output and the border output signal stays on). |
|
phi2x - 11 November 2012 - 01:39:20
|
131 posts |
|---|---|
| I told you a while back that I was considering implementing various tape formats on CPCBox, namely WAV, CDT/TZX and PZX. Well, I changed my mind :D Finally, I set my mind on only implementing WAV support. I'll try to sum up the various considerations that came into it: - It's way easier for me to support only one file format. That also means more robust emulator code. - It's trivial to attain 100% emu compatibility with tape loaders by using WAV. - It's much easier to implement write capability to WAV files than with the other tape formats. - WAV files can be digested by a real CPC, simply by plugging in an "MP3" player or other cheapo hardware. No hardware exists that can feed a CPC a CDT file directly. - It's truer to the original experience. Feeding soundwaves to a CPC464 is the way it was supposed to be. - I don't really care about features like turbo tape loading or blockjump feature implemented on other CPC emulators. That stuff doesn't exist on real hardware anyway. And emulation is about recreating the original experience I think. - Tapes were a pain to use on real CPCs too... If you want comfort, use floppy disks! - At least 99.5% of CPC software distributed on cassettes were also distributed on floppies. So, no matter what, users still have a choice. - With WAV files, judging if a cassette dump is corrupted or not is very simple. You simply have to feed it to a real CPC and see if it can read it or not. - Data storage goes cheaper and cheaper. But our time is more and more precious. I don't think it's worth the hassle now to juggle between different tape formats and use transcoding tools whether you want to run a cassette dump on a real CPC or using it in an emulator. |
|
PulkoMandy - 11 November 2012 - 08:40:04
|
633 posts |
|---|---|
| Good ! Now remove the DSK support and go for HFE ! :) |
|
phi2x - 12 November 2012 - 02:28:00
|
131 posts |
|---|---|
| Ha! Now that I think about it, the DSK format is probably the main reason why my FDC emulation is still in such a sad state. It's hard to build on that flaky format :/ | |
phi2x - 12 November 2012 - 02:37:01
|
131 posts |
|---|---|
| Here it is. I've finally implemented tape support into CPCBox! As I said, only WAV files are supported. To be specific, CPCBox only accepts WAV files that are PCM 8-bit mono. And it accepts any sample rate between 8KHz and 125KHz. But it's probably best to stick to 44.1KHz as its the best choice for mp3 players in case you want to use these tape files with a real CPC too. To use this new feature, go to the settings panel and check the "Tape deck" option. ;) |
|
TFM - 14 November 2012 - 19:14:02
|
146 posts |
|---|---|
| Expansion ROMs? |
|
Online: nobody
Matthew Cannon
Batman The Movie - Level 2
Batman The Movie - Level 2





