Add in-app file import and episode picker
Assets (ROMs and disk images) now live in getExternalFilesDir, making
them accessible via USB file transfer and any file manager app without
adb or root.
- "Import ROMs" button walks through kernal/basic/chargen picks in
sequence and restarts the emulator when done
- "Import Disks" button opens a multi-select picker; files are saved
as SCHWUM<N><P>.D64 (uppercased for consistent lookup)
- 2×4 episode grid (1A–4B) lights up each button as its disk image
becomes available; tapping loads that disk into drive 8
This commit is contained in:
@@ -101,17 +101,20 @@ The NDK must be installed: **Android Studio → SDK Manager → SDK Tools → ND
|
||||
|
||||
After the first successful build, subsequent builds skip the VICE compilation step entirely (outputs are up-to-date).
|
||||
|
||||
**C64 ROM files** must be pushed to the device separately (not redistributable).
|
||||
VICE expects files named exactly `kernal`, `basic`, `chargen` (no extensions) in the
|
||||
app's private `filesDir`: `/data/data/de.ladkau.schwertundmagieonpebblecompanionapp/files/`
|
||||
**C64 ROM files** must be copied to the device separately (not redistributable).
|
||||
VICE expects files named exactly `kernal`, `basic`, `chargen` (no extensions).
|
||||
|
||||
**Via USB file transfer (recommended):** connect the phone, open it in Windows Explorer or
|
||||
Android File Transfer (Mac), and copy the files to:
|
||||
```
|
||||
Android/data/de.ladkau.schwertundmagieonpebblecompanionapp/files/
|
||||
```
|
||||
|
||||
**Via adb (alternative):**
|
||||
```bash
|
||||
adb push kernal /data/local/tmp/kernal
|
||||
adb push basic /data/local/tmp/basic
|
||||
adb push chargen /data/local/tmp/chargen
|
||||
adb shell run-as de.ladkau.schwertundmagieonpebblecompanionapp cp /data/local/tmp/kernal files/kernal
|
||||
adb shell run-as de.ladkau.schwertundmagieonpebblecompanionapp cp /data/local/tmp/basic files/basic
|
||||
adb shell run-as de.ladkau.schwertundmagieonpebblecompanionapp cp /data/local/tmp/chargen files/chargen
|
||||
adb push kernal /sdcard/Android/data/de.ladkau.schwertundmagieonpebblecompanionapp/files/kernal
|
||||
adb push basic /sdcard/Android/data/de.ladkau.schwertundmagieonpebblecompanionapp/files/basic
|
||||
adb push chargen /sdcard/Android/data/de.ladkau.schwertundmagieonpebblecompanionapp/files/chargen
|
||||
```
|
||||
|
||||
### Key Kotlin/C files
|
||||
@@ -127,8 +130,8 @@ adb shell run-as de.ladkau.schwertundmagieonpebblecompanionapp cp /data/local/tm
|
||||
|
||||
### Disk images
|
||||
|
||||
The four original `.d64` disk images are in `versions/`. Load via:
|
||||
The four original `.d64` disk images are in `versions/`. Copy the relevant image to the
|
||||
same external files directory as the ROMs (via USB or adb), then load via:
|
||||
```kotlin
|
||||
engine.loadDisk(filesDir.absolutePath + "/schwert_und_magie_1.d64")
|
||||
engine.loadDisk(getExternalFilesDir(null)!!.absolutePath + "/schwert_und_magie_1.d64")
|
||||
```
|
||||
(Copy the relevant `.d64` to `filesDir` first via `adb push`.)
|
||||
|
||||
Reference in New Issue
Block a user