├── settings.gradle ├── .gitignore ├── app ├── src │ └── main │ │ ├── assets │ │ └── data-2.6.9.zip │ │ ├── res │ │ ├── drawable │ │ │ └── download.png │ │ ├── drawable-xxhdpi │ │ │ ├── icon.png │ │ │ ├── start.png │ │ │ ├── ic_launcher.png │ │ │ └── my_border.xml │ │ ├── drawable-hdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-mdpi │ │ │ └── ic_launcher.png │ │ ├── drawable-xhdpi │ │ │ └── ic_launcher.png │ │ ├── values │ │ │ ├── styles.xml │ │ │ └── strings.xml │ │ ├── values-v21 │ │ │ └── styles.xml │ │ ├── layout │ │ │ ├── spinner_row.xml │ │ │ ├── main.xml │ │ │ ├── fragment_misc.xml │ │ │ ├── fragment_hardware.xml │ │ │ └── fragment_storage.xml │ │ ├── menu │ │ │ └── menu.xml │ │ ├── values-zh-rCN │ │ │ └── strings.xml │ │ ├── raw │ │ │ └── data_json │ │ └── layout-land │ │ │ ├── fragment_misc.xml │ │ │ ├── fragment_hardware.xml │ │ │ └── fragment_storage.xml │ │ ├── java │ │ └── net │ │ │ └── sourceforge │ │ │ └── bochs │ │ │ ├── SDLActivity.java │ │ │ ├── entity │ │ │ ├── SoundCard.java │ │ │ ├── VgaCard.java │ │ │ ├── EthernetCard.java │ │ │ └── CpuModel.java │ │ │ ├── adapter │ │ │ └── TabsPagerAdapter.java │ │ │ ├── FileChooser.java │ │ │ ├── MiscTabFragment.java │ │ │ ├── MainActivity.java │ │ │ ├── DirectoryChooserDialog.java │ │ │ ├── Config.java │ │ │ ├── StorageTabFragment.java │ │ │ └── HardwareTabFragment.java │ │ └── AndroidManifest.xml ├── build.gradle ├── proguard-rules.pro └── app.iml ├── screenshots ├── bochs-portrait-misc-tab.png ├── bochs-landscape-storage-tab.png ├── bochs-portrait-hardware-tab.png ├── bochs-portrait-storage-tab.png └── bochs-landscape-hardware-tab.png ├── setSymlinkToBochsApp.sh ├── .idea └── libraries │ ├── support_v4_25_1_0.xml │ ├── support_annotations_25_1_0.xml │ ├── support_compat_25_1_0.xml │ ├── support_core_ui_25_1_0.xml │ ├── support_fragment_25_1_0.xml │ ├── support_core_utils_25_1_0.xml │ └── support_media_compat_25_1_0.xml └── bochsApp ├── build.gradle └── AndroidManifest.xml /settings.gradle: -------------------------------------------------------------------------------- 1 | include ':app' 2 | include ':bochsApp' -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | /build 2 | /.idea 3 | /app/build 4 | /app/app.iml 5 | -------------------------------------------------------------------------------- /app/src/main/assets/data-2.6.9.zip: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/app/src/main/assets/data-2.6.9.zip -------------------------------------------------------------------------------- /app/src/main/res/drawable/download.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/app/src/main/res/drawable/download.png -------------------------------------------------------------------------------- /screenshots/bochs-portrait-misc-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/screenshots/bochs-portrait-misc-tab.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/icon.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/app/src/main/res/drawable-xxhdpi/icon.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/start.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/app/src/main/res/drawable-xxhdpi/start.png -------------------------------------------------------------------------------- /screenshots/bochs-landscape-storage-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/screenshots/bochs-landscape-storage-tab.png -------------------------------------------------------------------------------- /screenshots/bochs-portrait-hardware-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/screenshots/bochs-portrait-hardware-tab.png -------------------------------------------------------------------------------- /screenshots/bochs-portrait-storage-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/screenshots/bochs-portrait-storage-tab.png -------------------------------------------------------------------------------- /screenshots/bochs-landscape-hardware-tab.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/screenshots/bochs-landscape-hardware-tab.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-hdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/app/src/main/res/drawable-hdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-mdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/app/src/main/res/drawable-mdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/app/src/main/res/drawable-xhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/ic_launcher.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/lubomyr/BochsLauncher/HEAD/app/src/main/res/drawable-xxhdpi/ic_launcher.png -------------------------------------------------------------------------------- /app/src/main/java/net/sourceforge/bochs/SDLActivity.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.bochs; 2 | 3 | public class SDLActivity extends net.sourceforge.bochs.core.MainActivity { 4 | } 5 | -------------------------------------------------------------------------------- /app/src/main/res/values/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /setSymlinkToBochsApp.sh: -------------------------------------------------------------------------------- 1 | #!/bin/sh 2 | 3 | ln -s ~/androidsdl/project/src bochsApp/src 4 | ln -s ~/androidsdl/project/res bochsApp/res 5 | ln -s ~/androidsdl/project/libs app/src/main/jniLibs -------------------------------------------------------------------------------- /app/src/main/res/values-v21/styles.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 5 | -------------------------------------------------------------------------------- /app/src/main/res/layout/spinner_row.xml: -------------------------------------------------------------------------------- 1 | 2 | 10 | 11 | 12 | 13 | -------------------------------------------------------------------------------- /.idea/libraries/support_v4_25_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /app/src/main/res/menu/menu.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 9 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/res/drawable-xxhdpi/my_border.xml: -------------------------------------------------------------------------------- 1 | 2 | 4 | 5 | 6 | 9 | 10 | 11 | 12 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/res/layout/main.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /app/src/main/java/net/sourceforge/bochs/entity/SoundCard.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.bochs.entity; 2 | 3 | public class SoundCard { 4 | private String value; 5 | private String description; 6 | 7 | public SoundCard(String value, String description) { 8 | this.value = value; 9 | this.description = description; 10 | } 11 | 12 | public void setValue(String value) { 13 | this.value = value; 14 | } 15 | 16 | public String getValue() { 17 | return value; 18 | } 19 | 20 | public void setDescription(String description) { 21 | this.description = description; 22 | } 23 | 24 | public String getDescription() { 25 | return description; 26 | } 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/net/sourceforge/bochs/entity/VgaCard.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.bochs.entity; 2 | 3 | public class VgaCard { 4 | private String value; 5 | private String description; 6 | 7 | public VgaCard(String value, String description) { 8 | this.value = value; 9 | this.description = description; 10 | } 11 | 12 | public void setValue(String value) { 13 | this.value = value; 14 | } 15 | 16 | public String getValue() { 17 | return value; 18 | } 19 | 20 | public void setDescription(String description) { 21 | this.description = description; 22 | } 23 | 24 | public String getDescription() { 25 | return description; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /app/build.gradle: -------------------------------------------------------------------------------- 1 | apply plugin: 'com.android.application' 2 | 3 | android { 4 | compileSdkVersion 25 5 | buildToolsVersion "25.0.2" 6 | 7 | defaultConfig { 8 | applicationId "net.sourceforge.bochs" 9 | minSdkVersion 16 10 | targetSdkVersion 25 11 | versionCode 26900 12 | versionName "2.6.9" 13 | } 14 | buildTypes { 15 | release { 16 | minifyEnabled false 17 | proguardFiles getDefaultProguardFile('proguard-android.txt'), 'proguard-rules.pro' 18 | } 19 | } 20 | } 21 | 22 | dependencies { 23 | compile fileTree(dir: 'libs', include: ['*.jar']) 24 | compile 'com.android.support:support-v4:25.2.0' 25 | 26 | compile project(':bochsApp') 27 | } 28 | -------------------------------------------------------------------------------- /app/src/main/java/net/sourceforge/bochs/entity/EthernetCard.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.bochs.entity; 2 | 3 | public class EthernetCard { 4 | private String value; 5 | private String description; 6 | 7 | public EthernetCard(String value, String description) { 8 | this.value = value; 9 | this.description = description; 10 | } 11 | 12 | public void setValue(String value) { 13 | this.value = value; 14 | } 15 | 16 | public String getValue() { 17 | return value; 18 | } 19 | 20 | public void setDescription(String description) { 21 | this.description = description; 22 | } 23 | 24 | public String getDescription() { 25 | return description; 26 | } 27 | 28 | } 29 | -------------------------------------------------------------------------------- /bochsApp/build.gradle: -------------------------------------------------------------------------------- 1 | buildscript { 2 | repositories { 3 | jcenter() 4 | } 5 | dependencies { 6 | classpath 'com.android.tools.build:gradle:2.3.0' 7 | } 8 | } 9 | 10 | apply plugin: 'com.android.library' 11 | 12 | android { 13 | sourceSets { 14 | main { 15 | manifest.srcFile 'AndroidManifest.xml' 16 | java.srcDirs = ['src'] 17 | res.srcDirs = ['res'] 18 | } 19 | } 20 | 21 | compileSdkVersion 25 22 | buildToolsVersion "25.0.2" 23 | 24 | lintOptions { 25 | abortOnError false 26 | } 27 | 28 | defaultConfig { 29 | minSdkVersion 14 30 | targetSdkVersion 25 31 | versionCode 1 32 | versionName "1.0" 33 | } 34 | } -------------------------------------------------------------------------------- /.idea/libraries/support_annotations_25_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | -------------------------------------------------------------------------------- /app/proguard-rules.pro: -------------------------------------------------------------------------------- 1 | # Add project specific ProGuard rules here. 2 | # By default, the flags in this file are appended to flags specified 3 | # in C:\tools\adt-bundle-windows-x86_64-20131030\sdk/tools/proguard/proguard-android.txt 4 | # You can edit the include path and order by changing the proguardFiles 5 | # directive in build.gradle. 6 | # 7 | # For more details, see 8 | # http://developer.android.com/guide/developing/tools/proguard.html 9 | 10 | # Add any project specific keep options here: 11 | 12 | # If your project uses WebView with JS, uncomment the following 13 | # and specify the fully qualified class name to the JavaScript interface 14 | # class: 15 | #-keepclassmembers class fqcn.of.javascript.interface.for.webview { 16 | # public *; 17 | #} 18 | -------------------------------------------------------------------------------- /app/src/main/java/net/sourceforge/bochs/entity/CpuModel.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.bochs.entity; 2 | 3 | public class CpuModel { 4 | private String value; 5 | private String description; 6 | private String reqFeat; 7 | 8 | public CpuModel(String value, String description, String reqFeat) { 9 | this.value = value; 10 | this.description = description; 11 | this.reqFeat = reqFeat; 12 | } 13 | 14 | public void setReqFeat(String reqFeat) { 15 | this.reqFeat = reqFeat; 16 | } 17 | 18 | public String getReqFeat() { 19 | return reqFeat; 20 | } 21 | 22 | public void setDescription(String description) { 23 | this.description = description; 24 | } 25 | 26 | public String getDescription() { 27 | return description; 28 | } 29 | 30 | public void setValue(String value) { 31 | this.value = value; 32 | } 33 | 34 | public String getValue() { 35 | return value; 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /.idea/libraries/support_compat_25_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/support_core_ui_25_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/support_fragment_25_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/support_core_utils_25_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /.idea/libraries/support_media_compat_25_1_0.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | -------------------------------------------------------------------------------- /app/src/main/java/net/sourceforge/bochs/adapter/TabsPagerAdapter.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.bochs.adapter; 2 | 3 | import android.support.v4.app.Fragment; 4 | import android.support.v4.app.FragmentManager; 5 | import android.support.v4.app.FragmentPagerAdapter; 6 | 7 | import net.sourceforge.bochs.HardwareTabFragment; 8 | import net.sourceforge.bochs.MiscTabFragment; 9 | import net.sourceforge.bochs.StorageTabFragment; 10 | 11 | public class TabsPagerAdapter extends FragmentPagerAdapter { 12 | 13 | public TabsPagerAdapter(FragmentManager fm) { 14 | super(fm); 15 | } 16 | 17 | @Override 18 | public Fragment getItem(int index) { 19 | 20 | switch (index) { 21 | case 0: 22 | // Storage tab fragment activity 23 | return new StorageTabFragment(); 24 | case 1: 25 | // Hardware tab fragment activity 26 | return new HardwareTabFragment(); 27 | case 2: 28 | // Misc tab fragment activity 29 | return new MiscTabFragment(); 30 | } 31 | 32 | return null; 33 | } 34 | 35 | @Override 36 | public int getCount() { 37 | // get item count - equal to number of tabs 38 | return 3; 39 | } 40 | 41 | } 42 | -------------------------------------------------------------------------------- /app/src/main/res/values-zh-rCN/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bochs 5 | 存储 6 | 配置 7 | 其它 8 | 发生错误, 配置文件无法保存 9 | 配置文件保存成功 10 | 找不到配置文件 11 | 配置文件加载完毕 12 | 下载磁盘映像 13 | 选择 14 | 15 | 软盘A 16 | 软盘B 17 | ata0-master 18 | ata0-slave 19 | ata1-master 20 | ata1-slave 21 | 共享文件夹 22 | 启动 23 | CPU类型: 24 | 描述 25 | 芯片组: 26 | i430fx 27 | i440fx 28 | 内存: 29 | 30 | VGA显示卡: 31 | 声卡: 32 | 网卡: 33 | PCI: 34 | 插槽1: 35 | 插槽2: 36 | 插槽3: 37 | 插槽4: 38 | 插槽5: 39 | rom 镜像 40 | vga rom 镜像 41 | 时钟: 42 | 同步: 43 | VGA刷新频率: 44 | 全屏模式 45 | 扬声器 46 | 47 | 48 | -------------------------------------------------------------------------------- /app/src/main/res/values/strings.xml: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | Bochs 5 | Storage 6 | Hardware 7 | Misc 8 | Error, config not saved 9 | config saved 10 | config not found 11 | config loaded 12 | Download disk images 13 | select 14 | none 15 | Floppy A 16 | Floppy B 17 | ata0-master 18 | ata0-slave 19 | ata1-master 20 | ata1-slave 21 | vfat 22 | Boot 23 | CPU Model: 24 | description 25 | Chipset: 26 | i430fx 27 | i440fx 28 | Memory: 29 | value 30 | VGA Card: 31 | Sound Card: 32 | Ethernet Card: 33 | PCI: 34 | Slot1: 35 | Slot2: 36 | Slot3: 37 | Slot4: 38 | Slot5: 39 | rom image 40 | vga rom image 41 | Clock: 42 | sync: 43 | VGA update freq: 44 | Full screen 45 | Speaker 46 | 47 | 48 | -------------------------------------------------------------------------------- /bochsApp/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 2 | 8 | 13 | 17 | 18 | 19 | 24 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | -------------------------------------------------------------------------------- /app/src/main/AndroidManifest.xml: -------------------------------------------------------------------------------- 1 | 5 | 13 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | -------------------------------------------------------------------------------- /app/src/main/res/raw/data_json: -------------------------------------------------------------------------------- 1 | {"cpulist":[ 2 | { 3 | "value":"bx_generic", 4 | "description":"Default Bochs CPU configured with CPUID option", 5 | "required":"cpu level 5" 6 | }, 7 | 8 | { 9 | "value":"pentium", 10 | "description":"Intel Pentium (P54C)", 11 | "required":"cpu level 5" 12 | }, 13 | 14 | { 15 | "value":"pentium_mmx", 16 | "description":"Intel Pentium MMX", 17 | "required":"cpu level 5" 18 | }, 19 | 20 | { 21 | "value":"amd_k6_2_chomper", 22 | "description":"AMD-K6(tm) 3D processor (Chomper)", 23 | "required":"cpu level 5" 24 | }, 25 | 26 | { 27 | "value":"p2_klamath", 28 | "description":"Intel Pentium II (Klamath)", 29 | "required":"cpu level 6" 30 | }, 31 | 32 | { 33 | "value":"p3_katmai", 34 | "description":"Intel Pentium III (Katmai)", 35 | "required":"cpu level 6" 36 | }, 37 | 38 | { 39 | "value":"p4_willamette", 40 | "description":"Intel(R) Pentium(R) 4 (Willamette)", 41 | "required":"cpu level 6" 42 | }, 43 | 44 | { 45 | "value":"core_duo_t2400_yonah", 46 | "description":"Intel(R) Core(TM) Duo CPU T2400 (Yonah)", 47 | "required":"cpu level 6" 48 | }, 49 | 50 | { 51 | "value":"atom_n270", 52 | "description":"Intel(R) Atom(TM) CPU N270", 53 | "required":"cpu level 6" 54 | }, 55 | 56 | { 57 | "value":"p4_prescott_celeron_336", 58 | "description":"Intel(R) Celeron(R) 336 (Prescott)", 59 | "required":"cpu level 6, x86-64" 60 | }, 61 | 62 | { 63 | "value":"athlon64_clawhammer", 64 | "description":"AMD Athlon(tm) 64 Processor 2800+ (Clawhammer)", 65 | "required":"cpu level 6, x86-64" 66 | }, 67 | 68 | { 69 | "value":"athlon64_venice", 70 | "description":"AMD Athlon(tm) 64 Processor 3000+ (Venice)", 71 | "required":"cpu level 6, x86-64" 72 | }, 73 | 74 | { 75 | "value":"turion64_tyler", 76 | "description":"AMD Turion(tm) 64 X2 Mobile TL-60 (Tyler)", 77 | "required":"cpu level 6, x86-64" 78 | }, 79 | 80 | { 81 | "value":"phenom_8650_toliman", 82 | "description":"AMD Phenom X3 8650 (Toliman)", 83 | "required":"cpu level 6, x86-64" 84 | }, 85 | 86 | { 87 | "value":"core2_penryn_t9600", 88 | "description":"Intel Mobile Core 2 Duo T9600 (Penryn)", 89 | "required":"cpu level 6, x86-64" 90 | }, 91 | 92 | { 93 | "value":"corei5_lynnfield_750", 94 | "description":"Intel(R) Core(TM) i5 750 (Lynnfield)", 95 | "required":"cpu level 6, x86-64" 96 | }, 97 | 98 | { 99 | "value":"corei5_arrandale_m520", 100 | "description":"Intel(R) Core(TM) i5 M 520 (Arrandale)", 101 | "required":"cpu level 6, x86-64" 102 | }, 103 | 104 | { 105 | "value":"corei7_sandy_bridge_2600k", 106 | "description":"Intel(R) Core(TM) i7-2600K (Sandy Bridge)", 107 | "required":"cpu level 6, x86-64, avx" 108 | }, 109 | 110 | { 111 | "value":"zambezi", 112 | "description":"AMD FX(tm)-4100 Quad-Core Processor (Zambezi)", 113 | "required":"cpu level 6, x86-64, avx" 114 | }, 115 | 116 | { 117 | "value":"trinity_apu", 118 | "description":"AMD A8-5600K APU (Trinity)", 119 | "required":"cpu level 6, x86-64, avx" 120 | }, 121 | 122 | { 123 | "value":"ryzen", 124 | "description":"AMD Ryzen 7 1700", 125 | "required":"cpu level 6, x86-64, avx" 126 | }, 127 | 128 | { 129 | "value":"corei7_ivy_bridge_3770k", 130 | "description":"Intel(R) Core(TM) i7-3770K CPU (Ivy Bridge)", 131 | "required":"cpu level 6, x86-64, avx" 132 | }, 133 | 134 | { 135 | "value":"corei7_haswell_4770", 136 | "description":"Intel(R) Core(TM) i7-4770 CPU (Haswell)", 137 | "required":"cpu level 6, x86-64, avx" 138 | }, 139 | 140 | { 141 | "value":"broadwell_ult", 142 | "description":"Intel(R) Processor 5Y70 CPU (Broadwell)", 143 | "required":"cpu level 6, x86-64, avx" 144 | } 145 | 146 | ], 147 | 148 | "vgalist":[ 149 | { 150 | "value":"vbe", 151 | "description":"Bochs VBE (ISA)" 152 | }, 153 | 154 | { 155 | "value":"pcivga", 156 | "description":"Bochs VBE (PCI)" 157 | }, 158 | 159 | { 160 | "value":"cirrus_5430", 161 | "description":"Cirrus Logic CL-GD5430 (ISA)" 162 | }, 163 | 164 | { 165 | "value":"cirrus_5446", 166 | "description":"Cirrus Logic CL-GD5446 (PCI)" 167 | } 168 | 169 | ], 170 | 171 | "soundlist":[ 172 | { 173 | "value":"none", 174 | "description":"" 175 | }, 176 | 177 | { 178 | "value":"sb16", 179 | "description":"Creative Sound Blaster 16 (ISA)" 180 | }, 181 | 182 | { 183 | "value":"es1370", 184 | "description":"Ensoniq ES1370 (PCI)" 185 | } 186 | 187 | ], 188 | 189 | "ethernetlist":[ 190 | { 191 | "value":"none", 192 | "description":"" 193 | }, 194 | 195 | { 196 | "value":"ne2k", 197 | "description":"Novell NE2000 (ISA)" 198 | }, 199 | 200 | { 201 | "value":"rtl8029", 202 | "description":"Realtek RTL8029 (PCI)" 203 | }, 204 | 205 | { 206 | "value":"e1000", 207 | "description":"Intel 82540EM (PCI)" 208 | } 209 | 210 | ]} 211 | -------------------------------------------------------------------------------- /app/src/main/java/net/sourceforge/bochs/FileChooser.java: -------------------------------------------------------------------------------- 1 | package net.sourceforge.bochs; 2 | 3 | import android.app.Activity; 4 | import android.app.Dialog; 5 | import android.os.Environment; 6 | import android.util.Log; 7 | import android.view.View; 8 | import android.view.ViewGroup; 9 | import android.view.WindowManager.LayoutParams; 10 | import android.widget.AdapterView; 11 | import android.widget.ArrayAdapter; 12 | import android.widget.ListView; 13 | import android.widget.TextView; 14 | 15 | import java.io.File; 16 | import java.io.FileFilter; 17 | import java.util.Arrays; 18 | 19 | public class FileChooser { 20 | private static final String PARENT_DIR = ".."; 21 | 22 | private final Activity activity; 23 | private ListView list; 24 | private Dialog dialog; 25 | private File currentPath; 26 | 27 | // filter on file extension 28 | private String extension[] = null; 29 | 30 | public void setExtension(String... extension) { 31 | this.extension = (extension == null) ? null : extension; 32 | } 33 | 34 | // file selection event handling 35 | public interface FileSelectedListener { 36 | void fileSelected(File file); 37 | } 38 | 39 | public FileChooser setFileListener(FileSelectedListener fileListener) { 40 | this.fileListener = fileListener; 41 | return this; 42 | } 43 | 44 | private FileSelectedListener fileListener; 45 | 46 | public FileChooser(Activity activity, String path, String... extension) { 47 | this.activity = activity; 48 | File selectedPath = null; 49 | if (path != null) 50 | selectedPath = new File(path); 51 | this.extension = (extension == null) ? null : extension; 52 | dialog = new Dialog(activity); 53 | list = new ListView(activity); 54 | list.setOnItemClickListener(new AdapterView.OnItemClickListener() { 55 | @Override 56 | public void onItemClick(AdapterView parent, View view, int which, long id) { 57 | String fileChosen = (String) list.getItemAtPosition(which); 58 | File chosenFile = getChosenFile(fileChosen); 59 | if (chosenFile.isDirectory()) { 60 | refresh(chosenFile); 61 | } else { 62 | if (fileListener != null) { 63 | fileListener.fileSelected(chosenFile); 64 | } 65 | dialog.dismiss(); 66 | } 67 | } 68 | }); 69 | dialog.setContentView(list); 70 | dialog.getWindow().setLayout(LayoutParams.FILL_PARENT, LayoutParams.FILL_PARENT); 71 | if (selectedPath == null) 72 | selectedPath = Environment.getExternalStorageDirectory(); 73 | refresh(selectedPath); 74 | } 75 | 76 | public void showDialog() { 77 | dialog.show(); 78 | } 79 | 80 | 81 | /** 82 | * Sort, filter and display the files for the given path. 83 | */ 84 | private void refresh(File path) { 85 | this.currentPath = path; 86 | if (path.exists()) { 87 | File[] dirs = path.listFiles(new FileFilter() { 88 | @Override 89 | public boolean accept(File file) { 90 | return (file.isDirectory() && file.canRead()); 91 | } 92 | }); 93 | File[] files = path.listFiles(new FileFilter() { 94 | @Override 95 | public boolean accept(File file) { 96 | if (!file.isDirectory()) { 97 | if (!file.canRead()) { 98 | return false; 99 | } else if (extension == null) { 100 | return true; 101 | } else { 102 | boolean result = false; 103 | for (int i = 0; i < extension.length; i++) { 104 | if (file.getName().toLowerCase().endsWith(extension[i].toLowerCase())) 105 | result = true; 106 | } 107 | return result; 108 | } 109 | } else { 110 | return false; 111 | } 112 | } 113 | }); 114 | 115 | // convert to an array 116 | int i = 0; 117 | String[] fileList; 118 | if (path.getParentFile() == null) { 119 | fileList = new String[dirs.length + files.length]; 120 | } else { 121 | fileList = new String[dirs.length + files.length + 1]; 122 | fileList[i++] = PARENT_DIR; 123 | } 124 | Arrays.sort(dirs); 125 | Arrays.sort(files); 126 | for (File dir : dirs) { 127 | fileList[i++] = dir.getName(); 128 | } 129 | for (File file : files) { 130 | fileList[i++] = file.getName(); 131 | } 132 | 133 | // refresh the user interface 134 | dialog.setTitle(currentPath.getPath()); 135 | ArrayAdapter adapter = new ArrayAdapter(activity, 136 | android.R.layout.simple_list_item_1, fileList) { 137 | @Override 138 | public View getView(int pos, View view, ViewGroup parent) { 139 | view = super.getView(pos, view, parent); 140 | ((TextView) view).setSingleLine(true); 141 | return view; 142 | } 143 | }; 144 | list.setAdapter(adapter); 145 | } 146 | } 147 | 148 | 149 | /** 150 | * Convert a relative filename into an actual File object. 151 | */ 152 | private File getChosenFile(String fileChosen) { 153 | if (fileChosen.equals(PARENT_DIR)) { 154 | return currentPath.getParentFile(); 155 | } else { 156 | return new File(currentPath, fileChosen); 157 | } 158 | } 159 | } 160 | -------------------------------------------------------------------------------- /app/src/main/res/layout/fragment_misc.xml: -------------------------------------------------------------------------------- 1 | 2 | 7 | 8 | 13 | 14 | 22 | 23 |