Author Topic: GX4000 online-emulation  (Read 6240 times)

0 Members and 1 Guest are viewing this topic.

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
GX4000 online-emulation
« on: 01:44, 20 January 13 »
I'm working on a GX4000 emulator, which already has all 25 known cartridges included.
Complete size is ~2.08mb incl. all games.

You can give it a try here:
Applet HTML Page

- Select a game: Click a button below or click the "Power" button on the monitor.
- Fullscreen: ALT + ENTER toggles. (When turning back from fullscreen to applet mode, the display maybe is moved. Minimize your browser then and bring it back to front)
- Reset: F12
- Define keys for GX4000 gamepad: F10

Emulation is better now, and accurate enough to play all cartridges.
Skeetshot is included but not playable because no lightgun emulation.
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Online TotO

  • 6128 Plus
  • ******
  • Posts: 3.568
  • Country: fr
    • ?area=showdonations;u=4
  • Liked: 2691
  • Likes Given: 1598
Re: GX4000 online-emulation
« Reply #1 on: 12:42, 20 January 13 »
Great first CPC+ online ! :)


On my computer, I get the display redraw problem (java double buffer ?) and the sound play with crash.
But, may be look ok for others?

"You make one mistake in your life and the internet will never let you live it down" (Keith Goodyer)

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 469
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 163
  • Likes Given: 187
Re: GX4000 online-emulation
« Reply #2 on: 14:17, 20 January 13 »
I've went to that webpage. Firefox warns me that there are security problems there.
I don't know what to think about it.

[attachimg=1]
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #3 on: 14:21, 20 January 13 »
Simple: Firefox warns on ALL applets you find in the web.
Activate it or leave it.

[sarkasm]No, I included spyware, which only harms your computer[/sarkasm]

Really, there's nothing special.

When done, I will change it to open source.
« Last Edit: 14:23, 20 January 13 by Devilmarkus »
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 469
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 163
  • Likes Given: 187
Re: GX4000 online-emulation
« Reply #4 on: 14:38, 20 January 13 »
Ok, I'm positive that you're telling us the truth.
But still, it's a frightening welcome for people using your emulator.
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #5 on: 15:52, 20 January 13 »
Yeah I know...
Executioner is also fucked actually.
JEMU - The Java Emulation Platform

The selectors for System/Game don't feed on <body onload...

This happens because the applet is also blocked first.

But, AFAIK, he's already working on a solution. (Javascript timer which watches applet state)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 702
  • Country: gb
  • Liked: 238
  • Likes Given: 363
Re: GX4000 online-emulation
« Reply #6 on: 00:03, 21 January 13 »
I can't get the key redefinition to work - I see the gamepad, and I can click on the keys to redefine and it will ask me to do so, but it doesn't pick up anything I enter.


Any chance of having a default keyboard mapping enabled by default - WASD <space> <enter> maybe?

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #7 on: 01:22, 21 January 13 »
WASD,space,enter is a bad default as the emulator is also designed to emulate the CPC+ later.
Sure, it doesnt show your keyboard input?

What OS are you running?

Edit: Should be solved now. I replaced the applet.
« Last Edit: 01:30, 21 January 13 by Devilmarkus »
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #8 on: 22:24, 21 January 13 »
Now with Trojan Lightgun-emulation:

Applet HTML Page

Press "Scroll lock" to enable/disable lightgun emulation.

(Or press F10 to setup the controller... There you can also enable lightgun) Thanks to TotO who has no Scroll lock key :P

Does not work in fullscreen (yet) !!!!

But in simple and fullsize works fine.

So enjoy playing Skeetshot and The Enforcer ;)
« Last Edit: 23:22, 21 January 13 by Devilmarkus »
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline Sykobee (Briggsy)

  • 6128 Plus
  • ******
  • Posts: 702
  • Country: gb
  • Liked: 238
  • Likes Given: 363
Re: GX4000 online-emulation
« Reply #9 on: 23:37, 21 January 13 »
Working great now!

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #10 on: 23:48, 21 January 13 »
Great!
The problem was the label where I show the controller picture.
It was "focusable" -> removed that.
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

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: GX4000 online-emulation
« Reply #11 on: 07:12, 22 January 13 »
Well done! Great work! The best Emulator online!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #12 on: 12:53, 23 January 13 »
I was almost going mad when coded the lightpen emulation, too.

In the guide for the DK&#39;Tronics Lightpen
DK'Tronics Lightpen is a bug:

bad:
Code: [Select]
10 out &1C00, 17 : L=inp(&1F00) : out &1C00, 16 : H=inp(&1F00)
20 L=H*256+L-12292 : Y=L/40 : X=L-Y*40

correct:
Code: [Select]
10 out &1C00, 17 : L=inp(&1F00) : out &1C00, 16 : H=inp(&1F00)
20 L=H*256+L-12292 : Y=INT(L/40) : X=L-Y*40

Result:
Spoiler: show


Spoiler: show
« Last Edit: 13:01, 23 January 13 by Devilmarkus »
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 2.265
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 1005
  • Likes Given: 2361
Re: GX4000 online-emulation
« Reply #13 on: 13:19, 23 January 13 »
Congratulations!


The silliest bugs are the most difficult to find, glad you managed to solve it!

Offline Bryce

  • The Hardware Guy.
  • Supporter
  • 6128 Plus
  • *
  • Posts: 11.245
  • Country: wf
  • It's not broken, it just hasn't been fixed yet.
    • index.php?action=treasury
  • Liked: 3949
  • Likes Given: 416
Re: GX4000 online-emulation
« Reply #14 on: 15:05, 23 January 13 »
I was almost going mad when coded the lightpen emulation, too.

In the guide for the DK&#39;Tronics Lightpen
DK'Tronics Lightpen is a bug:

bad:
Code: [Select]
10 out &1C00, 17 : L=inp(&1F00) : out &1C00, 16 : H=inp(&1F00)
20 L=H*256+L-12292 : Y=L/40 : X=L-Y*40

correct:
Code: [Select]
10 out &1C00, 17 : L=inp(&1F00) : out &1C00, 16 : H=inp(&1F00)
20 L=H*256+L-12292 : Y=INT(L/40) : X=L-Y*40

Result:

That's more accurate than the real one was :D

Ignoring the fact that you had to turn up the brightness until the screen image was actually being permanently burnt onto the surface of your eyes. The pointer used to jump all over the place, even when you held the pen steady on one spot.

Bryce.

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #15 on: 15:15, 23 January 13 »
I combine both now: Lightpen and lightgun emulation.
Lightgun is active on default.
When you click left mouse button it acts as fire.

When you click right mouse button, Lightpen is pushed to the screen and the cursor moves.
In lightpen mode the left mouse button acts as enter key.

Demo video:
Lightpen emulation for JavaCPC
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 15.368
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 3061
  • Likes Given: 5573
Re: GX4000 online-emulation
« Reply #16 on: 16:09, 23 January 13 »
Quote from: Bryce
That's more accurate than the real one was 

Ignoring the fact that you had to turn up the brightness until the screen image was actually being permanently burnt onto the surface of your eyes. The pointer used to jump all over the place, even when you held the pen steady on one spot.

Bryce.
Yeah... when I got one a few years back I had a hard time deciding whether it was just a crappy product or a faulty unit...

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #17 on: 17:01, 23 January 13 »
Question is now:
Who has a Trojan Lightgun (Old CPC/ CPC+)
I need some informations:

When you pull the trigger, it returns the read value from CRTC (x,y position + memory base)

But what does it return, when you don't pull the trigger?
To test:
Code: [Select]
10 OUT &BC00,16:A=INP(&BF00):OUT &BC00,17:B=INP(&BF00):PRINT A;B
Is anyone here who could do this test?
« Last Edit: 17:10, 23 January 13 by Devilmarkus »
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

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: GX4000 online-emulation
« Reply #18 on: 23:35, 24 January 13 »
I was almost going mad when coded the lightpen emulation, too.

In the guide for the DK&#39;Tronics Lightpen
DK'Tronics Lightpen is a bug:

bad:
Code: [Select]
10 out &1C00, 17 : L=inp(&1F00) : out &1C00, 16 : H=inp(&1F00)
20 L=H*256+L-12292 : Y=L/40 : X=L-Y*40

correct:
Code: [Select]
10 out &1C00, 17 : L=inp(&1F00) : out &1C00, 16 : H=inp(&1F00)
20 L=H*256+L-12292 : Y=INT(L/40) : X=L-Y*40


OMG! Don't use these ports! They collide and just work by accident!
 
Instead of &1C00 use &BC00 !!!
and...
Instead of &1F00 use &BF00 !!!
 
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #19 on: 01:42, 25 January 13 »
I know :)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

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: GX4000 online-emulation
« Reply #20 on: 17:23, 25 January 13 »
Yes, now ;)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #21 on: 18:07, 25 January 13 »
No. From the wiki page:
Dk&#39;tronics Lightpen - CPCWiki
Dk'tronics Lightpen - CPCWiki

Uses I/O ports: #1C00 and #1F00 (as shown in above BASIC example) (and as on page 1-26 and 1-27 of the original manual)
 
  • #1C00 and #1F00 are bad decodings/mirrors of CRTC ports #BC00 and #BF00
  • These ports will clash with other hardware (but do work more or less)
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

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: GX4000 online-emulation
« Reply #22 on: 21:41, 25 January 13 »
Well, if you know that you are using wrong and dangerous I/O ports, why did you use it?? They really shall NOT be used!!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1012
  • Likes Given: 926
Re: GX4000 online-emulation
« Reply #23 on: 22:15, 25 January 13 »
Well, if you know that you are using wrong and dangerous I/O ports, why did you use it?? They really shall NOT be used!!

To test if users like you find this "bug" ;)

Or if they simply ignore that :-D
When you put your ear on a hot stove, you can smell how stupid you are ...

Amstrad CPC games in your webbrowser

JavaCPC Desktop Full Release

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: GX4000 online-emulation
« Reply #24 on: 23:10, 25 January 13 »
Me a user? >:(  Oh MCP help me!!!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus