News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_Devilmarkus

GX4000 online-emulation

Started by Devilmarkus, 00:44, 20 January 13

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Devilmarkus

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

TotO

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)

Phi2x

#2
.

Devilmarkus

#3
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.
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

Phi2x

#4
.

Devilmarkus

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

Sykobee (Briggsy)

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?

Devilmarkus

#7
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.
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

Devilmarkus

#8
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 ;)
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

Sykobee (Briggsy)


Devilmarkus

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

TFM

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

Devilmarkus

#12
I was almost going mad when coded the lightpen emulation, too.

In the guide for the DK'Tronics Lightpen is a bug:

bad:

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:

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: ShowHide


Spoiler: ShowHide
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

robcfg

Congratulations!


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

Bryce

Quote from: Devilmarkus on 11:53, 23 January 13
I was almost going mad when coded the lightpen emulation, too.

In the guide for the DK'Tronics Lightpen is a bug:

bad:

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:

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.

Devilmarkus

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

Gryzor

Quote from: BryceThat'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...

Devilmarkus

#17
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:
10 OUT &BC00,16:A=INP(&BF00):OUT &BC00,17:B=INP(&BF00):PRINT A;B

Is anyone here who could do this test?
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

TFM

Quote from: Devilmarkus on 11:53, 23 January 13
I was almost going mad when coded the lightpen emulation, too.

In the guide for the DK'Tronics Lightpen is a bug:

bad:

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:

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

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

TFM

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

Devilmarkus

No. From the wiki page:
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

TFM

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

Devilmarkus

Quote from: TFM/FS on 20: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!!

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

TFM

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

Powered by SMFPacks Menu Editor Mod