From 2e194483588380b62950c225748364bad13fd939 Mon Sep 17 00:00:00 2001 From: dgis Date: Sun, 30 Jun 2019 23:11:37 +0200 Subject: [PATCH] Add the support of the macros. --- ReadMe.txt | 15 +-- app/src/main/assets/ReadMe.txt | 20 +++- app/src/main/cpp/emu-jni.c | 32 +++++++ app/src/main/cpp/win32-layer.c | 18 +++- app/src/main/cpp/win32-layer.h | 4 +- .../org/emulator/calculator/NativeLib.java | 5 + .../emulator/forty/eight/MainActivity.java | 92 +++++++++++++++---- .../forty/eight/SettingsActivity.java | 17 ++++ .../ic_fiber_manual_record_black_24dp.xml | 10 ++ .../res/drawable/ic_play_arrow_black_24dp.xml | 10 ++ .../main/res/drawable/ic_stop_black_24dp.xml | 10 ++ .../main/res/menu/activity_main_drawer.xml | 12 +++ app/src/main/res/values/strings.xml | 9 ++ app/src/main/res/xml/pref_general.xml | 15 +++ 14 files changed, 234 insertions(+), 35 deletions(-) create mode 100644 app/src/main/res/drawable/ic_fiber_manual_record_black_24dp.xml create mode 100644 app/src/main/res/drawable/ic_play_arrow_black_24dp.xml create mode 100644 app/src/main/res/drawable/ic_stop_black_24dp.xml diff --git a/ReadMe.txt b/ReadMe.txt index c5487ee..401fc21 100644 --- a/ReadMe.txt +++ b/ReadMe.txt @@ -1,8 +1,5 @@ DESCRIPTION -WARNING: WITH VERSION 1.3, THE STATUS FILE HAS BEEN MODIFIED AND IS NOW FULLY COMPATIBLE WITH THE WINDOWS VERSION AS IT SHOULD HAVE BEEN. -HOWEVER, BEFORE THE UPDATE, BACK UP YOUR DATA BECAUSE YOU COULD LOSE THEM. - This project ports the Windows application Emu48 written in C to Android. It uses the Android NDK. The former Emu48 source code (written by Sébastien Carlier and Christoph Giesselink) remains untouched because of a thin win32 emulation layer above Linux/NDK! This win32 layer will allow to easily update from the original Emu48 source code. @@ -52,7 +49,6 @@ NOT WORKING YET - Disassembler - Debugger -- Macro - Serial Ports (Wire or Ir) @@ -61,14 +57,15 @@ CHANGES Version 1.5 (2019-06-xx) - Add the printer simulator (set delay to 0 to speed up!). +- Add the macro support. - Refactor the code for easier code sharing between Emu48, Emu42 and Emu71. - Fix: Bad text characters when copy/paste the stack. - Fix: Selecting an empty KML folder prevent to select the default embedded KML folder (Github Fix: #5)! - Fix a crash with waveOutClose(). - Fix an issue with the Pan and zoom which was possible after closing the calc. -- Prevent the ESC key from leaving the application. -- Map the keyboard DELETE key like it should. -- Map the keyboard +/= key to the + key and the _/- key to the - (US keyboard). +- Prevent the ESC key from leaving the application (Github Fix: #6). +- Map the keyboard DELETE key like it should (Github Fix: #6). +- Map the +, -, * and / keys catching the typed character instead of the virtual key (Github Fix: #6). Version 1.4 (2019-06-08) @@ -146,12 +143,11 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY 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. Note: some included files are not covered by the GPL; these include ROM image files (copyrighted by HP), KML files and faceplate images (copyrighted by their authors). -The Eric's Real scripts ("real*.kml" and "real*.bmp") are embedded in this application with the kind permission of Eric Rechlin. +The Eric's Real scripts ("real*.kml" and "real*.bmp/png") are embedded in this application with the kind permission of Eric Rechlin. TODO -- Make the regular (not keypad) '*', and '/' work (#6). - In Chrome OS: - The timezone seems to be GMT (localtime_r not right?)! - sometimes there is no OK button in the KML Script Compilation Result. @@ -159,7 +155,6 @@ TODO - The clock seems unsynchronized sometimes. - Add KML script loading dependencies fallback to the inner ROM (and may be KML include?). - Add a separation between the pixels (Suggestion from Jaime Meza). -- Change the logo following the template. BUILD diff --git a/app/src/main/assets/ReadMe.txt b/app/src/main/assets/ReadMe.txt index 263a9c4..0b19be5 100644 --- a/app/src/main/assets/ReadMe.txt +++ b/app/src/main/assets/ReadMe.txt @@ -1,8 +1,5 @@ DESCRIPTION -WARNING: WITH VERSION 1.3, THE STATUS FILE HAS BEEN MODIFIED AND IS NOW FULLY COMPATIBLE WITH THE WINDOWS VERSION AS IT SHOULD HAVE BEEN. -HOWEVER, BEFORE THE UPDATE, BACK UP YOUR DATA BECAUSE YOU COULD LOSE THEM. - This project ports the Windows application Emu48 written in C to Android. It uses the Android NDK. The former Emu48 source code (written by Sébastien Carlier and Christoph Giesselink) remains untouched because of a thin win32 emulation layer above Linux/NDK! This win32 layer will allow to easily update from the original Emu48 source code. @@ -45,6 +42,7 @@ NOTES * pick the calculator (which should be "Eric's Real 50g (Large Cropped)")! And because, the file "FOLDER/rom.49g" is not readonly anymore, you can save your port 2. BUT for the moment, it is saved ONLY when you CLOSE (or change) the state file. Not when you end the application. +- To speed up printing, set the 'delay' to 0 in the calculator's print options. NOT WORKING YET @@ -52,12 +50,24 @@ NOT WORKING YET - Disassembler - Debugger - Macro -- Infrared Printer - Serial Ports (Wire or Ir) CHANGES +Version 1.5 (2019-06-xx) + +- Add the printer simulator (set delay to 0 to speed up!). +- Refactor the code for easier code sharing between Emu48, Emu42 and Emu71. +- Fix: Bad text characters when copy/paste the stack. +- Fix: Selecting an empty KML folder prevent to select the default embedded KML folder (Github Fix: #5)! +- Fix a crash with waveOutClose(). +- Fix an issue with the Pan and zoom which was possible after closing the calc. +- Prevent the ESC key from leaving the application (Github Fix: #6). +- Map the keyboard DELETE key like it should (Github Fix: #6). +- Map the +, -, * and / keys catching the typed character instead of the virtual key (Github Fix: #6). + + Version 1.4 (2019-06-08) - Add an optional menu button in the top left corner. @@ -133,4 +143,4 @@ This program is distributed in the hope that it will be useful, but WITHOUT ANY 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. Note: some included files are not covered by the GPL; these include ROM image files (copyrighted by HP), KML files and faceplate images (copyrighted by their authors). -The Eric's Real scripts ("real*.kml" and "real*.bmp") are embedded in this application with the kind permission of Eric Rechlin. \ No newline at end of file +The Eric's Real scripts ("real*.kml" and "real*.bmp/png") are embedded in this application with the kind permission of Eric Rechlin. diff --git a/app/src/main/cpp/emu-jni.c b/app/src/main/cpp/emu-jni.c index 13801ae..9547e62 100644 --- a/app/src/main/cpp/emu-jni.c +++ b/app/src/main/cpp/emu-jni.c @@ -480,6 +480,10 @@ JNIEXPORT jint JNICALL Java_org_emulator_calculator_NativeLib_getGlobalColor(JNI return (jint) dwTColor; } +JNIEXPORT jint JNICALL Java_org_emulator_calculator_NativeLib_getMacroState(JNIEnv *env, jobject thisz) { + return nMacroState; +} + JNIEXPORT jint JNICALL Java_org_emulator_calculator_NativeLib_onFileNew(JNIEnv *env, jobject thisz, jstring kmlFilename) { if (bDocumentAvail) @@ -955,6 +959,31 @@ JNIEXPORT void JNICALL Java_org_emulator_calculator_NativeLib_onBackupDelete(JNI ResetBackup(); } +JNIEXPORT void JNICALL Java_org_emulator_calculator_NativeLib_onToolMacroNew(JNIEnv *env, jobject thisz, jstring filename) { + const char *filenameUTF8 = (*env)->GetStringUTFChars(env, filename , NULL); + _tcscpy(getSaveObjectFilenameResult, filenameUTF8); + (*env)->ReleaseStringUTFChars(env, filename, filenameUTF8); + currentDialogBoxMode = DialogBoxMode_SAVE_MACRO; + OnToolMacroNew(); + getSaveObjectFilenameResult[0] = 0; + currentDialogBoxMode = DialogBoxMode_UNKNOWN; +} + +JNIEXPORT void JNICALL Java_org_emulator_calculator_NativeLib_onToolMacroPlay(JNIEnv *env, jobject thisz, jstring filename) { + const char *filenameUTF8 = (*env)->GetStringUTFChars(env, filename , NULL); + _tcscpy(getSaveObjectFilenameResult, filenameUTF8); + (*env)->ReleaseStringUTFChars(env, filename, filenameUTF8); + currentDialogBoxMode = DialogBoxMode_OPEN_MACRO; + OnToolMacroPlay(); + getSaveObjectFilenameResult[0] = 0; + currentDialogBoxMode = DialogBoxMode_UNKNOWN; +} + +JNIEXPORT void JNICALL Java_org_emulator_calculator_NativeLib_onToolMacroStop(JNIEnv *env, jobject thisz) { + OnToolMacroStop(); +} + + JNIEXPORT void JNICALL Java_org_emulator_calculator_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; @@ -983,6 +1012,9 @@ JNIEXPORT void JNICALL Java_org_emulator_calculator_NativeLib_setConfiguration(J SoundOpen(uWaveDevId); soundEnabled = TRUE; } + } else if(_tcscmp(_T("settings_macro"), configKey) == 0) { + bMacroRealSpeed = (BOOL)intValue1; + nMacroTimeout = 500 - intValue2; } else if(_tcscmp(_T("settings_port1"), configKey) == 0) { BOOL settingsPort1en = (BOOL) intValue1; BOOL settingsPort1wr = (BOOL) intValue2; diff --git a/app/src/main/cpp/win32-layer.c b/app/src/main/cpp/win32-layer.c index 6abc6c7..db3684f 100644 --- a/app/src/main/cpp/win32-layer.c +++ b/app/src/main/cpp/win32-layer.c @@ -513,6 +513,9 @@ int UnlockedWaitForEvent(HANDLE hHandle, uint64_t milliseconds) if (milliseconds != (uint64_t) -1) { result = pthread_cond_timedwait(&hHandle->eventCVariable, &hHandle->eventMutex, &ts); + THREAD_LOGD("UnlockedWaitForEvent() pthread_cond_timedwait() for event %x return %d", hHandle, result); + if(result == ETIMEDOUT) + result = WAIT_TIMEOUT; } else { @@ -799,6 +802,15 @@ HGLOBAL WINAPI GlobalFree(HGLOBAL hMem) { } BOOL GetOpenFileName(LPOPENFILENAME openFilename) { + if(openFilename) { + if(currentDialogBoxMode == DialogBoxMode_OPEN_MACRO) { + openFilename->nMaxFile = MAX_PATH; + openFilename->nFileExtension = 1; + //openFilename->lpstrFile = getSaveObjectFilenameResult; + _tcsncpy(openFilename->lpstrFile, getSaveObjectFilenameResult, openFilename->nMaxFile); + return TRUE; + } + } return FALSE; } @@ -806,10 +818,12 @@ TCHAR getSaveObjectFilenameResult[MAX_PATH]; BOOL GetSaveFileName(LPOPENFILENAME openFilename) { if(openFilename) { if(currentDialogBoxMode == DialogBoxMode_SET_USRPRG32 - || currentDialogBoxMode == DialogBoxMode_SET_USRPRG42) { + || currentDialogBoxMode == DialogBoxMode_SET_USRPRG42 + || currentDialogBoxMode == DialogBoxMode_SAVE_MACRO) { openFilename->nMaxFile = MAX_PATH; openFilename->nFileExtension = 1; - openFilename->lpstrFile = getSaveObjectFilenameResult; + //openFilename->lpstrFile = getSaveObjectFilenameResult; + _tcsncpy(openFilename->lpstrFile, getSaveObjectFilenameResult, openFilename->nMaxFile); return TRUE; } } diff --git a/app/src/main/cpp/win32-layer.h b/app/src/main/cpp/win32-layer.h index d524ed5..5874f3d 100644 --- a/app/src/main/cpp/win32-layer.h +++ b/app/src/main/cpp/win32-layer.h @@ -1255,7 +1255,9 @@ enum DialogBoxMode { DialogBoxMode_GET_USRPRG32, DialogBoxMode_SET_USRPRG32, DialogBoxMode_GET_USRPRG42, - DialogBoxMode_SET_USRPRG42 + DialogBoxMode_SET_USRPRG42, + DialogBoxMode_OPEN_MACRO, + DialogBoxMode_SAVE_MACRO }; extern enum DialogBoxMode currentDialogBoxMode; extern BOOL securityExceptionOccured; diff --git a/app/src/main/java/org/emulator/calculator/NativeLib.java b/app/src/main/java/org/emulator/calculator/NativeLib.java index e21b46c..2c22b01 100644 --- a/app/src/main/java/org/emulator/calculator/NativeLib.java +++ b/app/src/main/java/org/emulator/calculator/NativeLib.java @@ -44,6 +44,7 @@ public class NativeLib { public static native boolean getPort1Writable(); public static native boolean getSoundEnabled(); public static native int getGlobalColor(); + public static native int getMacroState(); public static native int onFileNew(String kmlFilename); public static native int onFileOpen(String filename); @@ -63,6 +64,10 @@ public class NativeLib { public static native void onBackupRestore(); public static native void onBackupDelete(); + public static native void onToolMacroNew(String filename); + public static native void onToolMacroPlay(String filename); + public static native void onToolMacroStop(); + 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(); diff --git a/app/src/main/java/org/emulator/forty/eight/MainActivity.java b/app/src/main/java/org/emulator/forty/eight/MainActivity.java index 5a6b43c..5aeb535 100644 --- a/app/src/main/java/org/emulator/forty/eight/MainActivity.java +++ b/app/src/main/java/org/emulator/forty/eight/MainActivity.java @@ -105,6 +105,8 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On public static final int INTENT_PICK_KML_FOLDER_FOR_SETTINGS = 9; public static final int INTENT_PICK_KML_FOLDER_FOR_SECURITY = 10; public static final int INTENT_CREATE_RAM_CARD = 11; + public static final int INTENT_MACRO_LOAD = 12; + public static final int INTENT_MACRO_SAVE = 13; private String kmlMimeType = "application/vnd.google-earth.kml+xml"; private boolean kmlFolderUseDefault = true; @@ -370,6 +372,12 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On OnViewPrinter(); } else if (id == R.id.nav_create_ram_card) { OnCreateRAMCard(); + } else if (id == R.id.nav_macro_record) { + OnMacroRecord(); + } else if (id == R.id.nav_macro_play) { + OnMacroPlay(); + } else if (id == R.id.nav_macro_stop) { + OnMacroStop(); } else if (id == R.id.nav_help) { OnTopics(); } else if (id == R.id.nav_about) { @@ -401,26 +409,29 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On private void updateNavigationDrawerItems() { Menu menu = navigationView.getMenu(); - boolean isDocumentAvailable = NativeLib.isDocumentAvailable(); boolean isBackup = NativeLib.isBackup(); int cCurrentRomType = NativeLib.getCurrentModel(); - //int nState = NativeLib.getState(); - //boolean bRun = (nState == 0 /* SM_RUN */ || nState == 3 /* SM_SLEEP */); + int nMacroState = NativeLib.getMacroState(); + + boolean uRun = NativeLib.isDocumentAvailable(); boolean bStackEnable = cCurrentRomType!='6' && cCurrentRomType!='A' && cCurrentRomType!='E' && cCurrentRomType!='P'; // CdB for HP: add apples - 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); - menu.findItem(R.id.nav_load_object).setEnabled(isDocumentAvailable && bStackEnable); - menu.findItem(R.id.nav_save_object).setEnabled(isDocumentAvailable && bStackEnable); - menu.findItem(R.id.nav_copy_screen).setEnabled(isDocumentAvailable); - menu.findItem(R.id.nav_copy_stack).setEnabled(isDocumentAvailable && bStackEnable); - menu.findItem(R.id.nav_paste_stack).setEnabled(isDocumentAvailable && bStackEnable); - 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 && isBackup); - menu.findItem(R.id.nav_backup_delete).setEnabled(isDocumentAvailable && isBackup); - menu.findItem(R.id.nav_change_kml_script).setEnabled(isDocumentAvailable); + menu.findItem(R.id.nav_save).setEnabled(uRun); + menu.findItem(R.id.nav_save_as).setEnabled(uRun); + menu.findItem(R.id.nav_close).setEnabled(uRun); + menu.findItem(R.id.nav_load_object).setEnabled(uRun && bStackEnable); + menu.findItem(R.id.nav_save_object).setEnabled(uRun && bStackEnable); + menu.findItem(R.id.nav_copy_screen).setEnabled(uRun); + menu.findItem(R.id.nav_copy_stack).setEnabled(uRun && bStackEnable); + menu.findItem(R.id.nav_paste_stack).setEnabled(uRun && bStackEnable); + menu.findItem(R.id.nav_reset_calculator).setEnabled(uRun); + menu.findItem(R.id.nav_backup_save).setEnabled(uRun); + menu.findItem(R.id.nav_backup_restore).setEnabled(uRun && isBackup); + menu.findItem(R.id.nav_backup_delete).setEnabled(uRun && isBackup); + menu.findItem(R.id.nav_change_kml_script).setEnabled(uRun); + menu.findItem(R.id.nav_macro_record).setEnabled(uRun && nMacroState == 0 /* MACRO_OFF */); + menu.findItem(R.id.nav_macro_play).setEnabled(uRun && nMacroState == 0 /* MACRO_OFF */); + menu.findItem(R.id.nav_macro_stop).setEnabled(uRun && nMacroState != 0 /* MACRO_OFF */); } class KMLScriptItem { @@ -949,6 +960,32 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On }).show(); } + private void OnMacroRecord() { + Intent intent = new Intent(Intent.ACTION_CREATE_DOCUMENT); + intent.addCategory(Intent.CATEGORY_OPENABLE); + intent.setType("*/*"); + intent.putExtra(Intent.EXTRA_TITLE, "emu48-macro.mac"); + startActivityForResult(intent, INTENT_MACRO_SAVE); + } + + private void OnMacroPlay() { + Intent intent = new Intent(Intent.ACTION_OPEN_DOCUMENT); + intent.addCategory(Intent.CATEGORY_OPENABLE); + intent.setType("*/*"); + intent.putExtra(Intent.EXTRA_TITLE, "emu48-macro.mac"); + startActivityForResult(intent, INTENT_MACRO_LOAD); + } + + private void OnMacroStop() { + runOnUiThread(new Runnable() { + @Override + public void run() { + NativeLib.onToolMacroStop(); + updateNavigationDrawerItems(); + } + }); + } + private void OnTopics() { startActivity(new Intent(this, InfoWebActivity.class)); } @@ -1090,6 +1127,18 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On break; } + case INTENT_MACRO_LOAD: { + //Log.d(TAG, "onActivityResult INTENT_MACRO_LOAD " + url); + NativeLib.onToolMacroPlay(url); + updateNavigationDrawerItems(); + break; + } + case INTENT_MACRO_SAVE: { + //Log.d(TAG, "onActivityResult INTENT_MACRO_SAVE " + url); + NativeLib.onToolMacroNew(url); + updateNavigationDrawerItems(); + break; + } default: break; } @@ -1324,6 +1373,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On case 24: // TOOL_MACRO_PLAY break; case 25: // TOOL_MACRO_STOP + OnMacroStop(); break; case 26: // TOOL_MACRO_SETTINGS break; @@ -1405,7 +1455,7 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On String[] settingKeys = { "settings_realspeed", "settings_grayscale", "settings_rotation", "settings_auto_layout", "settings_hide_bar", "settings_hide_button_menu", "settings_sound_volume", "settings_haptic_feedback", - "settings_background_kml_color", "settings_background_fallback_color", "settings_printer_model", + "settings_background_kml_color", "settings_background_fallback_color", "settings_printer_model", "settings_macro", "settings_kml", "settings_port1", "settings_port2" }; for (String settingKey : settingKeys) { updateFromPreferences(settingKey, false); @@ -1484,6 +1534,14 @@ public class MainActivity extends AppCompatActivity implements NavigationView.On kmFolderChange = true; break; + case "settings_macro": + case "settings_macro_real_speed": + case "settings_macro_manual_speed": + boolean macroRealSpeed = sharedPreferences.getBoolean("settings_macro_real_speed", true); + int macroManualSpeed = sharedPreferences.getInt("settings_macro_manual_speed", 500); + NativeLib.setConfiguration("settings_macro", isDynamicValue, macroRealSpeed ? 1 : 0, macroManualSpeed, null); + break; + case "settings_port1": case "settings_port1en": case "settings_port1wr": diff --git a/app/src/main/java/org/emulator/forty/eight/SettingsActivity.java b/app/src/main/java/org/emulator/forty/eight/SettingsActivity.java index 5dda635..c818dda 100644 --- a/app/src/main/java/org/emulator/forty/eight/SettingsActivity.java +++ b/app/src/main/java/org/emulator/forty/eight/SettingsActivity.java @@ -158,6 +158,23 @@ public class SettingsActivity extends AppCompatActivity implements SharedPrefere // onPreferenceChangeListenerBackgroundCustomColor.onPreferenceChange(preferenceBackgroundCustomColor, sharedPreferences.getBoolean(preferenceBackgroundCustomColor.getKey(), false)); } + // Macro + + Preference preferenceMacroRealSpeed = findPreference("settings_macro_real_speed"); + final Preference preferenceMacroManualSpeed = findPreference("settings_macro_manual_speed"); + if(preferenceMacroRealSpeed != null && preferenceMacroManualSpeed != null) { + Preference.OnPreferenceChangeListener onPreferenceChangeListenerMacroRealSpeed = new Preference.OnPreferenceChangeListener() { + @Override + public boolean onPreferenceChange(Preference preference, Object value) { + if(value != null) + preferenceMacroManualSpeed.setEnabled(!(Boolean) value); + return true; + } + }; + preferenceMacroRealSpeed.setOnPreferenceChangeListener(onPreferenceChangeListenerMacroRealSpeed); + onPreferenceChangeListenerMacroRealSpeed.onPreferenceChange(preferenceMacroRealSpeed, sharedPreferences.getBoolean(preferenceMacroRealSpeed.getKey(), true)); + } + // Ports 1 & 2 settings final Preference preferencePort1en = findPreference("settings_port1en"); diff --git a/app/src/main/res/drawable/ic_fiber_manual_record_black_24dp.xml b/app/src/main/res/drawable/ic_fiber_manual_record_black_24dp.xml new file mode 100644 index 0000000..29a8e6b --- /dev/null +++ b/app/src/main/res/drawable/ic_fiber_manual_record_black_24dp.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_play_arrow_black_24dp.xml b/app/src/main/res/drawable/ic_play_arrow_black_24dp.xml new file mode 100644 index 0000000..d3e58c4 --- /dev/null +++ b/app/src/main/res/drawable/ic_play_arrow_black_24dp.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/drawable/ic_stop_black_24dp.xml b/app/src/main/res/drawable/ic_stop_black_24dp.xml new file mode 100644 index 0000000..664ef3e --- /dev/null +++ b/app/src/main/res/drawable/ic_stop_black_24dp.xml @@ -0,0 +1,10 @@ + + + + \ No newline at end of file diff --git a/app/src/main/res/menu/activity_main_drawer.xml b/app/src/main/res/menu/activity_main_drawer.xml index 7ffbb00..f3a1d44 100644 --- a/app/src/main/res/menu/activity_main_drawer.xml +++ b/app/src/main/res/menu/activity_main_drawer.xml @@ -100,6 +100,18 @@ android:id="@+id/nav_create_ram_card" android:icon="@drawable/ic_memory_black_24dp" android:title="@string/nav_create_ram_card" /> + + + diff --git a/app/src/main/res/values/strings.xml b/app/src/main/res/values/strings.xml index b9a168c..814631d 100644 --- a/app/src/main/res/values/strings.xml +++ b/app/src/main/res/values/strings.xml @@ -41,6 +41,11 @@ Show the Printer Simulator... Tool Create RAM Card... + Record Macro... + Play Macro... + Macro Stop + + Help Help About Emu48... @@ -120,4 +125,8 @@ Printer Model You can choose the printer model + Macro + Use Real Replay Speed + Manual Replay Speed + diff --git a/app/src/main/res/xml/pref_general.xml b/app/src/main/res/xml/pref_general.xml index 73d6853..627d77e 100644 --- a/app/src/main/res/xml/pref_general.xml +++ b/app/src/main/res/xml/pref_general.xml @@ -108,6 +108,21 @@ /> + + + + + +