Author Topic: 'CPCInAJar' emulator in exact 128k!  (Read 39152 times)

0 Members and 1 Guest are viewing this topic.

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
'CPCInAJar' emulator in exact 128k!
« on: 16:56, 12 January 11 »
Hello guys,
my "CPCInABox" emulator is ready.



You'll find it here:
<Deleted>

(Amstrad CPC 6128 emulator in exact 128k!)

Don't change it with "CPCBox" ;)

Features:
- CRTC 0 / 1 emulation
- Accurate AY emulation
- Digiblaster and Amdrum emulation
- Autotype
- CDT/CSW Tape image supported (Read only!)
- DSK Disk image supported (Read only!)
- Can load SNA snapshots
- 2 Display-sizes (Doubleclick into Display to change size)

(Read more in README.TXT)
« Last Edit: 14:15, 18 March 11 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 phi2x

  • 464 Plus
  • *****
  • Posts: 458
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 151
Re: <CPCInAJar> emulator in exact 128k!
« Reply #1 on: 17:30, 12 January 11 »
 :-\
That name looks like a blatant ripoff of some well known Amstrad CPC emulator... but nevermind.
As the saying goes, imitation is the fondest form of flattery. 8)
« Last Edit: 14:15, 18 March 11 by Devilmarkus »
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.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: <CPCInAJar> emulator in exact 128k!
« Reply #2 on: 18:36, 12 January 11 »
:-\
That name looks like a blatant ripoff of some well known Amstrad CPC emulator... but nevermind.
As the saying goes, imitation is the fondest form of flattery. 8)


Hmmm really this was not my wish.
I already had the name in mind in 2008, where I begun partwise to code it...
« Last Edit: 14:16, 18 March 11 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 phi2x

  • 464 Plus
  • *****
  • Posts: 458
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 151
Re: <CPCInAJar> emulator in exact 128k!
« Reply #3 on: 18:51, 12 January 11 »
I'm just worried about potential confusions arising. But ok, I understand.
« Last Edit: 14:16, 18 March 11 by Devilmarkus »
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.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: <CPCInAJar> emulator in exact 128k!
« Reply #4 on: 19:05, 12 January 11 »
Pouet.net removed it :(
Argument: They dont accept emulators as prod... :(

But what is this?
http://pouet.net/prod.php?which=24547

Ahhhh a C64 "Breadolator" sure, that's something quite different!!! :(
« Last Edit: 14:16, 18 March 11 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 Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.387
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2593
Re: <CPCInAJar> emulator in exact 128k!
« Reply #5 on: 19:21, 12 January 11 »
Cuuuuute!!! Add scanlines please! Just loaded AE2010, pretty sweet :)
« Last Edit: 14:16, 18 March 11 by Devilmarkus »

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: <CPCInABox> emulator in exact 128k!
« Reply #6 on: 19:22, 12 January 11 »
Cuuuuute!!! Add scanlines please! Just loaded AE2010, pretty sweet :)

No scanlines, no nothing!
If I change something it has more/less than 128k!
And I want it exactly:
128 KB (131.072 Bytes)
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: 14.387
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2593
Re: 'CPCInABox' emulator in exact 128k!
« Reply #7 on: 19:31, 12 January 11 »
Make it in under 128kb and fill it with zeros :D

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInABox' emulator in exact 128k!
« Reply #8 on: 19:36, 12 January 11 »
Make it in under 128kb and fill it with zeros :D

No zeros!
I don't cheat ;)
(Ok I cheated, the jar is a bit compressed :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 Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInABox' emulator in exact 128k!
« Reply #9 on: 21:08, 12 January 11 »
Well...
10011111101111010111110101000010100101011  :police:

I removed a bug and so I also added scanlines (for Gryzor)

Was hard work to get 128k again! I swear!

Please download it HERE

readme:
Code: [Select]
CPCInABox by Markus Hohmann
Contact: webmaster@cpc-live.com

F1 - This info
F2 - Load medium*
F4 - Store temporary Snapshot
F5 - Load temporary Snapshot
F7 - Toggle Scanlines (When large)
F8 - Toggle CRTC type (0/1)
F9 - Toggle Turbo
F11 - Autotype console
F12 - Reset CPC

Joystick is mapped to:
<Insert> - Fire 0
<Page up> - Fire 1
<Home> - Up
<Page down> - Right
<End> - Down
<Delete> - Left

*Supported media:
DSK, SNA, CDT, CSW

Features:
- CRTC 0 / 1 emulation
- Accurate AY emulation
- Digiblaster and Amdrum emulation
- Autotype
- CDT/CSW Tape image supported (Read only!)
- DSK Disk image supported (Read only!)
- Can load SNA snapshots
- 2 Display-sizes (Doubleclick into Display to change size)

Have fun!
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.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInABox' emulator in exact 128k!
« Reply #10 on: 22:06, 12 January 11 »
BTW.: CPCInABox of course can be used, too, on a website as applet!
Watch it!
« Last Edit: 21:19, 13 January 11 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 Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.387
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2593
Re: 'CPCInABox' emulator in exact 128k!
« Reply #11 on: 10:08, 13 January 11 »
Oooh cool! We should use that in the wiki's front page! :D :D Quite efficient, too, it runs very fast at my work PC...

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInABox' emulator in exact 128k!
« Reply #12 on: 11:29, 13 January 11 »
We should use that in the wiki's front page! :D :D

Simple:
Code: [Select]
<applet code="JCPC.ui.CPCInAJar.class" archive="CPCInAJar.jar" codebase="http://retropower.eu/CPCInAJar/" alt="CPCInAJar" width="384" height="272"></applet>
Of course, replace the codebase URL!!!

If you want a large applet:
Code: [Select]
<applet code="JCPC.ui.CPCInAJar.class" archive="CPCInAJar.jar" codebase="http://retropower.eu/CPCInAJar/" alt="CPCInAJar" width="768"   height="544"><param name="LARGE" value="TRUE"></applet>
« Last Edit: 21:20, 13 January 11 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 Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.387
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2593
Re: 'CPCInABox' emulator in exact 128k!
« Reply #13 on: 13:40, 13 January 11 »
Got to dig into how you incorporate Java into Mediawiki again!

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInABox' emulator in exact 128k!
« Reply #14 on: 14:37, 13 January 11 »
Got to dig into how you incorporate Java into Mediawiki again!

I once embedded an applet in a normal CMS system.
I did that by just posting a stupid string. (E.g. "Who reads this is stupid")
Then I replaced this string in my database with html code...
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: 14.387
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2593
Re: 'CPCInABox' emulator in exact 128k!
« Reply #15 on: 14:40, 13 January 11 »
I once embedded an applet in a normal CMS system.
I did that by just posting a stupid string. (E.g. "Who reads this is stupid")
Then I replaced this string in my database with html code...


I see what you did there! But I think MW is more clever than that - it actively checks to see what it is running... there are actual extensions to allow java to run under MW. Go figure! :)

Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInABox' emulator in exact 128k!
« Reply #16 on: 14:46, 13 January 11 »
Btw.: CPCInABox has a few more parameters to define a dsk, sna, cdt, csw and also to define CRTC type and boot string...

e.g.:
Code: [Select]
<param name="LARGE" value="TRUE">    <---- use when you need a large applet (Also change its size then)
<param name="DISK" value="scratch.zip">    <---- Name for   dsk (or zipped dsk, 1 dsk max! put the file into subfolder file/)
<param name="DISKB" value="sideb.zip">    <---- Name for   dsk in drive B (or zipped dsk, 1 dsk max! put the file into subfolder file/)
<param name="SNA" value="snapshot.zip">    <---- Name for SNA (or zipped SNA , 1 SNA max! put the file into subfolder file/)
<param name="BOOT" value="-scratch">       <---- gives RUN"-scratch" on startup 
<param name="AUTOTYPE" value="|CPM">     <---- gives |CPM on startup. ("" not possible here) 
<param name="CRTC" value="1">            <---- sets to CRTC type 1 on startup

use DISK also for CDT or CSW tape images.
« Last Edit: 14:50, 13 January 11 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.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInABox' emulator in exact 128k!
« Reply #17 on: 14:54, 13 January 11 »
I am using a little php code like this:
Code: [Select]
<center>
<applet code="JCPC.ui.CPCInAJar.class" archive="CPCInABox.jar" codebase="http://retropower.eu/CPCInAJar/"  alt="CPCInAJar"
 
<?php
if (!empty($_GET[&#39;large&#39;])){
    
echo "width=\"768\" height=\"544\">\r\n";
    echo 
"<param name=\"LARGE\" value=\"TRUE\">\r\n";
} else {
    echo 
"width=\"384\" height=\"272\">";
}
        if (!empty(
$_GET[&#39;dsk&#39;])){
            
$load $_GET[&#39;dsk&#39;];
            
echo "<param name=\"DISK\" value=\"".$load."\">\r\n";
            }
        if (!empty(
$_GET[&#39;dskb&#39;])){
            
$load $_GET[&#39;dskb&#39;];
            
echo "<param name=\"DISKB\" value=\"".$load."\">\r\n";
            }
        if (!empty(
$_GET[&#39;sna&#39;])){
            
$load $_GET[&#39;sna&#39;];
            
echo "<param name=\"SNA\" value=\"".$load."\">\r\n";
            }
        if (!empty(
$_GET[&#39;type&#39;])){
            
$boot $_GET[&#39;type&#39;];
            
echo "<param name=\"AUTOTYPE\" value=\"".$boot."\">\r\n";
            }
        if (!empty(
$_GET[&#39;boot&#39;])){
            
$boot $_GET[&#39;boot&#39;];
            
echo "<param name=\"BOOT\" value=\"".$boot."\">\r\n";
            }
        if (!empty(
$_GET[&#39;crtc&#39;])){
            
$boot $_GET[&#39;crtc&#39;];
            
echo "<param name=\"CRTC\" value=\"".$boot."\">\r\n";
            }

?>

</applet>
</center>
« Last Edit: 21:18, 13 January 11 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 Gryzor

  • Administrator
  • 6128 Plus
  • *****
  • Posts: 14.387
  • Country: gr
  • CPC-Wiki maintainer
    • CPCWiki
  • Liked: 2593
Re: 'CPCInABox' emulator in exact 128k!
« Reply #18 on: 15:52, 13 January 11 »
Yes, but you cannot add php code to a wiki page, which is itself the product of php code...

Offline robcfg

  • Supporter
  • 6128 Plus
  • *
  • Posts: 1.935
  • Country: se
  • 8-Bit Technomancer
    • index.php?action=treasury
  • Liked: 780
Re: 'CPCInABox' emulator in exact 128k!
« Reply #19 on: 17:02, 13 January 11 »
Hi, Markus!


Great work! There is though a thing I noticed that doesn't work right: the cursor keys.


I loaded Orion Prime, and works ok, even the disc routines, but I cannot move the cursor to play it.


In basic they appear to work ok.




Offline Devilmarkus

  • Vivid source of indefiniteness
  • 6128 Plus
  • ******
  • Posts: 4.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInABox' emulator in exact 128k!
« Reply #20 on: 18:33, 13 January 11 »
Hi robcfg,
the cursor keys work well for me in OP.
Use cursor keys & space key.
(Or use the mapped joystick as described in F1-info)

I know the FDC has problems to read OP properly. So sometimes it can fail!
So, no worries, when it freezes.
CPCInABox has very basic FDC emulation.
(Like JavaCPC, too :( )

Problem makes the <copy> key in CPCInABox.
It's mapped to "ALT" key and this opens application's menu.
So you always have to press it twice.
(Or I need to map it to a different key, which is not easy because almost all keys are already mapped, because 4 keyboard localizations: EN, FR, ES and DE)
« Last Edit: 18:35, 13 January 11 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.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInABox' emulator in exact 128k!
« Reply #21 on: 19:41, 13 January 11 »
Emulator update!
1 bug in CRTC emulation fixed (Don't expect too much please)
DSK is stored now, when data is written to it! (Works as "Standalone" only of course)
Formatting is not included!

Download: <Deleted>
« Last Edit: 21:16, 13 January 11 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.039
  • Country: de
  • WebCPC / JavaCPC developer
    • index.php?action=treasury
    • CPC-Live website
  • Liked: 1007
Re: 'CPCInAJar' emulator in exact 128k!
« Reply #22 on: 21:14, 13 January 11 »
To not confuse phi2x:
I renamed my emu ;)
It's called CPCInAJar now!



All other downloads I deleted.

Added: Disk storing must be enabled (check readme or press F1 for help)

Readme:
Code: [Select]
CPCInAJar by Markus Hohmann
Contact: webmaster@cpc-live.com

F1 - This info
F2 - Load medium*
F3 - Enable/disable DSK storing (Off by default)
F4 - Store temporary Snapshot
F5 - Load temporary Snapshot
F7 - Toggle Scanlines (When large)
F8 - Toggle CRTC type (0/1)
F9 - Toggle Turbo
F11 - Autotype console
F12 - Reset CPC

Joystick is mapped to:
<Insert> - Fire 0
<Page up> - Fire 1
<Home> - Up
<Page down> - Right
<End> - Down
<Delete> - Left

*Supported media:
DSK, SNA, CDT, CSW

Features:
- CRTC 0 / 1 emulation
- Accurate AY emulation
- Digiblaster and Amdrum emulation
- Autotype
- CDT/CSW Tape image supported (Read only!)
- DSK Disk image supported (Read only!)
- Can load SNA snapshots
- 2 Display-sizes (Doubleclick into Display to change size)

Download:
Download CPCInAJar

So also the html code changes:
http://cpcwiki.eu/forum/index.php/topic,1871.msg18106.html#msg18106
« Last Edit: 21:20, 13 January 11 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: 1972
Re: 'CPCInABox' emulator in exact 128k!
« Reply #23 on: 21:23, 13 January 11 »
Amazing!!! And for sure the best one of its kind!!! Thanks Markus!
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Offline phi2x

  • 464 Plus
  • *****
  • Posts: 458
  • Country: fr
    • CPCBox - CPC emulator in JavaScript
  • Liked: 151
Re: 'CPCInAJar' emulator in exact 128k!
« Reply #24 on: 21:26, 13 January 11 »
To not confuse phi2x:
I renamed my emu ;)
It's called CPCInAJar now!
Thanks. :)
Atwood's law (2007): "Any application that can be written in JavaScript, will eventually be written in JavaScript."