mirror of
https://github.com/dgis/emu48android
synced 2025-01-29 08:34:25 +01:00
This commit is contained in:
parent
3b73ede365
commit
ceff945611
15 changed files with 1074 additions and 145 deletions
|
@ -13,15 +13,12 @@ NOT WORKING
|
|||
- Serial Ports (Wire or Ir)
|
||||
|
||||
TODO
|
||||
- Add help and about
|
||||
- Change KML
|
||||
- Support 8bits images
|
||||
- Put the KML title in the header of the menu in the drawer
|
||||
- Bug: No refresh with the clock
|
||||
- Option to allow rotation
|
||||
- Option to auto hide the menu
|
||||
- Bitmap corruption when touching the buttons
|
||||
- Android UI Settings
|
||||
- Sound
|
||||
|
||||
DONE
|
||||
|
@ -30,6 +27,9 @@ DONE
|
|||
- Choose KML/Change KML/NewDocument
|
||||
- Load/Save object
|
||||
- Permission issues when reopening document after an OS restart
|
||||
- Android UI Settings
|
||||
- Change settings per settings
|
||||
- Add icons
|
||||
- Autosave
|
||||
- Add help and about
|
||||
- Change KML
|
||||
|
|
|
@ -33,6 +33,7 @@ dependencies {
|
|||
implementation 'androidx.appcompat:appcompat:1.1.0-alpha01'
|
||||
implementation 'androidx.constraintlayout:constraintlayout:2.0.0-alpha2'
|
||||
implementation 'com.google.android.material:material:1.1.0-alpha01'
|
||||
implementation 'com.android.support.constraint:constraint-layout:1.1.3'
|
||||
// testImplementation 'junit:junit:4.12'
|
||||
// androidTestImplementation 'com.android.support.test:runner:1.0.2'
|
||||
// androidTestImplementation 'com.android.support.test.espresso:espresso-core:3.0.2'
|
||||
|
|
|
@ -20,7 +20,6 @@
|
|||
android:theme="@style/AppTheme.NoActionBar">
|
||||
<intent-filter>
|
||||
<action android:name="android.intent.action.MAIN" />
|
||||
|
||||
<category android:name="android.intent.category.LAUNCHER" />
|
||||
</intent-filter>
|
||||
</activity>
|
||||
|
@ -33,6 +32,20 @@
|
|||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="com.regis.cosnier.emu48.MainActivity"/>
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".InfoWebActivity"
|
||||
android:label="@string/title_web_activity_info">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="com.regis.cosnier.emu48.MainActivity" />
|
||||
</activity>
|
||||
<activity
|
||||
android:name=".InfoActivity"
|
||||
android:label="@string/title_activity_info">
|
||||
<meta-data
|
||||
android:name="android.support.PARENT_ACTIVITY"
|
||||
android:value="com.regis.cosnier.emu48.MainActivity" />
|
||||
</activity>
|
||||
<provider
|
||||
android:name="androidx.core.content.FileProvider"
|
||||
android:authorities="${applicationId}.provider"
|
||||
|
|
608
app/src/main/assets/Emu48.htm
Normal file
608
app/src/main/assets/Emu48.htm
Normal file
|
@ -0,0 +1,608 @@
|
|||
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN"
|
||||
"http://www.w3.org/TR/html4/loose.dtd">
|
||||
<html>
|
||||
|
||||
<head>
|
||||
<title>Emu48 Manual</title>
|
||||
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">
|
||||
<meta http-equiv="Content-Language" content="en-us">
|
||||
<meta name="author" content="Christoph Giesselink">
|
||||
<meta name="description" content="Emulator Manual Emu48">
|
||||
<style type="text/css">
|
||||
<!--
|
||||
body { background-color:white;
|
||||
font-family:'Times New Roman',Times,Arial,serif;
|
||||
/* font-size:76%; */
|
||||
}
|
||||
p { font-size:1.0em; }
|
||||
h1 { color:red; font-size:1.5em; }
|
||||
h2 { color:red; font-size:1.5em; }
|
||||
h3 { color:red; font-size:1.1em; }
|
||||
#headline { margin-left: 20%; text-align:center; font-size:1.5em; }
|
||||
#navi { float: left; width: 15%; }
|
||||
#main { margin-left: 20%; }
|
||||
.nav1 { font-weight:bold; font-size:0.8em; }
|
||||
.nav2 { font-weight:normal; font-size:0.8em; }
|
||||
-->
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<div id="headline">
|
||||
<p>Emu48 - A freeware HP38G/39G/40G/48SX/48GX/49G Emulator<br>
|
||||
for Windows 9x, ME, NT, 2000, XP, Vista, 7, 8 and 10</p>
|
||||
</div>
|
||||
<div id="navi">
|
||||
<p><a class="nav1" href="#s1">1. General</a></p>
|
||||
<p><a class="nav1" href="#s2">2. Acknowledgements</a></p>
|
||||
<p><a class="nav1" href="#s3">3. ROM Images</a></p>
|
||||
<p><a class="nav1" href="#s4">4. Installation</a></p>
|
||||
<p><a class="nav1" href="#s5">5. How to Start</a></p>
|
||||
<p><a class="nav1" href="#s6">6. Command Line</a></p>
|
||||
<p><a class="nav1" href="#s7">7. Virtual Keyboard</a></p>
|
||||
<p><a class="nav1" href="#s8">8. File Menu</a><br>
|
||||
<span class="nav2">
|
||||
<a href="#ss8.1">8.1 New...</a><br>
|
||||
<a href="#ss8.2">8.2 Open...</a><br>
|
||||
<a href="#ss8.3">8.3 Save</a><br>
|
||||
<a href="#ss8.4">8.4 Save As...</a><br>
|
||||
<a href="#ss8.5">8.5 Close</a><br>
|
||||
<a href="#ss8.6">8.6 Settings</a><br>
|
||||
<a href="#ss8.6.1">8.6.1 Settings General</a><br>
|
||||
<a href="#ss8.6.2">8.6.2 Settings Memory</a><br>
|
||||
<a href="#ss8.6.3">8.6.3 Settings Peripheral</a><br>
|
||||
<a href="#ss8.7">8.7 Exit</a>
|
||||
</span></p>
|
||||
<p><a class="nav1" href="#s9">9. Edit Menu</a><br>
|
||||
<span class="nav2">
|
||||
<a href="#ss9.1">9.1 Load Object...</a><br>
|
||||
<a href="#ss9.2">9.2 Save Object...</a><br>
|
||||
<a href="#ss9.3">9.3 Copy Screen</a><br>
|
||||
<a href="#ss9.4">9.4 Copy Stack</a><br>
|
||||
<a href="#ss9.5">9.5 Paste Stack</a><br>
|
||||
<a href="#ss9.6">9.6 Reset Calculator</a><br>
|
||||
<a href="#ss9.7">9.7 Backup</a><br>
|
||||
<a href="#ss9.7.1">9.7.1 Backup Save</a><br>
|
||||
<a href="#ss9.7.2">9.7.2 Backup Restore</a><br>
|
||||
<a href="#ss9.7.3">9.7.3 Backup Delete</a>
|
||||
</span></p>
|
||||
<p><a class="nav1" href="#s10">10. View Menu</a><br>
|
||||
<a class="nav2" href="#ss10.1">10.1 Change KML Script...</a></p>
|
||||
<p><a class="nav1" href="#s11">11. Tools Menu</a><br>
|
||||
<span class="nav2">
|
||||
<a href="#ss11.1">11.1 Disassembler...</a><br>
|
||||
<a href="#ss11.2">11.2 Debugger...</a><br>
|
||||
<a href="#ss11.3">11.3 Macro</a><br>
|
||||
<a href="#ss11.3.1">11.3.1 Macro Record...</a><br>
|
||||
<a href="#ss11.3.2">11.3.2 Macro Play...</a><br>
|
||||
<a href="#ss11.3.3">11.3.3 Macro Stop</a><br>
|
||||
<a href="#ss11.3.4">11.3.4 Macro Settings...</a>
|
||||
</span></p>
|
||||
<p><a class="nav1" href="#s12">12. Help Menu</a><br>
|
||||
<span class="nav2">
|
||||
<a href="#ss12.1">12.1 Help Topics</a><br>
|
||||
<a href="#ss12.2">12.2 About Emu48...</a>
|
||||
</span></p>
|
||||
<p><a class="nav1" href="#s13">13. DDE Server</a></p>
|
||||
<p><a class="nav1" href="#s14">14. License</a></p>
|
||||
</div>
|
||||
<div id="main">
|
||||
<h1><a name=s1>1. General</a></h1>
|
||||
<p>Emu48 is an emulator for the Hewlett Packard HP38G, HP39G,
|
||||
HP40G, HP48SX, HP48GX and HP49G calculator hardware. These calculators
|
||||
are based on the 1LT8 Clarke (HP48SX) and on the Yorke chip.</p>
|
||||
<h1><a name=s2>2. Acknowledgements</a></h1>
|
||||
<p>First of all a big thank to Sébastien Carlier for publishing
|
||||
Emu48 v1.0 under the GPL. Without this decision newer versions of the
|
||||
emulator wouldn't have been possible or ports to other similar
|
||||
calculators wouldn't have been made. Also a big thank to Jean-Yves
|
||||
Avenard for his technical assistance in the beginning. Lode Vandevenne
|
||||
spend the PNG image decoder and finally I want to thank all the
|
||||
unnamed authors for publishing material about these calculators.</p>
|
||||
<h1><a name=s3>3. ROM Images</a></h1>
|
||||
<p>Emu48 needs an image of a calculator ROM to be able to run. ROM
|
||||
images are valid in a packed (even address lower nibble, odd address
|
||||
higher nibble) or unpacked (one nibble per byte with even address first)
|
||||
form.</p>
|
||||
<p>Since fall 2000 the emulator ROM's for the HP38, 39, 40, 48 and 49
|
||||
are freely available on different Internet sites. Because there's no
|
||||
license for the distribution of the ROM images, they aren't included
|
||||
in the Emu48 package. You can still use the classic way extracting
|
||||
them from your own calculator. But in mostly all cases you have to
|
||||
convert the ROM files into the Emu48 ROM format.</p>
|
||||
<ul>
|
||||
<li>HP38
|
||||
<p>To upload the ROM of your HP38G, you will need a special aplet
|
||||
called <a href="http://www.hpcalc.org/details.php?id=633">"ROM UPLOAD"</a>.
|
||||
Once you've uploaded the ROM, you have to convert it using the
|
||||
Convert utility.</p>
|
||||
<p>To do that, start a Command Prompt while running Windows, and
|
||||
type:</p>
|
||||
<blockquote>Convert <rom-file> ROM.38G</blockquote>
|
||||
<p>Where <rom-file> is the path to your ROM image. This will
|
||||
create a file named ROM.38G. This tool will also check its validity.
|
||||
</p></li>
|
||||
<li>HP39/40
|
||||
<p>To upload the ROM of your HP39G/HP40G, you will need a special aplet
|
||||
called <a href="http://hp.giesselink.com/emu48.htm">"ROM UPLOAD"</a>.
|
||||
Once you've uploaded the ROM, you have to convert it using the Rom2emu utility.
|
||||
</p>
|
||||
<p>To do that, start a Command Prompt while running Windows, and
|
||||
type:</p>
|
||||
<blockquote>Rom2emu <rom-file> ROM.39G</blockquote>
|
||||
<p>There's also a HP39G/HP40G beta ROM for emulators inside an old
|
||||
<a href="http://www.hpcalc.org/details.php?id=4272">Emu48 package</a>.
|
||||
</p></li>
|
||||
<li>HP48
|
||||
<p>If you have already used another HP48 emulator, you can convert
|
||||
the ROM using the Convert utility.
|
||||
</p>
|
||||
<p>To do that, start a Command Prompt while running Windows, and
|
||||
type:</p>
|
||||
<blockquote>Convert <rom-file> ROM.48G</blockquote>
|
||||
<p>or</p>
|
||||
<blockquote>Convert <rom-file> ROM.48S</blockquote>
|
||||
<p>Where <rom-file> is the path to your old ROM image. This
|
||||
will create a file named ROM.48G or ROM.48S, depending on the version
|
||||
you own. This tool should be able to read any style of ROM image, and
|
||||
will also check its validity. Note that if you run it with only one
|
||||
parameter, no file will be written, but it will still check the
|
||||
validity of the ROM.</p>
|
||||
<p>If you have never used an HP48 emulator, and don't have a ROM
|
||||
dump, you can either use Jean-Yves Avenard's ROMUPL.BIN or the
|
||||
ROMDump Wizard V1.x, which will almost automatically get the ROM from
|
||||
your HP48. After the download you may have to convert your dump with
|
||||
the CONVERT utility into the Emu48 format.</p>
|
||||
<p>You can find the latest version of the ROM dump programs on:</p>
|
||||
<blockquote>
|
||||
ROMUPL.BIN <a href="http://www.hpcalc.org/details.php?id=3686">
|
||||
http://www.hpcalc.org/details.php?id=3686</a><br>
|
||||
ROMDump Wizard
|
||||
<a href="http://hp.giesselink.com/emu48.htm">
|
||||
http://hp.giesselink.com/emu48.htm</a>
|
||||
</blockquote></li>
|
||||
<li>HP49G
|
||||
<p>There's no ROM download program available so far. But you can
|
||||
create a ROM image with the
|
||||
<a href="http://hp.giesselink.com/emu48.htm">UPD49ROM tool</a>
|
||||
and a <a href="http://www.hpcalc.org/hp49/pc/rom/">
|
||||
ROM update file</a> for the HP49G calculator. I suggested to use
|
||||
<a href="http://www.hpcalc.org/details.php?id=3240">version 1.19-6</a>
|
||||
</p>
|
||||
<p>To create a HP49G ROM image file, start a Command Prompt while
|
||||
running Windows, and type:</p>
|
||||
<blockquote>UPD49ROM -f hp49119-6.flash ROM.49G</blockquote>
|
||||
<p>This will create a HP49G ROM image file with an empty User
|
||||
Port 2.</p></li>
|
||||
</ul>
|
||||
<h1><a name=s4>4. Installation</a></h1>
|
||||
<p>To install Emu48 you may use the installer package which contain,
|
||||
among the binaries, some HP48 KML scripts or just unzip the emulator
|
||||
and the required emulator skins from archives into an empty directory.
|
||||
Finally you have to copy your ROM images into this directory and
|
||||
adjust the ROM image name to the name used in the corresponding KML
|
||||
script. When you first run Emu48, it will detect the directory in
|
||||
which you installed it, and will write the configuration to the
|
||||
registry at <i>HKCU\Software\Emu48</i>.</p>
|
||||
<h1><a name=s5>5. How to Start</a></h1>
|
||||
<p>When Emu48 is installed and you have put valid KML scripts and the
|
||||
corresponding ROM image(s) into your Emu48 installation directory, you
|
||||
can start Emu48. You'll see a "Choose Your KML Script"
|
||||
box.</p>
|
||||
<p>KML scripts in fact define the visual aspect of Emu48, the behavior of
|
||||
the buttons, of the keyboard, ... It's a GREAT way to customize your copy
|
||||
of Emu48.</p>
|
||||
<p>Check that the path in the "Emu48 Directory" text area is
|
||||
correct. Modify it if the directory in which you installed Emu48 is not
|
||||
the directory displayed. Click the refresh button ("V") after
|
||||
modifying it to update the list box or use the ("...") button to
|
||||
start the directory browser.</p>
|
||||
<p>Choose a KML script in the list box for your calculator ROM you put
|
||||
into Emu48's directory.</p>
|
||||
<p>Several HP48 scripts are included in the Emu48 archive:</p>
|
||||
<ul>
|
||||
<li>Emu48's Default Faceplate for HP48G/GX</li>
|
||||
<li>Emu48's Default Faceplate for HP48S/SX
|
||||
<p>These two are simple scripts, good for 800x600 display
|
||||
resolution.</p></li>
|
||||
<li>Casey's Gx with Toolbar and Touch Screen</li>
|
||||
<li>Casey's Sx with Toolbar and Touch Screen
|
||||
<p>These script uses many advanced features, and is a good
|
||||
demonstration of the power of Emu48's scripting language KML.
|
||||
Try it, it is really great!</p></li>
|
||||
<li>Floating buttons
|
||||
<p>This one looks really great.</p></li>
|
||||
<li>Small but realistic HP48 Gx
|
||||
<p>This one has been designed for small resolutions such as
|
||||
640x480.
|
||||
</p></li>
|
||||
</ul>
|
||||
<p>If you want other great scripts, visit Rechlin's great HP archive
|
||||
<a href="http://www.hpcalc.org/"></a></p>
|
||||
<p>And if you are interested in writing new scripts, get the KML 2.0
|
||||
documentation from <a href="http://hp.giesselink.com/emu48.htm">the
|
||||
authors Emu48 page</a>.</p>
|
||||
<p>Once you have selected a script, press OK to start the emulator. In
|
||||
most cases, when Emu48 crash after pressing the OK button, you are using
|
||||
an invalid ROM image. While it's running, you can use the View/Change KML
|
||||
Script... command to change the visual aspect of Emu48.</p>
|
||||
<h1><a name=s6>6. Command Line</a></h1>
|
||||
<p>The command line syntax is "<i>Emu48 [E48file [Port2file]]</i>".
|
||||
The first parameter sets the filename for the emulation data
|
||||
independent from the "LastDocument" setting, the second
|
||||
parameter the Port2 file. You're not able to set a Port 2 file without
|
||||
setting the emulation data file. The arguments are optional.</p>
|
||||
<h1><a name=s7>7. Virtual Keyboard</a></h1>
|
||||
<p>There are two ways to use the virtual keyboard on the emulated
|
||||
calculator:</p>
|
||||
<ol>
|
||||
<li><a href="#mouse">by Mouse</a></li>
|
||||
<li><a href="#keyboard">by PC keyboard</a></li>
|
||||
</ol>
|
||||
<p><a name=mouse></a>
|
||||
The easiest way to use the emulated calculator is using the mouse. The KML
|
||||
script define buttons with an area where mouse input is active. The mouse
|
||||
cursor change from an arrow to a hand cursor in these areas. The state of
|
||||
the virtual key follow the state of your left mouse button. When the mouse
|
||||
cursor leaves the virtual key area the virtual button automatically
|
||||
release. In some cases you need to press more than one key on the
|
||||
emulator. For these cases press the virtual key with the right mouse
|
||||
button. When you release the mouse button or leave the area of the virtual
|
||||
key, the key is still hold. To release all hold virtual buttons, just use
|
||||
the left mouse button again. A single release of a hold virtual key isn't
|
||||
possible.</p>
|
||||
<p><a name=keyboard></a>
|
||||
Another convenient way is using the PC keyboard. The KML script language
|
||||
support a large variety of commands to implement this feature. So keyboard
|
||||
usage depends on your used KML script and not on the emulator. Because of
|
||||
this it's impossible to say what's happen when you press a key on the PC
|
||||
keyboard. For further details read the KML 2.0 documentation mentioned
|
||||
before please.</p>
|
||||
<h1><a name=s8>8. File Menu</a></h1>
|
||||
<h2><a name=ss8.1>8.1 New...</a></h2>
|
||||
<p>Creates a new emulation session. You're asked for a new KML script
|
||||
where you can select the calculator type and skin to emulate.</p>
|
||||
<h2><a name=ss8.2>8.2 Open...</a></h2>
|
||||
<p>Opens an existing emulation session. The emulation continues at the
|
||||
same position where the loaded session was aborted. Loading emulation
|
||||
sessions made with a different ROM revision may <u>destroy</u> the memory
|
||||
content or may cause other unpredictable results.</p>
|
||||
<h2><a name=ss8.3>8.3 Save</a></h2>
|
||||
<p>Saves the current running session with the actual name.</p>
|
||||
<h2><a name=ss8.4>8.4 Save As...</a></h2>
|
||||
<p>Saves the current running session with a new name. You're also get in
|
||||
this dialog when you Exit a new session without a state file name.</p>
|
||||
<h2><a name=ss8.5>8.5 Close</a></h2>
|
||||
<p>Closes the current session without closing the emulator.</p>
|
||||
<h2><a name=ss8.6>8.6 Settings</a></h2>
|
||||
<p>This calls the Settings dialog. This dialog has three tabs:
|
||||
General, Memory and Peripheral.</p>
|
||||
<h3><a name=ss8.6.1>8.6.1 Settings General</a></h3>
|
||||
<h4>8.6.1.1 Section General</h4>
|
||||
<ul>
|
||||
<li><i>Authentic Calculator Speed</i>
|
||||
<p>When this option is checked, the emulation speed will be similar
|
||||
to the real calculator depending on the RATE control register
|
||||
content.</p></li>
|
||||
<li><i>Enable Virtual LCD Delay</i>
|
||||
<p>Try this option for a better 4 color gray scale display simulation
|
||||
output.</p></li>
|
||||
<li><i>Always On Top</i>
|
||||
<p>When this option is checked, the emulator window will always be the
|
||||
topmost one.</p></li>
|
||||
<li><i>Activation Follows Mouse</i>
|
||||
<p>This option enables a X-Mouse style windows activation. When the
|
||||
mouse is moved over the emulator window, the emulator is getting the
|
||||
focus and popping up into foreground.</p></li>
|
||||
<li><i>Single Instance</i>
|
||||
<p>When this option is checked, the program is only allowed to run in
|
||||
a single instance. If another running instance is detected, the detected
|
||||
instance is set into foreground as active window and get a request to
|
||||
change his state file to the given one by the current instance. Finally
|
||||
the current instance is terminated.</p></li>
|
||||
<li><i>Automatically Save Files</i>
|
||||
<p>When this option is checked, the current state file will automatically
|
||||
saved when you change to another state file, but not when you close the
|
||||
emulator program.</p></li>
|
||||
<li><i>Automatically Save Files On Exit</i>
|
||||
<p>When this option is checked, the current state file will be saved
|
||||
automatically at the end when the emulator program is closed.</p></li>
|
||||
<li><i>Show Load Object Warning</i>
|
||||
<p>When this option is checked, you'll get a warning message box when you
|
||||
try to load an object with the <i>Load Object...</i> menu command. If
|
||||
this option is unchecked, the warning will be skipped.</p></li>
|
||||
<li><i>Always Show KML Compilation Result</i>
|
||||
<p>When this option is checked, you see the results of the KML
|
||||
(Keyboard Macro Language) interpreter at every KML script load.</p></li>
|
||||
</ul>
|
||||
<h4>8.6.1.2 Section Style</h4>
|
||||
<ul>
|
||||
<li><i>Show Title</i>
|
||||
<p>When this option is checked, the window title bar is visible.</p></li>
|
||||
<li><i>Show Menu</i>
|
||||
<p>When this option is checked, the menu bar is enabled. If unchecked,
|
||||
the menu is accessible as context menu in the client area outside the
|
||||
calculator button definitions.</p></li>
|
||||
</ul>
|
||||
<h4>8.6.1.3 Section Disassembler</h4>
|
||||
<p>Choosing the assembler syntax:</p>
|
||||
<ul>
|
||||
<li><i>HP Mnemonics</i>
|
||||
<p>This is the standard syntax used by HP.</p></li>
|
||||
<li><i>Class Mnemonics</i>
|
||||
<p>Class (Clarke assembler) was written by Lutz Vieweg in 1991, at a time
|
||||
when HP had not published their own development tools. The syntax is very
|
||||
similar to the AG and STAR mnemonics used at this time. Especially
|
||||
published assembler programs written for the HP28S use the similar AG
|
||||
syntax.</p></li>
|
||||
</ul>
|
||||
<h3><a name=ss8.6.2>8.6.2 Settings Memory</a></h3>
|
||||
<h4>8.6.2.1 Section Memory Cards</h4>
|
||||
<ul>
|
||||
<li><i>Port 1 is Plugged</i>
|
||||
<p>When this option is checked, a 128 KB RAM card is emulated in card
|
||||
Port 1. The RAM card content is saved in the current emulator state
|
||||
file.</p></li>
|
||||
<li><i>Port 1 is Writeable</i>
|
||||
<p>When this option is checked, the RAM card in card Port 1 is
|
||||
writable else the card is Read-Only by simulating the card write
|
||||
protect switch.</p></li>
|
||||
<li><i>Port 2 is Shared</i>
|
||||
<p>When this option is unchecked, only the first instance of Emu48
|
||||
will allow you to use the RAM card in Port 2. When this option is
|
||||
checked, the first instance of Emu48 will give you both read and
|
||||
write access to this RAM card. If you start Emu48 in another
|
||||
instance, the RAM card in Port 2 will be write-protected. Thus you
|
||||
can transfer files very easily between two calculators. This RAM card
|
||||
is used by both S/SX and G/GX types.</p></li>
|
||||
<li><i>Port 2 is Writeable</i>
|
||||
<p>This option represents the actual read/write state of the Port 2
|
||||
file. Changing the option will also change the state for the
|
||||
calculator by modifying the Read-Only attribute of the file.</p></li>
|
||||
<li><i>Port 2 File</i>
|
||||
<p>You can add a RAM card of up to 4MB to a HP48. By default, no such
|
||||
card will be created when you start Emu48. The MkShared.exe utility
|
||||
will allow you to create one. To create a Port 2 RAM Card, call the
|
||||
program, select the RAM Card size, enter the card file name and press
|
||||
the 'Create' button. That's it. Please remember, this program replace
|
||||
the destination file without any request!</p>
|
||||
<p>If you already have a Port 2 card file in unpacked format, you
|
||||
have to copy the file into the emulator directory. If you choose a
|
||||
different directory you have to use a full path file name.</p>
|
||||
<p>If you use RAM cards greater than 128 KB in a HP48SX, you can only
|
||||
see the first 128 KB of the card. Please remember, the firmware of
|
||||
all HP48GX versions has a bug when using a 4 MB RAM card. You always
|
||||
get the message "Warning: Invalid Card Data" at startup
|
||||
and Port 33 is inaccessible. This is not a bug of the emulator!</p>
|
||||
<p>When you have created or copied the file, enter the card file
|
||||
name into the Port 2 File edit box.</p>
|
||||
<p>Please remember, all port configuration changes mostly behave
|
||||
like on the original calculator. This means when you do this changes
|
||||
with the emulated calculator on, it's the same like when you do this
|
||||
with a real calculator on. In many times, this depends on the current
|
||||
state of the calculator, this will work without any problems by doing
|
||||
an automatically calculator warmstart. But for the most secure way,
|
||||
switch off the emulated calculator first, please!</p></li>
|
||||
</ul>
|
||||
<h3><a name=ss8.6.3>8.6.3 Settings Peripheral</a></h3>
|
||||
<h4>8.6.3.1 Section Sound</h4>
|
||||
<p>A new implementation of the sound engine made ROM patches for sound
|
||||
output obsolete. The new sound engine emulates the behavior of the beeper
|
||||
output ports and only work in connection with a sound card. Using the
|
||||
internal PC speaker isn't possible any more. The old beeper method with a
|
||||
ROM patch is still working but deprecated, it's strongly recommended to
|
||||
remove all beep patches from your current KML scripts to enable the new
|
||||
sound engine. The support of the old sound implementation by a ROM patch
|
||||
maybe removed in later versions of the emulator and remaining beep
|
||||
patches will corrupt the ROM with an illegal opcode then.
|
||||
</p>
|
||||
<p>
|
||||
For the sound generation the calculator must know his own CPU strobe
|
||||
frequency. On the real calculator the speed depends on various settings
|
||||
like component tolerances, actual temperature, humidity and other
|
||||
variables. The resulting speed is measured by the calculator firmware
|
||||
at a cold- or at a warmstart and stored in the =CSPEED variable. The
|
||||
content of this calculator variable has direct influence on the
|
||||
resulting frequency and duration. On the emulator the HP48SX CPU
|
||||
strobe frequency is set by the registry key
|
||||
<i>HKCU\Software\Emu48\Emulator\SXCycles</i>, for all other
|
||||
calculators at <i>HKCU\Software\Emu48\Emulator\GXCycles</i>.
|
||||
For some reasons the CPU cycles are only estimated and so the
|
||||
strobe frequency value in the registry is not the exact CPU strobe
|
||||
frequency of the calculator in Hz divided by 16384 like in the
|
||||
other emulators. Because older versions of the emulator were not
|
||||
able to measure the CPU strobe frequency properly or the strobe
|
||||
frequency registry content has been changed since the last
|
||||
measurement, the =CSPEED variable of this session file may contain
|
||||
a wrong frequency value. You easily may discover this by measuring
|
||||
the real duration of a 10s beep. Is the difference to 10s less
|
||||
than 1s everything is ok, if not, you should perform a
|
||||
<u style="color:red">warmstart</u> of the calculator in this
|
||||
session file. Alternatively you may execute a
|
||||
<a href=#ss9.6>Reset Calculator</a>. This recalls the measuring
|
||||
routine and save the result in the speed variable. Both restart
|
||||
variants purge the stack content!
|
||||
</p>
|
||||
<ul>
|
||||
<li><i>Volume</i>
|
||||
<p>The output volume can be selected with the Volume slider relative to
|
||||
the Master Volume control.
|
||||
</p></li>
|
||||
<li><i>Device</i>
|
||||
<p>By default the sound device is set to "Standard Audio", but
|
||||
you can also manually choose the output device. The device name is
|
||||
somehow cut since Window Vista, but the method of reading the device
|
||||
name is used for backwards compatibility to older versions of the
|
||||
Operating System. When you change the Standard Audio device in the
|
||||
Operating System settings dialog, the internal device numbering may
|
||||
change, and so the manually selected audio device.</p></li>
|
||||
</ul>
|
||||
<h4>8.6.3.2 Section Infrared Printer</h4>
|
||||
<p>The emulator has the ability to print data to a HP82240A/B printer
|
||||
simulation. The data transfer to the printer simulator is done over UDP.
|
||||
In this section you can the define the IPv4 address and the port the
|
||||
printer simulator is listening. A suitable HP82240B printer simulation can
|
||||
be found <a href="http://hp.giesselink.com/hp82240b.htm">here</a>.</p>
|
||||
<h4>8.6.3.3 Section Serial Ports</h4>
|
||||
<ul>
|
||||
<li><i>Wire</i>
|
||||
<p>In the Wire combo box you can select the COM port device connected
|
||||
to the wire port of the calculator.</p></li>
|
||||
<li><i>Ir</i>
|
||||
<p>In the Ir combo box you can select the COM port device connected
|
||||
to the IR port of the calculator. Please remember that the IR port
|
||||
only work with 2400 baud.</p></li>
|
||||
</ul>
|
||||
<h2><a name=ss8.7>8.7 Exit</a></h2>
|
||||
<p>Quit emulation. The default actions at finishing are defined in the
|
||||
<a href=#ss8.6>Settings</a> dialog. If the current session is
|
||||
"Untitled" you are asked for a session file name using the
|
||||
<a href="#ss8.4">Save As...</a> dialog. If you quit the emulator
|
||||
without a given filename, you're asked for choosing a KML script at
|
||||
next startup.</p>
|
||||
<h1><a name=s9>9. Edit Menu</a></h1>
|
||||
<h2><a name=ss9.1>9.1 Load Object...</a></h2>
|
||||
<p>This is only valid for the HP48SX, HP48GX and the HP49G emulation.
|
||||
You can load HP48 and HP49G binary objects to stack level 1. Therefore
|
||||
the object must begin with "HPHP48-x" for a HP48 or with
|
||||
"HPHP49-x" for a HP49G binary object where x can be any
|
||||
alphanumeric character. If the binary header isn't present, the object
|
||||
is loaded as string. Dropping HP objects over the emulator window will
|
||||
also load objects. Be sure that the emulator isn't busy before doing
|
||||
this.</p>
|
||||
<h2><a name=ss9.2>9.2 Save Object...</a></h2>
|
||||
<p>This is only valid for the HP48SX, HP48GX and the HP49G emulation.
|
||||
Save the current object in stack level 1 as binary object to disk.</p>
|
||||
<h2><a name=ss9.3>9.3 Copy Screen</a></h2>
|
||||
<p>Copy the screen content as bitmap to the clipboard.</p>
|
||||
<h2><a name=ss9.4>9.4 Copy Stack</a></h2>
|
||||
<p>This is only valid for the HP48SX, HP48GX and the HP49G emulation.</p>
|
||||
<p>Copy a "Real Number", "Complex Number" or
|
||||
"String" object in stack level 1 to the clipboard. On all
|
||||
other objects, the command will be ignored. This prevents sending
|
||||
binary objects to the clipboard.</p>
|
||||
<p>The decimal point (radix mark) of "Real Numbers" in the
|
||||
clipboard is equal to the calculator setting. This point maybe
|
||||
important when you try to paste the numbers into a program using the
|
||||
locale settings of the host operating system.</p>
|
||||
<h2><a name=ss9.5>9.5 Paste Stack</a></h2>
|
||||
<p>This is only valid for the HP48SX, HP48GX and the HP49G emulation.</p>
|
||||
<p>Paste the text field content of the clipboard to stack level 1 of
|
||||
the emulated calculator. If the clipboard content is representing a
|
||||
real number, the number will be saved as "Real Number"
|
||||
object. Is the content a complex number object, the number will be
|
||||
saved as "Complex Number" object, in all other cases as
|
||||
"String" object.</p>
|
||||
<p>To import "Real or Complex Numbers" from the clipboard,
|
||||
the decimal point (radix mark) of the clipboard and calculator
|
||||
<u>must</u> be equal. A real or complex number is only detected in the
|
||||
case of valid real number characters in the clipboard. Especially
|
||||
heading and tailing white spaces aren't valid number characters
|
||||
also.</p>
|
||||
<p>Complex numbers must be in the form <i>(a,b)</i> when using the
|
||||
point radix mark or in the form <i>(a;b)</i> when using the comma
|
||||
radix mark. The Cartesian or algebraic form <i>a+bi</i> is not
|
||||
supported.</p>
|
||||
<h2><a name=ss9.6>9.6 Reset Calculator</a></h2>
|
||||
<p>This emulates the Reset pin of the internal CPU.</p>
|
||||
<h2><a name=ss9.7>9.7 Backup</a></h2>
|
||||
<h3><a name=ss9.7.1>9.7.1 Backup Save</a></h3>
|
||||
<p>This saves the current emulator status into a backup slot. If the
|
||||
backup slot already contain data, it will be overwritten.</p>
|
||||
<h3><a name=ss9.7.2>9.7.2 Backup Restore</a></h3>
|
||||
<p>This restores a previous saved emulator status without request. If you
|
||||
changed the calculator model meanwhile, the emulator will switch back to
|
||||
the old model.</p>
|
||||
<h3><a name=ss9.7.3>9.7.3 Backup Delete</a></h3>
|
||||
<p>This deletes the data in the backup slot.</p>
|
||||
<h1><a name=s10>10. View Menu</a></h1>
|
||||
<h2><a name=ss10.1>10.1 Change KML Script...</a></h2>
|
||||
<p>This allows you to change the skin of the current emulated calculator.
|
||||
In opposite to the New... command you see only scripts emulating the same
|
||||
calculator model.</p>
|
||||
<h1><a name=s11>11. Tools Menu</a></h1>
|
||||
<h2><a name=ss11.1>11.1 Disassembler...</a></h2>
|
||||
<p>This is a simple disassembler.</p>
|
||||
<p>Enter the address to disassemble in hexadecimal into the "Address
|
||||
(HEX)" field and press <Return>. With the "Next Address"
|
||||
button the next opcode is disassembled. With the "Copy Data" button
|
||||
you can copy all selected lines inside the list box to the clipboard.</p>
|
||||
<h2><a name=ss11.2>11.2 Debugger...</a></h2>
|
||||
<p>The assembler code debugger of the emulator. For more details refer to the
|
||||
extra documentation of the debugger please.</p>
|
||||
<h2><a name=ss11.3>11.3 Macro</a></h2>
|
||||
<p>The keyboard macro recorder unit.</p>
|
||||
<h3><a name=ss11.3.1>11.3.1 Macro Record...</a></h3>
|
||||
<p>Prompts a dialog to enter the macro file for the data to record. After
|
||||
accepting the confirm message, every key event is recorded into the macro
|
||||
file with it's time information.</p>
|
||||
<h3><a name=ss11.3.2>11.3.2 Macro Play...</a></h3>
|
||||
<p>Prompts a dialog box to ask for the keyboard macro file to play. The
|
||||
replay starts immediately after selecting the file.</p>
|
||||
<h3><a name=ss11.3.3>11.3.3 Macro Stop</a></h3>
|
||||
<p>Stops recording or replaying a keyboard macro file.</p>
|
||||
<h3><a name=ss11.3.4>11.3.4 Macro Settings...</a></h3>
|
||||
<p>Settings for the Macro Replay mode</p>
|
||||
<ul>
|
||||
<li><i>Real</i>
|
||||
<p>Replay macro with the original recording speed.</p></li>
|
||||
<li><i>Manual</i>
|
||||
<p>Replay macro with the speed set by the speed slider.</p></li>
|
||||
</ul>
|
||||
<h1><a name=s12>12. Help Menu</a></h1>
|
||||
<h2><a name=ss12.1>12.1 Help Topics</a></h2>
|
||||
<p>Call this document.</p>
|
||||
<h2><a name=ss12.2>12.2 About Emu48...</a></h2>
|
||||
<p>The version, copyright and license message...</p>
|
||||
<h1><a name=s13>13. DDE Server</a></h1>
|
||||
<p>Emu48 has an integrated DDE server to transmit data from and to the HP
|
||||
stack. Because only the HP48 and HP49 have a stack, all DDE transfers
|
||||
are ignored on the other calculators. You have the same restrictions like
|
||||
with the commands "Load object..." and "Save
|
||||
Object...", that a running program may corrupt memory. In difference
|
||||
you can choose the stack level for the transfer in the DDE item field.
|
||||
Take care to transmit data only after the acknowledge of the last DDE
|
||||
transaction.</p>
|
||||
<p>Technical data:</p>
|
||||
<table border="0" cellpadding="0" cellspacing="0" width="651" summary="DDE settings">
|
||||
<tr>
|
||||
<td width="111">Servicename:</td>
|
||||
<td width="536">Emu48</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="111">Topicname:</td>
|
||||
<td width="536">Stack</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="111">Item:</td>
|
||||
<td width="536">1 (stack level)</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td width="111">Clipboardformat:</td>
|
||||
<td width="536">"CF_HPOBJ" (user defined)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<p>The DDE commands CONNECT, POKE and REQUEST are supported.</p>
|
||||
<p>The structure of the clipboard format "CF_HPOBJ":</p>
|
||||
<table border="1" cellpadding="0" cellspacing="0" width="100%" summary="CF_HPOBJ format">
|
||||
<tr>
|
||||
<td width="34%">4 Byte (length of object, LSB first)</td>
|
||||
<td width="66%" align="center">HP object (normal HP object)</td>
|
||||
</tr>
|
||||
</table>
|
||||
<h1><a name=s14>14. License</a></h1>
|
||||
<p>Emu48 - A HP38G/39G/40G/48SX/48GX/49G Emulator<br>
|
||||
Copyright (C) 2018 Christoph Gießelink</p>
|
||||
<p>This program is free software; you can redistribute it and/or modify it
|
||||
under the terms of the GNU General Public License as published by the Free
|
||||
Software Foundation; either version 2 of the License, or (at your option)
|
||||
any later version.</p>
|
||||
<p>This program is distributed in the hope that it will be useful, but
|
||||
WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY
|
||||
or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
||||
for more details.</p>
|
||||
<p>You should have received a copy of the GNU General Public License along
|
||||
with this program; if not, write to the Free Software Foundation, Inc.,
|
||||
51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.</p>
|
||||
</div>
|
||||
</body>
|
||||
</html>
|
97
app/src/main/assets/ReadMe.txt
Normal file
97
app/src/main/assets/ReadMe.txt
Normal file
|
@ -0,0 +1,97 @@
|
|||
This application transforms an image into a painting by numbers.
|
||||
|
||||
DESCRIPTION
|
||||
|
||||
This application allows you to turn any photograph to a ready to paint printable canvas. Once printed on a real canvas, you just have to paint the numbered areas with the matching colors in your palette.
|
||||
|
||||
The advanced version allows:
|
||||
- To edit the palette.
|
||||
- To access to the advanced parameters.
|
||||
- To manage several projects.
|
||||
- To export the result in a SVG, PNG or JPG file.
|
||||
|
||||
|
||||
QUICK START
|
||||
|
||||
1. Touch the top left button and select "Open a new image".
|
||||
2. The image is analyzed and should appear with the numbered areas.
|
||||
3. To check the result, you can zoom with two fingers or pan with one.
|
||||
4. The top right button opens the parameters panel which allows changing the number of color, the size of the numbers, etc...
|
||||
5. To print the result, touch the top left button and select "Export to PDF".
|
||||
|
||||
|
||||
NOTES
|
||||
|
||||
- It is recommended to choose images with less detail as possible. Increasing the blur power helps to reduce the details.
|
||||
- You can also use the application with a mouse.
|
||||
|
||||
|
||||
PERMISSIONS
|
||||
|
||||
- WRITE_EXTERNAL_STORAGE is required to read images, to write the PDF/SVG/PNG/JPG files (/sdcard/Documents/PaintByNumbers) and save the last state of the application (/sdcard/.paintByNumbers/).
|
||||
|
||||
|
||||
REQUIREMENTS
|
||||
|
||||
Android device version 4.0 or later.
|
||||
|
||||
|
||||
CHANGES
|
||||
|
||||
Version 2.0 (2018-06-21)
|
||||
|
||||
- Allow to use up to 75 colors in the palette.
|
||||
- Add a undo change color in the color and image palette editor.
|
||||
- Replace the bottom Cancel/Help/Save button with a standard actionbar in the palette editor.
|
||||
- Add a PDF page format selection (A4/A3/Letter...)
|
||||
- Change the folder where are the images of the project.
|
||||
- Update with the latest APIs.
|
||||
- Fix the image openning from another app.
|
||||
- Fix the duplicate project entries.
|
||||
|
||||
Version 1.9 (2016-07-11)
|
||||
|
||||
- Request the permission to read and write on the sdcard to save the projects.
|
||||
- Drastically improve the performances by updating third-party libraries.
|
||||
- Migrate some operations to native code which reduce the size of the application.
|
||||
- Displays the color in HTML format in the RGB palette editor.
|
||||
- Fix a concurrency issue when viewing or exporting.
|
||||
|
||||
Version 1.8 (2015-10-24)
|
||||
|
||||
- Fix the bad location of the numbers in the SVG palette.
|
||||
- Fix bad label "10" width seen as only one character length.
|
||||
- Improve the number placement algorithm.
|
||||
- Add a progress bar for the build of the vectors.
|
||||
|
||||
Version 1.6 (2015-06-21)
|
||||
|
||||
- Add the possibility to open an image from another applications.
|
||||
- Improve the performances.
|
||||
- Fix gallery access bug with Google Photos on Android version 5.1.
|
||||
- Fix gallery access bug on Android version < 4.4.
|
||||
- Fix badly saved palette after the editon of the colors.
|
||||
|
||||
Version 1.5 (2015-03-15)
|
||||
|
||||
- Add the export to JPG and PNG image.
|
||||
|
||||
Version 1.1 (2014-11-02)
|
||||
|
||||
- Fix the badly loaded project.
|
||||
- Improve the trace algorithm.
|
||||
|
||||
Version 1.0 (2014-09-14)
|
||||
|
||||
- First public version available on the store.
|
||||
|
||||
|
||||
LICENSES
|
||||
|
||||
Copyright (c) Regis COSNIER, All Rights Reserved.
|
||||
|
||||
A screenshots are a derivative of:
|
||||
- "Rose laser" by T.Kiya, used under CC BY-SA 2.0
|
||||
- "Puppy" by DM.Sumon, used under CC BY 2.0
|
||||
- "Burano island" by A.Onufrienko, used under CC BY 2.0
|
||||
- "Brandy Alexander" by A.Valli, used under CC BY 2.0
|
|
@ -31,9 +31,9 @@
|
|||
#define LOGE(...) ((void)__android_log_print(ANDROID_LOG_ERROR, LOG_TAG, __VA_ARGS__))
|
||||
extern void mainViewUpdateCallback();
|
||||
extern void mainViewResizeCallback(int x, int y);
|
||||
extern int mainViewGetOpenFileNameCallback(OPENFILENAME * ofn);
|
||||
extern int mainViewGetSaveFileNameCallback(OPENFILENAME * ofn);
|
||||
extern int openFileFromContentResolver(const TCHAR * url, int writeAccess);
|
||||
extern int showAlert(const TCHAR * messageText, int flags);
|
||||
|
||||
|
||||
|
||||
#if !defined VERIFY
|
||||
|
|
|
@ -10,6 +10,7 @@
|
|||
#include "core/pch.h"
|
||||
#include "core/Emu48.h"
|
||||
#include "core/io.h"
|
||||
#include "core/kml.h"
|
||||
|
||||
extern void emu48Start();
|
||||
extern AAssetManager * assetManager;
|
||||
|
@ -106,6 +107,16 @@ int openFileFromContentResolver(const TCHAR * url, int writeAccess) {
|
|||
return result;
|
||||
}
|
||||
|
||||
// Must be called in the main thread
|
||||
int showAlert(const TCHAR * messageText, int flags) {
|
||||
JNIEnv *jniEnv = getJNIEnvironment();
|
||||
jclass mainActivityClass = (*jniEnv)->GetObjectClass(jniEnv, mainActivity);
|
||||
jmethodID midStr = (*jniEnv)->GetMethodID(jniEnv, mainActivityClass, "showAlert", "(Ljava/lang/String;)V");
|
||||
jstring messageUTF = (*jniEnv)->NewStringUTF(jniEnv, messageText);
|
||||
(*jniEnv)->CallIntMethod(jniEnv, mainActivity, midStr, messageUTF);
|
||||
return IDOK;
|
||||
}
|
||||
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_regis_cosnier_emu48_NativeLib_start(JNIEnv *env, jobject thisz, jobject assetMgr, jobject bitmapMainScreen0, jobject activity, jobject view) {
|
||||
|
||||
|
@ -228,6 +239,10 @@ JNIEXPORT jint JNICALL Java_com_regis_cosnier_emu48_NativeLib_getCurrentModel(JN
|
|||
return cCurrentRomType;
|
||||
}
|
||||
|
||||
JNIEXPORT jboolean JNICALL Java_com_regis_cosnier_emu48_NativeLib_isBackup(JNIEnv *env, jobject thisz) {
|
||||
return bBackup ? JNI_TRUE : JNI_FALSE;
|
||||
}
|
||||
|
||||
JNIEXPORT jstring JNICALL Java_com_regis_cosnier_emu48_NativeLib_getKMLLog(JNIEnv *env, jobject thisz) {
|
||||
jstring result = (*env)->NewStringUTF(env, szKmlLog);
|
||||
return result;
|
||||
|
@ -452,6 +467,72 @@ JNIEXPORT void JNICALL Java_com_regis_cosnier_emu48_NativeLib_onViewReset(JNIEnv
|
|||
OnViewReset();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_regis_cosnier_emu48_NativeLib_onViewScript(JNIEnv *env, jobject thisz, jstring kmlFilename) {
|
||||
|
||||
TCHAR szKmlFile[MAX_PATH];
|
||||
BOOL bKMLChanged,bSucc;
|
||||
BYTE cType = cCurrentRomType;
|
||||
SwitchToState(SM_INVALID);
|
||||
|
||||
const char *filenameUTF8 = (*env)->GetStringUTFChars(env, kmlFilename , NULL) ;
|
||||
_tcscpy(szCurrentKml, filenameUTF8);
|
||||
(*env)->ReleaseStringUTFChars(env, kmlFilename, filenameUTF8);
|
||||
|
||||
// make a copy of the current KML script file name
|
||||
_ASSERT(sizeof(szKmlFile) == sizeof(szCurrentKml));
|
||||
lstrcpyn(szKmlFile,szCurrentKml,ARRAYSIZEOF(szKmlFile));
|
||||
|
||||
bKMLChanged = FALSE; // KML script not changed
|
||||
bSucc = TRUE; // KML script successful loaded
|
||||
|
||||
// do
|
||||
// {
|
||||
// if (!DisplayChooseKml(cType)) // quit with Cancel
|
||||
// {
|
||||
// if (!bKMLChanged) // KML script not changed
|
||||
// break; // exit loop with current loaded KML script
|
||||
//
|
||||
// // restore KML script file name
|
||||
// lstrcpyn(szCurrentKml,szKmlFile,ARRAYSIZEOF(szCurrentKml));
|
||||
//
|
||||
// // try to restore old KML script
|
||||
// if ((bSucc = InitKML(szCurrentKml,FALSE)))
|
||||
// break; // exit loop with success
|
||||
//
|
||||
// // restoring failed, save document
|
||||
// if (IDCANCEL != SaveChanges(bAutoSave))
|
||||
// break; // exit loop with no success
|
||||
//
|
||||
// _ASSERT(bSucc == FALSE); // for continuing loop
|
||||
// }
|
||||
// else // quit with Ok
|
||||
// {
|
||||
bKMLChanged = TRUE; // KML script changed
|
||||
bSucc = InitKML(szCurrentKml,FALSE);
|
||||
// }
|
||||
// }
|
||||
// while (!bSucc); // retry if KML script is invalid
|
||||
|
||||
if (bSucc)
|
||||
{
|
||||
if (Chipset.wRomCrc != wRomCrc) // ROM changed
|
||||
{
|
||||
CpuReset();
|
||||
Chipset.Shutdn = FALSE; // automatic restart
|
||||
|
||||
Chipset.wRomCrc = wRomCrc; // update current ROM fingerprint
|
||||
}
|
||||
if (pbyRom) SwitchToState(SM_RUN); // continue emulation
|
||||
}
|
||||
else
|
||||
{
|
||||
ResetDocument(); // close document
|
||||
SetWindowTitle(NULL);
|
||||
}
|
||||
mainViewResizeCallback(nBackgroundW, nBackgroundH);
|
||||
draw();
|
||||
}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_regis_cosnier_emu48_NativeLib_onBackupSave(JNIEnv *env, jobject thisz) {
|
||||
OnBackupSave();
|
||||
}
|
||||
|
@ -464,135 +545,6 @@ JNIEXPORT void JNICALL Java_com_regis_cosnier_emu48_NativeLib_onBackupDelete(JNI
|
|||
OnBackupDelete();
|
||||
}
|
||||
|
||||
//JNIEXPORT void JNICALL Java_com_regis_cosnier_emu48_NativeLib_setConfiguration(JNIEnv *env, jobject thisz,
|
||||
// jint settingsRealspeed, jint settingsGrayscale, jint settingsAutosave,
|
||||
// jint settingsAutosaveonexit, jint settingsObjectloadwarning, jint settingsAlwaysdisplog,
|
||||
// jint settingsPort1en, jint settingsPort1wr,
|
||||
// jint settingsPort2len, jint settingsPort2wr, jstring settingsPort2load) {
|
||||
//
|
||||
// bRealSpeed = settingsRealspeed;
|
||||
// bAutoSave = settingsAutosave;
|
||||
// bAutoSaveOnExit = settingsAutosaveonexit;
|
||||
// bLoadObjectWarning = settingsObjectloadwarning;
|
||||
// bAlwaysDisplayLog = settingsAlwaysdisplog;
|
||||
//
|
||||
// SetSpeed(bRealSpeed); // set speed
|
||||
//
|
||||
// // LCD grayscale checkbox has been changed
|
||||
// if (bGrayscale != (BOOL)settingsGrayscale) {
|
||||
// UINT nOldState = SwitchToState(SM_INVALID);
|
||||
// SetLcdMode(!bGrayscale); // set new display mode
|
||||
// SwitchToState(nOldState);
|
||||
// }
|
||||
//
|
||||
// //SettingsMemoryProc
|
||||
// LPCTSTR szActPort2Filename = _T("");
|
||||
//
|
||||
// BOOL bPort2CfgChange = FALSE;
|
||||
// BOOL bPort2AttChange = FALSE;
|
||||
//
|
||||
// // port1
|
||||
// if (Chipset.Port1Size && (cCurrentRomType!='X' || cCurrentRomType!='2' || cCurrentRomType!='Q')) // CdB for HP: add apples
|
||||
// {
|
||||
// UINT nOldState = SwitchToState(SM_SLEEP);
|
||||
// // save old card status
|
||||
// BYTE byCardsStatus = Chipset.cards_status;
|
||||
//
|
||||
// // port1 disabled?
|
||||
// Chipset.cards_status &= ~(PORT1_PRESENT | PORT1_WRITE);
|
||||
// if (settingsPort1en)
|
||||
// {
|
||||
// Chipset.cards_status |= PORT1_PRESENT;
|
||||
// if (settingsPort1wr)
|
||||
// Chipset.cards_status |= PORT1_WRITE;
|
||||
// }
|
||||
//
|
||||
// // changed card status in slot1?
|
||||
// if ( ((byCardsStatus ^ Chipset.cards_status) & (PORT1_PRESENT | PORT1_WRITE)) != 0
|
||||
// && (Chipset.IORam[CARDCTL] & ECDT) != 0 && (Chipset.IORam[TIMER2_CTRL] & RUN) != 0
|
||||
// )
|
||||
// {
|
||||
// Chipset.HST |= MP; // set Module Pulled
|
||||
// IOBit(SRQ2,NINT,FALSE); // set NINT to low
|
||||
// Chipset.SoftInt = TRUE; // set interrupt
|
||||
// bInterrupt = TRUE;
|
||||
// }
|
||||
// SwitchToState(nOldState);
|
||||
// }
|
||||
// // HP48SX/GX port2 change settings detection
|
||||
// if (cCurrentRomType=='S' || cCurrentRomType=='G' || cCurrentRomType==0)
|
||||
// {
|
||||
// //bPort2IsShared = settingsPort2isshared;
|
||||
// const char * szNewPort2Filename = NULL;
|
||||
// const char *settingsPort2loadUTF8 = NULL;
|
||||
// if(settingsPort2load) {
|
||||
// settingsPort2loadUTF8 = (*env)->GetStringUTFChars(env, settingsPort2load , NULL);
|
||||
// szNewPort2Filename = settingsPort2loadUTF8;
|
||||
// } else
|
||||
// szNewPort2Filename = _T("SHARED.BIN");
|
||||
//
|
||||
// if(_tcscmp(szPort2Filename, szNewPort2Filename) != 0) {
|
||||
// _tcscpy(szPort2Filename, szNewPort2Filename);
|
||||
// szActPort2Filename = szPort2Filename;
|
||||
// bPort2CfgChange = TRUE; // slot2 configuration changed
|
||||
//
|
||||
// // R/W port
|
||||
// if ( *szActPort2Filename != 0
|
||||
// && (BOOL) settingsAlwaysdisplog != bPort2Writeable)
|
||||
// {
|
||||
// bPort2AttChange = TRUE; // slot2 file R/W attribute changed
|
||||
// bPort2CfgChange = TRUE; // slot2 configuration changed
|
||||
// }
|
||||
// }
|
||||
// if(settingsPort2loadUTF8)
|
||||
// (*env)->ReleaseStringUTFChars(env, settingsPort2load, settingsPort2loadUTF8);
|
||||
// }
|
||||
//
|
||||
// if (bPort2CfgChange) // slot2 configuration changed
|
||||
// {
|
||||
// UINT nOldState = SwitchToState(SM_INVALID);
|
||||
//
|
||||
// UnmapPort2(); // unmap port2
|
||||
//
|
||||
//// if (bPort2AttChange) // slot2 R/W mode changed
|
||||
//// {
|
||||
//// DWORD dwFileAtt;
|
||||
////
|
||||
//// SetCurrentDirectory(szEmuDirectory);
|
||||
//// dwFileAtt = GetFileAttributes(szActPort2Filename);
|
||||
//// if (dwFileAtt != 0xFFFFFFFF)
|
||||
//// {
|
||||
//// if (IsDlgButtonChecked(hDlg,IDC_PORT2WR))
|
||||
//// dwFileAtt &= ~FILE_ATTRIBUTE_READONLY;
|
||||
//// else
|
||||
//// dwFileAtt |= FILE_ATTRIBUTE_READONLY;
|
||||
////
|
||||
//// SetFileAttributes(szActPort2Filename,dwFileAtt);
|
||||
//// }
|
||||
//// SetCurrentDirectory(szCurrentDirectory);
|
||||
//// }
|
||||
//
|
||||
// if (cCurrentRomType) // ROM defined
|
||||
// {
|
||||
// MapPort2(szActPort2Filename);
|
||||
//
|
||||
// // port2 changed and card detection enabled
|
||||
// if ( (bPort2AttChange || Chipset.wPort2Crc != wPort2Crc)
|
||||
// && (Chipset.IORam[CARDCTL] & ECDT) != 0 && (Chipset.IORam[TIMER2_CTRL] & RUN) != 0
|
||||
// )
|
||||
// {
|
||||
// Chipset.HST |= MP; // set Module Pulled
|
||||
// IOBit(SRQ2,NINT,FALSE); // set NINT to low
|
||||
// Chipset.SoftInt = TRUE; // set interrupt
|
||||
// bInterrupt = TRUE;
|
||||
// }
|
||||
// // save fingerprint of port2
|
||||
// Chipset.wPort2Crc = wPort2Crc;
|
||||
// }
|
||||
// SwitchToState(nOldState);
|
||||
// }
|
||||
//}
|
||||
|
||||
JNIEXPORT void JNICALL Java_com_regis_cosnier_emu48_NativeLib_setConfiguration(JNIEnv *env, jobject thisz, jstring key, jint isDynamic, jint intValue1, jint intValue2, jstring stringValue) {
|
||||
const char *configKey = (*env)->GetStringUTFChars(env, key, NULL) ;
|
||||
const char *configStringValue = stringValue ? (*env)->GetStringUTFChars(env, stringValue, NULL) : NULL;
|
||||
|
@ -734,6 +686,11 @@ JNIEXPORT jboolean JNICALL Java_com_regis_cosnier_emu48_NativeLib_isPortExtensio
|
|||
return (cCurrentRomType=='S' || cCurrentRomType=='G' || cCurrentRomType==0 ? JNI_TRUE : JNI_FALSE);
|
||||
}
|
||||
|
||||
JNIEXPORT jint JNICALL Java_com_regis_cosnier_emu48_NativeLib_getState(JNIEnv *env, jobject thisz) {
|
||||
return nState;
|
||||
}
|
||||
|
||||
|
||||
//p Read5(0x7050E)
|
||||
// -> $1 = 461076
|
||||
//p Read5(0x70914)
|
||||
|
|
|
@ -593,11 +593,9 @@ HGLOBAL WINAPI GlobalFree(HGLOBAL hMem) {
|
|||
}
|
||||
|
||||
BOOL GetOpenFileName(LPOPENFILENAME openFilename) {
|
||||
//return mainViewGetOpenFileNameCallback(openFilename);
|
||||
return FALSE;
|
||||
}
|
||||
BOOL GetSaveFileName(LPOPENFILENAME openFilename) {
|
||||
//return mainViewGetSaveFileNameCallback(openFilename);
|
||||
return FALSE;
|
||||
}
|
||||
|
||||
|
@ -618,7 +616,7 @@ BOOL PostMessage(HWND hWnd, UINT Msg, WPARAM wParam, LPARAM lParam) {
|
|||
|
||||
int MessageBox(HANDLE h, LPCTSTR szMessage, LPCTSTR title, int flags)
|
||||
{
|
||||
int result = IDOK;
|
||||
// int result = IDOK;
|
||||
//#if !TARGET_OS_IPHONE
|
||||
// NSAlert *alert = [[NSAlert alloc] init];
|
||||
// [alert setMessageText: NSLocalizedString([NSString stringWithUTF8String: szMessage],@"")];
|
||||
|
@ -654,7 +652,8 @@ int MessageBox(HANDLE h, LPCTSTR szMessage, LPCTSTR title, int flags)
|
|||
// result = NSAlertFirstButtonReturn ? IDYES :
|
||||
// NSAlertSecondButtonReturn ? IDCANCEL : IDNO;
|
||||
//#endif
|
||||
return result;
|
||||
|
||||
return showAlert(szMessage, flags);
|
||||
}
|
||||
|
||||
DWORD timeGetTime(void)
|
||||
|
|
88
app/src/main/java/com/regis/cosnier/emu48/InfoActivity.java
Normal file
88
app/src/main/java/com/regis/cosnier/emu48/InfoActivity.java
Normal file
|
@ -0,0 +1,88 @@
|
|||
package com.regis.cosnier.emu48;
|
||||
|
||||
import android.app.ActionBar;
|
||||
import android.app.Activity;
|
||||
import android.os.Bundle;
|
||||
import android.text.method.ScrollingMovementMethod;
|
||||
import android.text.util.Linkify;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.widget.TextView;
|
||||
|
||||
import java.io.IOException;
|
||||
import java.io.InputStream;
|
||||
|
||||
public class InfoActivity extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_info);
|
||||
|
||||
// Show the Up button in the action bar.
|
||||
ActionBar actionBar = getActionBar();
|
||||
if(actionBar != null) {
|
||||
actionBar.setDisplayShowHomeEnabled(true);
|
||||
actionBar.setDisplayShowTitleEnabled(true);
|
||||
actionBar.setDisplayHomeAsUpEnabled(true);
|
||||
}
|
||||
|
||||
String filepath = getString(R.string.info_readme);
|
||||
|
||||
// Programmatically load text from an asset and place it into the
|
||||
// text view. Note that the text we are loading is ASCII, so we
|
||||
// need to convert it to UTF-16.
|
||||
try {
|
||||
InputStream is = getAssets().open(filepath);
|
||||
|
||||
// We guarantee that the available method returns the total
|
||||
// size of the asset... of course, this does mean that a single
|
||||
// asset can't be more than 2 gigs.
|
||||
int size = is.available();
|
||||
|
||||
// Read the entire asset into a local byte buffer.
|
||||
byte[] buffer = new byte[size];
|
||||
//noinspection ResultOfMethodCallIgnored
|
||||
is.read(buffer);
|
||||
is.close();
|
||||
|
||||
// Convert the buffer into a string.
|
||||
String text = new String(buffer);
|
||||
|
||||
// Finally stick the string into the text view.
|
||||
TextView textViewInfo = (TextView)findViewById(R.id.textViewInfo);
|
||||
textViewInfo.setMovementMethod(new ScrollingMovementMethod());
|
||||
textViewInfo.setText(text);
|
||||
Linkify.addLinks(textViewInfo, Linkify.ALL);
|
||||
} catch (IOException e) {
|
||||
// Should never happen!
|
||||
//throw new RuntimeException(e);
|
||||
}
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
//getMenuInflater().inflate(R.menu.activity_info, menu);
|
||||
return false; //true;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
// This ID represents the Home or Up button. In the case of this
|
||||
// activity, the Up button is shown. Use NavUtils to allow users
|
||||
// to navigate up one level in the application structure. For
|
||||
// more details, see the Navigation pattern on Android Design:
|
||||
//
|
||||
// http://developer.android.com/design/patterns/navigation.html#up-vs-back
|
||||
//
|
||||
//NavUtils.navigateUpFromSameTask(this);
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
}
|
|
@ -0,0 +1,53 @@
|
|||
package com.regis.cosnier.emu48;
|
||||
|
||||
import android.app.Activity;
|
||||
import android.graphics.Color;
|
||||
import android.os.Bundle;
|
||||
import android.view.Menu;
|
||||
import android.view.MenuItem;
|
||||
import android.view.View;
|
||||
import android.webkit.WebView;
|
||||
|
||||
public class InfoWebActivity extends Activity {
|
||||
|
||||
@Override
|
||||
protected void onCreate(Bundle savedInstanceState) {
|
||||
super.onCreate(savedInstanceState);
|
||||
setContentView(R.layout.activity_web_info);
|
||||
// Show the Up button in the action bar.
|
||||
//getActionBar().setDisplayHomeAsUpEnabled(true);
|
||||
|
||||
WebView webView = (WebView)findViewById(R.id.webViewInfo);
|
||||
// webView.setScrollBarStyle(View.SCROLLBARS_INSIDE_OVERLAY);
|
||||
// webView.setBackgroundColor(Color.LTGRAY);
|
||||
String url = getString(R.string.help_url);
|
||||
webView.loadUrl(url);
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onCreateOptionsMenu(Menu menu) {
|
||||
// Inflate the menu; this adds items to the action bar if it is present.
|
||||
//getMenuInflater().inflate(R.menu.activity_info, menu);
|
||||
//return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
@Override
|
||||
public boolean onOptionsItemSelected(MenuItem item) {
|
||||
switch (item.getItemId()) {
|
||||
case android.R.id.home:
|
||||
// This ID represents the Home or Up button. In the case of this
|
||||
// activity, the Up button is shown. Use NavUtils to allow users
|
||||
// to navigate up one level in the application structure. For
|
||||
// more details, see the Navigation pattern on Android Design:
|
||||
//
|
||||
// http://developer.android.com/design/patterns/navigation.html#up-vs-back
|
||||
//
|
||||
//NavUtils.navigateUpFromSameTask(this);
|
||||
finish();
|
||||
return true;
|
||||
}
|
||||
return super.onOptionsItemSelected(item);
|
||||
}
|
||||
|
||||
}
|
|
@ -289,6 +289,7 @@ public class MainActivity extends AppCompatActivity
|
|||
private void updateNavigationDrawerItems() {
|
||||
Menu menu = navigationView.getMenu();
|
||||
boolean isDocumentAvailable = NativeLib.isDocumentAvailable();
|
||||
boolean isBackup = NativeLib.isBackup();
|
||||
menu.findItem(R.id.nav_save).setEnabled(isDocumentAvailable);
|
||||
menu.findItem(R.id.nav_save_as).setEnabled(isDocumentAvailable);
|
||||
menu.findItem(R.id.nav_close).setEnabled(isDocumentAvailable);
|
||||
|
@ -299,10 +300,9 @@ public class MainActivity extends AppCompatActivity
|
|||
menu.findItem(R.id.nav_paste_stack).setEnabled(isDocumentAvailable);
|
||||
menu.findItem(R.id.nav_reset_calculator).setEnabled(isDocumentAvailable);
|
||||
menu.findItem(R.id.nav_backup_save).setEnabled(isDocumentAvailable);
|
||||
menu.findItem(R.id.nav_backup_restore).setEnabled(isDocumentAvailable);
|
||||
menu.findItem(R.id.nav_backup_delete).setEnabled(isDocumentAvailable);
|
||||
menu.findItem(R.id.nav_backup_restore).setEnabled(isDocumentAvailable && isBackup);
|
||||
menu.findItem(R.id.nav_backup_delete).setEnabled(isDocumentAvailable && isBackup);
|
||||
menu.findItem(R.id.nav_change_kml_script).setEnabled(isDocumentAvailable);
|
||||
|
||||
}
|
||||
|
||||
class KMLScriptItem {
|
||||
|
@ -577,11 +577,42 @@ public class MainActivity extends AppCompatActivity
|
|||
|
||||
}
|
||||
private void OnViewScript() {
|
||||
//NativeLib.onViewScript();
|
||||
extractKMLScripts();
|
||||
|
||||
if (NativeLib.getState() != 0 /*SM_RUN*/)
|
||||
{
|
||||
showAlert("You cannot change the KML script when Emu48 is not running.\n"
|
||||
+ "Use the File,New menu item to create a new calculator.");
|
||||
return;
|
||||
}
|
||||
final ArrayList<KMLScriptItem> kmlScriptsForCurrentModel = new ArrayList<>();
|
||||
char m = (char)NativeLib.getCurrentModel();
|
||||
for (int i = 0; i < kmlScripts.size(); i++) {
|
||||
KMLScriptItem kmlScriptItem = kmlScripts.get(i);
|
||||
if (kmlScriptItem.model.charAt(0) == m)
|
||||
kmlScriptsForCurrentModel.add(kmlScriptItem);
|
||||
}
|
||||
|
||||
final String[] kmlScriptTitles = new String[kmlScriptsForCurrentModel.size()];
|
||||
for (int i = 0; i < kmlScriptsForCurrentModel.size(); i++)
|
||||
kmlScriptTitles[i] = kmlScriptsForCurrentModel.get(i).title;
|
||||
new AlertDialog.Builder(MainActivity.this)
|
||||
.setTitle("Pick a calculator")
|
||||
.setItems(kmlScriptTitles, new DialogInterface.OnClickListener() {
|
||||
@Override
|
||||
public void onClick(DialogInterface dialog, int which) {
|
||||
String kmlScriptFilename = kmlScriptsForCurrentModel.get(which).filename;
|
||||
NativeLib.onViewScript(kmlScriptFilename);
|
||||
showKMLLog();
|
||||
updateNavigationDrawerItems();
|
||||
}
|
||||
}).show();
|
||||
}
|
||||
private void OnTopics() {
|
||||
startActivity(new Intent(this, InfoWebActivity.class));
|
||||
}
|
||||
private void OnAbout() {
|
||||
startActivity(new Intent(this, InfoActivity.class));
|
||||
}
|
||||
|
||||
@Override
|
||||
|
@ -687,6 +718,10 @@ public class MainActivity extends AppCompatActivity
|
|||
return fd;
|
||||
}
|
||||
|
||||
void showAlert(String text) {
|
||||
Snackbar.make(getWindow().getDecorView().getRootView(), "text", Snackbar.LENGTH_LONG).setAction("Action", null).show();
|
||||
}
|
||||
|
||||
private void updateFromPreferences(String key, boolean isDynamic) {
|
||||
int isDynamicValue = isDynamic ? 1 : 0;
|
||||
if(key == null) {
|
||||
|
|
|
@ -14,7 +14,6 @@ public class NativeLib {
|
|||
|
||||
public static native void start(AssetManager mgr, Bitmap bitmapMainScreen, MainActivity activity, MainScreenView view);
|
||||
public static native void stop();
|
||||
//public static native void resize(int width, int height);
|
||||
public static native void draw();
|
||||
public static native void buttonDown(int x, int y);
|
||||
public static native void buttonUp(int x, int y);
|
||||
|
@ -25,6 +24,7 @@ public class NativeLib {
|
|||
public static native boolean isDocumentAvailable();
|
||||
public static native String getCurrentFilename();
|
||||
public static native int getCurrentModel();
|
||||
public static native boolean isBackup();
|
||||
public static native String getKMLLog();
|
||||
|
||||
public static native int onFileNew(String kmlFilename);
|
||||
|
@ -38,10 +38,12 @@ public class NativeLib {
|
|||
public static native void onStackCopy();
|
||||
public static native void onStackPaste();
|
||||
public static native void onViewReset();
|
||||
public static native void onViewScript(String kmlFilename);
|
||||
public static native void onBackupSave();
|
||||
public static native void onBackupRestore();
|
||||
public static native void onBackupDelete();
|
||||
|
||||
public static native void setConfiguration(String key, int isDynamic, int intValue1, int intValue2, String stringValue);
|
||||
public static native boolean isPortExtensionPossible();
|
||||
public static native int getState();
|
||||
}
|
||||
|
|
41
app/src/main/res/layout/activity_info.xml
Normal file
41
app/src/main/res/layout/activity_info.xml
Normal file
|
@ -0,0 +1,41 @@
|
|||
<!--
|
||||
<RelativeLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
tools:context=".InfoActivity" >
|
||||
-->
|
||||
|
||||
|
||||
<!--
|
||||
<TextView
|
||||
android:id="@+id/textViewInfo"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
android:layout_centerHorizontal="true"
|
||||
android:layout_centerVertical="true"
|
||||
android:padding="5dp"
|
||||
android:scrollbars="vertical" />
|
||||
-->
|
||||
|
||||
<ScrollView xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
tools:context=".InfoActivity" >
|
||||
|
||||
<!--
|
||||
android:id="@+id/scrollViewInfo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="fill_parent"
|
||||
-->
|
||||
|
||||
<TextView
|
||||
android:id="@+id/textViewInfo"
|
||||
android:layout_width="fill_parent"
|
||||
android:layout_height="wrap_content"
|
||||
android:padding="5dp" />
|
||||
|
||||
</ScrollView>
|
||||
|
||||
<!-- </RelativeLayout> -->
|
18
app/src/main/res/layout/activity_web_info.xml
Normal file
18
app/src/main/res/layout/activity_web_info.xml
Normal file
|
@ -0,0 +1,18 @@
|
|||
<?xml version="1.0" encoding="utf-8"?>
|
||||
<androidx.constraintlayout.widget.ConstraintLayout xmlns:android="http://schemas.android.com/apk/res/android"
|
||||
xmlns:app="http://schemas.android.com/apk/res-auto"
|
||||
xmlns:tools="http://schemas.android.com/tools"
|
||||
android:layout_width="match_parent"
|
||||
android:layout_height="match_parent"
|
||||
tools:context=".InfoWebActivity">
|
||||
|
||||
<WebView
|
||||
android:id="@+id/webViewInfo"
|
||||
android:layout_width="0dp"
|
||||
android:layout_height="0dp"
|
||||
app:layout_constraintBottom_toBottomOf="parent"
|
||||
app:layout_constraintEnd_toEndOf="parent"
|
||||
app:layout_constraintStart_toStartOf="parent"
|
||||
app:layout_constraintTop_toTopOf="parent" />
|
||||
|
||||
</androidx.constraintlayout.widget.ConstraintLayout>
|
|
@ -1,4 +1,20 @@
|
|||
<resources>
|
||||
|
||||
<!-- Info Activity -->
|
||||
|
||||
<string name="title_activity_info">About</string>
|
||||
<string name="info_readme">ReadMe.txt</string>
|
||||
|
||||
<!-- Info Activity -->
|
||||
<string name="title_web_activity_info">Help</string>
|
||||
<string name="help_url">file:///android_asset/Emu48.htm</string>
|
||||
|
||||
<!-- Settings Activity -->
|
||||
|
||||
<string name="title_activity_settings">Settings</string>
|
||||
|
||||
<!-- PaintByNumber Activity -->
|
||||
|
||||
<string name="app_name">Emu48</string>
|
||||
<string name="navigation_drawer_open">Open navigation drawer</string>
|
||||
<string name="navigation_drawer_close">Close navigation drawer</string>
|
||||
|
@ -6,7 +22,6 @@
|
|||
<string name="nav_header_subtitle">android.studio@android.com</string>
|
||||
<string name="nav_header_desc">Navigation header</string>
|
||||
<string name="action_settings">Settings</string>
|
||||
<string name="title_activity_settings">Settings</string>
|
||||
<string name="nav_new">New...</string>
|
||||
<string name="nav_open">Open...</string>
|
||||
<string name="nav_save">Save</string>
|
||||
|
@ -16,4 +31,6 @@
|
|||
<string name="nav_save_object">Save Object...</string>
|
||||
<string name="nav_copy_screen">Copy Screen</string>
|
||||
<string name="nav_copy_stack">Copy Stack</string>
|
||||
|
||||
|
||||
</resources>
|
||||
|
|
Loading…
Add table
Reference in a new issue