Author Topic: Fullscreen mode added  (Read 3195 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: 1018
  • Likes Given: 926
Fullscreen mode added
« on: 16:44, 03 November 09 »
Hi together,
I added a fullscreen mode for WebCPC!
It's very simple, and not proportional.
So maybe it looks worse on 16/9 displays or other configs.

You can simply enter it by using your mouse.

You can also use ALT & ENTER to toggle it.

The icon disappears after a few seconds and will appear again, when you move your mouse to the upper left corner of the emu display.

Example:
[cpc=http://cpcwiki.eu/forum/index.php?action=dlattach;topic=408.0;attach=207,none,1]CPC6128[/cpc]
« Last Edit: 16:24, 21 March 10 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

Online Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.995
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 4081
  • Likes Given: 7366
Re: Fullscreen mode added
« Reply #1 on: 17:36, 03 November 09 »
Ever progressing...
The implementation with the button is sweet, though, maybe, in windowed mode it should be a button along with the others, at the bottom instead. But I was surprised by the transition speed.

I have a 16:9 monitor and indeed it looks a bit squashed. Since 4:3 monitors are a thing of the past mostly, I think this is something that should probably be fixed. Is it difficult to just add vertical bands at either side?

Also, it runs quite slow - especially with the Filter on. I guess it's not *real* full screen, because my taskbar (win7 x64) is still there...


Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1018
  • Likes Given: 926
Re: Fullscreen mode added
« Reply #2 on: 17:41, 03 November 09 »
Also, it runs quite slow - especially with the Filter on. I guess it's not *real* full screen, because my taskbar (win7 x64) is still there...

Without filter it would look like crap!

The taskbar cannot disappear when the emulator is launched as applet (JAVA restrictions)
When I launch it locally as executable, the taskbar disappears.
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 Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.995
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 4081
  • Likes Given: 7366
Re: Fullscreen mode added
« Reply #3 on: 17:44, 03 November 09 »
Yeah, I suspected something of the sort. At what speed does it run on your system?

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.035
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1018
  • Likes Given: 926
Re: Fullscreen mode added
« Reply #4 on: 20:22, 03 November 09 »
Yeah, I suspected something of the sort. At what speed does it run on your system?

I've got Intel P-IV, 3 ghz dual-core, w/ 2GB DDR² ram and a nVidia Geforce 6800GT w/ 256mb DDR² ram.
OS: Win XP Pro, SP-II

JavaCPC and also WebCPC is always running @ 50fp/s in all resolutions / with all filters & effects enabled.


Don't forget:
JavaCPC/WebCPC/JEMU need a good soundcard/driver to have the best speed.
Timing is influenced much by soundcard.
That's also a reason why we are still fighting with JavaCPC for Linux.
The Linux-JAVA distribution has poor sound APIs.

Info for coders, who use JEMU:

A simple code in Display.java will show you the fp/s in display:

add:
Code: [Select]

  int mCurrFPS;
  long mLastFPSTime;
  int mNextFPS;

  .... / code /....

  public void doTouchFPS() {
      long time = System.currentTimeMillis();
      mNextFPS++;
      if (time-mLastFPSTime >= 1000) {
          mCurrFPS = mNextFPS;
          mNextFPS = 0;
          mLastFPSTime = time;
      }
  }

  .... / code /....

  protected void paintImage(Graphics g) {

     ..../ code for paintImage /....

     doTouchFPS();
     String fps = "FPS: " + mCurrFPS;
     g.setColor(Color.RED);
     g.drawString(fps, 69, 61);
  }

This will show the framerate on JEMU for example.
« Last Edit: 20:32, 03 November 09 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

Online Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 16.995
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 4081
  • Likes Given: 7366
Re: Fullscreen mode added
« Reply #5 on: 18:19, 08 November 09 »
You've got me all geared up to buy a sound card, damn you :D