Author Topic: CPCBox, your CPC emulator in Javascript  (Read 102806 times)

0 Members and 1 Guest are viewing this topic.

Offline charlionline

  • CPC464
  • **
  • Posts: 5
  • Liked: 8
  • Likes Given: 0
Re: CPCBox, your CPC emulator in Javascript
« Reply #575 on: 20:23, 15 March 16 »
Great job! Love it



www.sohobarpalma.com


Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 390
  • Likes Given: 60
Re: CPCBox, your CPC emulator in Javascript
« Reply #576 on: 01:23, 17 March 16 »
CPCBox is not open-source.

 CPCBox is JavaScript, doesn't that make it open source by definition?

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #577 on: 11:46, 17 March 16 »
CPCBox is JavaScript, doesn't that make it open source by definition?

Technically speaking yes, the javascript code that is fed to the browser is visible to everyone via the F12 devtools of any browser.

And that explains why there's so much javascript obfuscation tools that currently exist ;) .

Their goal is to protect source code from being stolen, or being tampered with.

It's sad but counting on a simple copyright banner to protect your work will just make crooks laugh at it while they're ripping it.
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline Executioner

  • Supporter
  • 6128 Plus
  • *
  • Posts: 783
  • Country: au
  • WinAPE Developer
    • WinAPE
  • Liked: 390
  • Likes Given: 60
Re: CPCBox, your CPC emulator in Javascript
« Reply #578 on: 14:30, 17 March 16 »
Technically speaking yes, the javascript code that is fed to the browser is visible to everyone via the F12 devtools of any browser.

And that explains why there's so much javascript obfuscation tools that currently exist ;) .

Their goal is to protect source code from being stolen, or being tampered with.

It's sad but counting on a simple copyright banner to protect your work will just make crooks laugh at it while they're ripping it.

 Unfortunately, all you can do is change variable and function names and remove all the whitespace so the code is hard to read, then someone just
reformats it in NetBeans or Eclipse and works out what the functions actually do. Mind you, Java is not much better, there's tools like JAD can rip apart
a Java class file, and a good assembly hacker can rip apart x86 (or Z80) code fairly quickly (this I have done, eg. Frogger and Snapper (6502)).

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #579 on: 14:54, 17 March 16 »
Yes, good obfuscators remove comments, variable names, function names and concatenate all the source code files in one big file.
But pretty printers can't fix any of that afterwards  ;)

What I found is that good obfuscators render my code much harder to understand.

So much in fact that it's certainly easier for crooks to go rip someone else's code instead of mine.

And that's the whole point of it, right?
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline Munchausen

  • 6128 Plus
  • ******
  • Posts: 774
  • Country: gb
  • Liked: 211
  • Likes Given: 215
Re: CPCBox, your CPC emulator in Javascript
« Reply #580 on: 10:37, 03 April 16 »
I was just looking at some code listings on the forum and thought it would be really cool if you could load them automatically in cpcbox to see what the code does (perhaps an extra feature to add to the [   code   ] blocks). If there was an assembler built in this could even work for asm listings. Just an idea anyway...

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #581 on: 14:32, 03 April 16 »
Oh boy, you have no idea what my to-do list for CPCBox looks like... It's freaking huge!
I'm really not asking for suggestions at the moment.
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #582 on: 15:03, 03 April 16 »
It's probably a good time to tell you where I am with this project. ;)
It will be short... Basically, CPCBox is on a hiatus.

Things are moving fast in the browser landscape at this point, so it doesn't make much sense to work on such feeble foundations.
Most importantly, I'm waiting for an important piece of technology called "Web Components".
My plan is to create the UI of CPCBox using this new W3C standard. But this spec is so new that no browser has a valid implementation of it now...
« Last Edit: 15:24, 03 April 16 by phi2x »
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #583 on: 23:05, 06 January 17 »
The author of YAKC emulator made an interesting article about the technicalities of implementing Z80 cycle-accuracy:
https://floooh.github.io/2017/12/10/z80-emu-evolution.html


I also found some crazily detailed information about the Z80 timings here:
http://baltazarstudios.com/zilog-z80-undocumented-behavior/
« Last Edit: 04:59, 12 March 19 by PhilZeVibe »
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline BZHGames

  • CPC464
  • **
  • Posts: 21
  • Country: fr
    • BZHGames
  • Liked: 9
  • Likes Given: 7
Re: CPCBox, your CPC emulator in Javascript
« Reply #584 on: 11:33, 04 July 19 »
Hi,



I integrated CPCBOX on my personal site to play online.
I wanted to congratulate you for this emulator, it's really good work.


I took the time to read all the comments about your emulator. But I did not find any trace on the next version you wanted to make.


I admit that if the future version (if there is one) could take into account the sound it would be really a plus.


Otherwise, I did not find how to load a .dsk file in javascript. I use snapshots, but some games need to access the disk.


Finally, here, I really wanted to congratulate you and I really hope that there will be an upcoming version.


Good job.
Online games : Tetris, Connect4, Marvel Memory, Laby and Amstrad games
https://bzhgames.000webhostapp.com/

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #585 on: 00:14, 05 July 19 »
Hi BZHGames,

I tried different approaches over the years to move the needle forward regarding the next version of CPCbox but I stumbled on design or technical roadblocks each time.
Now I believe I found a good path in terms of design and technology but it's still a long way before I can deliver something.

But really my approach to building the emulator is very different in that I don't want anymore to rush a crappy MVP and then build lots of successive improvements like I did in the past.
As I now know quite well what I'm trying to build, I'm going in the opposite direction and create solid foundations first and then build it all the proper and clean way.
It's important for me as I work on this project not only to just create an emulator but also to learn the best practises of web app development that exist today.

Best!
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #586 on: 00:31, 05 July 19 »
Also the cpcbox.com domain name will expire in a few days from now and I won't renew it.

The emulator will now be found in www.retrovm.com

The reason is that my goal in the future is that my emulator will also be able to emulate some other computers than just the CPC.
So it won't make sense to still keep the CPCbox name.
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline norecess

  • CPC664
  • ***
  • Posts: 70
  • Country: ca
  • Liked: 142
  • Likes Given: 60
Re: CPCBox, your CPC emulator in Javascript
« Reply #587 on: 20:15, 10 July 19 »
The emulator will now be found in www.retrovm.com
Hmm. I personally think the domain name is not appropriate, because of this another Amstrad CPC emulator: http://www.retrovirtualmachine.org/en/

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #588 on: 21:04, 10 July 19 »
Hmm. I personally think the domain name is not appropriate, because of this another Amstrad CPC emulator: http://www.retrovirtualmachine.org/en/
I personally think the opposite. :-*
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline AMSDOS

  • Supporter
  • 6128 Plus
  • *
  • Posts: 3.662
  • Country: au
    • index.php?action=treasury
    • Programs for Turbo Pascal 3
  • Liked: 921
  • Likes Given: 1602
Re: CPCBox, your CPC emulator in Javascript
« Reply #589 on: 08:54, 11 July 19 »
Was wondering if you were going to consider a BBC Micro machine as part of the other Computers?
* Using the old Amstrad Languages :D   * with the Firmware :P
* I also like to problem solve code in BASIC :)   * And type-in Type-Ins! :D

Home Computing Weekly Programs
Popular Computing Weekly Programs
Your Computer Programs
Updated Other Program Links on Profile Page (Update April 16/15 phew!)
Programs for Turbo Pascal 3

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #590 on: 15:33, 11 July 19 »
Was wondering if you were going to consider a BBC Micro machine as part of the other Computers?
The BBC Micro was sold mostly in the UK afaik.

I am more interested in computers that were internationally popular really.
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.373
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2574
  • Likes Given: 1506
Re: CPCBox, your CPC emulator in Javascript
« Reply #591 on: 07:02, 18 July 19 »
Also the cpcbox.com domain name will expire in a few days from now and I won't renew it.
You have renew it. Do you think the opposite too?  ::)
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 465
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 160
  • Likes Given: 182
Re: CPCBox, your CPC emulator in Javascript
« Reply #592 on: 09:42, 18 July 19 »
You have renew it. Do you think the opposite too?  ::)
What are you talking about?
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline TotO

  • 6128 Plus
  • ******
  • Posts: 3.373
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2574
  • Likes Given: 1506
Re: CPCBox, your CPC emulator in Javascript
« Reply #593 on: 15:29, 18 July 19 »
Well. Probably your registrad had renew it for you during one year if you change your minds.
« Last Edit: 15:34, 18 July 19 by TotO »
"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.034
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2979
  • Likes Given: 5177
Re: CPCBox, your CPC emulator in Javascript
« Reply #594 on: 11:54, 19 July 19 »
Very often there's a couple of weeks' worth of grace period.