Author Topic: .  (Read 149048 times)

0 Members and 1 Guest are viewing this topic.

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.181
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #450 on: 15:26, 25 September 12 »
I agree it would be cool to have touchscreen controls, but it's not high priority for me now.
 



Nah, not really. Even games specifically designed for touch controls can't pull it off most of the times...
like
0
No reactions

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #451 on: 21:49, 25 September 12 »
.
« Last Edit: 17:22, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.181
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #452 on: 11:36, 03 October 12 »
Indeed. The only games I've found that I really enjoy and play again and again are either very simple ones, control-wise (like Canabalt) (or, even better, I must run!), or needing just simple clicks like defense titles (Anomaly Warzone Earth FTW!). All the other control styles - I've played some games that would have been fantastic on a pc with physical input devices, but dropped them within minutes on my mobile.
like
0
No reactions

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #453 on: 02:43, 10 November 12 »
.
« Last Edit: 17:22, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #454 on: 13:22, 10 November 12 »
Since you swapped the initial display size to the largest possible on the page, its very slow now.
(~30fps)
I am using Firefox 16.0.2
like
0
No reactions
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: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #455 on: 13:49, 10 November 12 »
.
« Last Edit: 17:22, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #456 on: 15:28, 10 November 12 »
I always have the latest display drivers installed.

I use an ATI Radeon HD 5570. Would be crazy when it would be blacklisted...
like
0
No reactions
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 Prodatron

  • 6128 Plus
  • ******
  • Posts: 880
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #457 on: 15:47, 10 November 12 »
Btw, the actual CPCBOX Version runs fine on my Android Smartphone (Samsung Note II) in Firefox with about 12fps  :) Thats not bad for a mobile I guess. It doesnt run with Chrome or the standard browser because of a missing Html5 Api.
I just have to fins out how to activate the touchscreenkeyboard...

CU,
Prodatron
like
0
No reactions

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #458 on: 17:41, 10 November 12 »
.
« Last Edit: 17:22, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #459 on: 18:28, 10 November 12 »
.
« Last Edit: 17:23, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #460 on: 02:49, 11 November 12 »
.
« Last Edit: 17:23, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #461 on: 16:34, 11 November 12 »
How stupid: My gfx driver was 1 rev. older than the actual... (I had rev. 12.9 and actual is 12.10)
And it had been blacklisted...
What a lousy crap :-D
like
0
No reactions
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: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #462 on: 03:33, 12 November 12 »
.
« Last Edit: 17:23, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 17.181
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #463 on: 11:26, 12 November 12 »
Nice, we <3 tapes. Does it also play the sound?
like
0
No reactions

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #464 on: 14:42, 12 November 12 »
Got trouble with the keyboard.
It's AZERTY now?!?

Only when I change my kb-translation to FR it works ok...
like
0
No reactions
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: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #465 on: 00:47, 13 November 12 »
.
« Last Edit: 17:23, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #466 on: 01:04, 13 November 12 »
.
« Last Edit: 17:23, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #467 on: 01:48, 13 November 12 »
In JavaCPC (Java is also weird with keycodes etc...) I coded a KeyTranslator class, which changes the required KeyEvents:

Code: [Select]
/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */
package jemu.ui;

import java.awt.event.KeyEvent;

/**
 *
 * @author Markus
 */
public class KeyTranslator {

    protected boolean DEBUG = false;

    public KeyEvent translate(KeyEvent g, String localkeys) {
        KeyEvent e = g;
        // Special CPC keys
        if (e.getKeyLocation() != 1) {
            // small enter key
            if (e.getKeyCode() == KeyEvent.VK_ENTER) {
                e.setKeyCode(KeyEvent.VK_END);
            }
            // F-Key mapping (When joystick is off)
            if (Switches.joystick != 1) {
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD0) {
                    e.setKeyCode(KeyEvent.VK_F12);
                }
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD1) {
                    e.setKeyCode(KeyEvent.VK_F1);
                }
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD2) {
                    e.setKeyCode(KeyEvent.VK_F2);
                }
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD3) {
                    e.setKeyCode(KeyEvent.VK_F3);
                }
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD4) {
                    e.setKeyCode(KeyEvent.VK_F4);
                }
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD5) {
                    e.setKeyCode(KeyEvent.VK_F5);
                }
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD6) {
                    e.setKeyCode(KeyEvent.VK_F6);
                }
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD7) {
                    e.setKeyCode(KeyEvent.VK_F7);
                }
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD8) {
                    e.setKeyCode(KeyEvent.VK_F8);
                }
                if (e.getKeyCode() == KeyEvent.VK_NUMPAD9) {
                    e.setKeyCode(KeyEvent.VK_F9);
                }
            }
        }

        // german keyboard mapping
        if (localkeys.equals("DE_DE")) {
            if (DEBUG) {
                System.out.println("DE: " + e.getKeyChar());
            }
            if (e.getKeyChar() == '\u00FC' || e.getKeyChar() == '\u00DC') {
                e.setKeyCode(KeyEvent.VK_OPEN_BRACKET);
                return e;
            }
            if (e.getKeyChar() == '\u00E4' || e.getKeyChar() == '\u00C4') {
                e.setKeyCode(KeyEvent.VK_QUOTE);
                return e;
            }
            if (e.getKeyChar() == '\u00F6' || e.getKeyChar() == '\u00D6') {
                e.setKeyCode(KeyEvent.VK_SEMICOLON);
                return e;
            }
            if (e.getKeyChar() == '\u00DF' || e.getKeyChar() == '\u003F') {
                e.setKeyCode(KeyEvent.VK_MINUS);
                return e;
            }
            if (e.getKeyCode() == 0x2d) // - key to /
            {
                e.setKeyCode(KeyEvent.VK_SLASH);
                return e;
            }

            if (e.getKeyCode() == 0x81) // ß key to ^
            {
                e.setKeyCode(KeyEvent.VK_EQUALS);
                return e;
            }
            if (e.getKeyCode() == 0x99) // <> key to [
            {
                e.setKeyCode(KeyEvent.VK_ALT_GRAPH);
                return e;
            }
            if (e.getKeyCode() == 0x82) // ^ key to TAB
            {
                e.setKeyCode(KeyEvent.VK_TAB);
                return e;
            }
            if (e.getKeyCode() == 0x208) // # key to \
            {
                e.setKeyCode(KeyEvent.VK_BACK_SLASH);
                return e;
            }
            if (e.getKeyCode() == 0x209) // + key to ]
            {
                e.setKeyCode(KeyEvent.VK_CLOSE_BRACKET);
                return e;
            }

            if (e.getKeyCode() == KeyEvent.VK_Z) // change Z to Y
            {
                e.setKeyCode(KeyEvent.VK_Y);
                return e;
            }
            if (e.getKeyCode() == KeyEvent.VK_Y) // and Y to Z
            {
                e.setKeyCode(KeyEvent.VK_Z);
                return e;
            }
        }
        // german mapping end

        // spanish keyboard mapping
        if (localkeys.equals("ES_ES")) {
            if (DEBUG) {
                System.out.println("ES: " + e.getKeyChar());
            }
            if (e.getKeyChar() == '\u00BA' || e.getKeyChar() == '\u00B2') {
                e.setKeyCode(KeyEvent.VK_TAB);
                return e;
            }
            if (e.getKeyChar() == '\u00E7' || e.getKeyChar() == '\u00C7') {
                e.setKeyCode(KeyEvent.VK_BACK_SLASH);
                return e;
            }

            if (e.getKeyChar() == '\u00D1' || e.getKeyChar() == '\u00F1') {
                e.setKeyCode(KeyEvent.VK_SEMICOLON);
                return e;
            }
            if (e.getKeyCode() == 0xde) {
                e.setKeyCode(KeyEvent.VK_MINUS);
                return e;
            }
            if (e.getKeyCode() == 0x2d) // - key to /
            {
                e.setKeyCode(KeyEvent.VK_SLASH);
                return e;
            }
            if (e.getKeyCode() == 0x81) {
                e.setKeyCode(KeyEvent.VK_QUOTE);
                return e;
            }
            if (e.getKeyCode() == 0x209) // + key to ]
            {
                e.setKeyCode(KeyEvent.VK_CLOSE_BRACKET);
                return e;
            }

            if (e.getKeyCode() == 0x206) {
                e.setKeyCode(KeyEvent.VK_EQUALS);
                return e;
            }
            if (e.getKeyCode() == 0x99) {
                e.setKeyCode(KeyEvent.VK_ALT_GRAPH);
                return e;
            }
            if (e.getKeyCode() == 0x80) {
                e.setKeyCode(KeyEvent.VK_OPEN_BRACKET);
                return e;
            }
        }
        // spanish mapping end

        // french keyboard mapping
        if (localkeys.equals("FR_FR")) {
            if (DEBUG) {
                System.out.println("FR: " + e.getKeyChar());
            }
            // ,;:=
            if (e.getKeyCode() == 515) {
                e.setKeyCode(KeyEvent.VK_CLOSE_BRACKET);
                return e;
            } else if (e.getKeyCode() == 130) {
                e.setKeyCode(KeyEvent.VK_OPEN_BRACKET);
                return e;
            } else if (e.getKeyCode() == 57) {
                e.setKeyCode(KeyEvent.VK_9);
                return e;
            } else if (e.getKeyCode() == 522) {
                e.setKeyCode(KeyEvent.VK_MINUS);
                return e;
            } else if (e.getKeyCode() == KeyEvent.VK_Q) {
                e.setKeyCode(KeyEvent.VK_A);
                return e;
            } else if (e.getKeyCode() == KeyEvent.VK_A) {
                e.setKeyCode(KeyEvent.VK_Q);
                return e;
            } else if (e.getKeyCode() == KeyEvent.VK_Z) {
                e.setKeyCode(KeyEvent.VK_W);
                return e;
            } else if (e.getKeyCode() == KeyEvent.VK_W) {
                e.setKeyCode(KeyEvent.VK_Z);
                return e;
            } else if (e.getKeyChar() == '\u00B2' || (e.getKeyCode() == 0 && (int) e.getKeyChar() == 65535)) {
                e.setKeyCode(KeyEvent.VK_BACK_SLASH);
                return e;
            } else if (e.getKeyChar() == '\u0025' || e.getKeyChar() == '\u00F9') {
                e.setKeyCode(KeyEvent.VK_QUOTE);
                return e;
            } else if (e.getKeyCode() == 151) {
                e.setKeyCode(KeyEvent.VK_ALT_GRAPH);
                return e;
            } else if (e.getKeyCode() == 77) {
                e.setKeyCode(59);
                return e;
            } else if (e.getKeyCode() == 44) {
                e.setKeyCode(77);
                return e;
            } else if (e.getKeyCode() == 59) {
                e.setKeyCode(44);
                return e;
            } else if (e.getKeyCode() == 517) {
                e.setKeyCode(KeyEvent.VK_SLASH);
                return e;
            } else if (e.getKeyCode() == 513) {
                e.setKeyCode(KeyEvent.VK_PERIOD);
                return e;
            }
        }
        // french mapping end
        return e;
    }
}

I call it every key press and key release.
E.g.:
Code: [Select]
public void KeyPressed(KeyEvent e){
    translator.translate(e, localkeys);
    computer.handleKeyEvent(e);
}

Works fine ;)
« Last Edit: 01:55, 13 November 12 by Devilmarkus »
like
0
No reactions
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: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #468 on: 02:10, 13 November 12 »
.
« Last Edit: 17:23, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #469 on: 02:11, 13 November 12 »
Hmmm sad... I hoped my code was helpful :(
like
0
No reactions
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: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #470 on: 02:31, 13 November 12 »
.
« Last Edit: 17:23, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline PhilZeVibe

  • 464 Plus
  • *****
  • Posts: 471
  • Country: 00
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #471 on: 20:53, 07 December 12 »
.
« Last Edit: 17:23, 30 June 21 by PhilZeVibe »
like
0
No reactions

Offline SyX

  • 6128 Plus
  • ******
  • Posts: 1.137
  • Country: br
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #472 on: 23:23, 07 December 12 »
It's amazing how far your project has come phi2x. Congratulations!!! :)

The first versions were practically unusable in my computer, now i get a solid 50fps (although in full-screen mode only 30 fps :P) and of course, the most accurate cpc emulator (great Z80, pixel perfect rasters, ... :) ), so accurate that these days CPCBox is my last test, before checking in the real machine.

I think that you will be interested in the new ZEXALL test (faster and with tests for the recently discovered CCF/SCF flags) that Patrik Rak is working, you can see more info in this thread.

like
0
No reactions

Offline Prodatron

  • 6128 Plus
  • ******
  • Posts: 880
  • Country: de
  • Back on the Z80
    • index.php?action=treasury
    • SymbOS SYmbiosis Multitasking Based Operating System
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #473 on: 23:27, 07 December 12 »
[attachimg=1]

Looking forward to it!  :P
like
0
No reactions

GRAPHICAL Z80 MULTITASKING OPERATING SYSTEM

Offline db6128

  • 464 Plus
  • *****
  • Posts: 316
  • Country: gb
  • We don’t speak 8080 in this house.
    • Awards
Re: CPCBox, your CPC emulator in Javascript
« Reply #474 on: 02:51, 08 December 12 »
I think that you will be interested in the new ZEXALL test (faster and with tests for the recently discovered CCF/SCF flags) that Patrik Rak is working, you can see more info in this thread.
Jeez... The Z80 is a great little device, but things like that just seem unnecessarily complex and obscure. ;) But I'm definitely glad there are people who care that much about accuracy.
 
Quote from: Patrik Rak
Well, if we are lucky, it will behave in such a way that single bit is enough to represent this state. OTOH, when you consider how F register works, it would make sense if there was some place to assemble new F, and then just store it to F. The way how F is paired with A for PUSH/POP AF and EX AF,AF' furthermore makes F seem like an ordinary register, so having another place for flag assembly makes sense.
I really wish F was an ordinary register. Can you tell I'm kinda running out of spares at the moment? :D
like
0
No reactions
[The owner of one of the few existing cartridges of Chase HQ 2] mentioned to me that unless someone could find a way to guarantee the code wouldn't be duplicated to anyone else, he wouldn't be interested.
Did he also say things like "My treasureeeeee" and is he a little grey guy?