forked from akanyan/STARTLINER
feat: hardware aime
This commit is contained in:
@ -148,29 +148,21 @@ listen<{ message: string; header: string }>('invoke-error', (event) => {
|
||||
>
|
||||
<div class="fixed w-full flex z-100">
|
||||
<TabList class="grow" :show-navigators="false">
|
||||
<Tab :value="3"
|
||||
><div class="pi pi-users" v-tooltip="'Profiles'"></div
|
||||
></Tab>
|
||||
<Tab :value="3"><div class="pi pi-users"></div></Tab>
|
||||
<Tab :disabled="isProfileDisabled" :value="0"
|
||||
><div
|
||||
class="pi pi-box"
|
||||
v-tooltip="'Installed packages'"
|
||||
></div
|
||||
><div class="pi pi-box"></div
|
||||
></Tab>
|
||||
<Tab v-if="prf.current?.meta.game === 'chunithm'" :value="4"
|
||||
><div class="pi pi-ticket" v-tooltip="'Patches'"></div
|
||||
><div class="pi pi-ticket"></div
|
||||
></Tab>
|
||||
<Tab
|
||||
v-if="pkg.networkStatus === 'online'"
|
||||
:disabled="isProfileDisabled"
|
||||
:value="1"
|
||||
><div
|
||||
class="pi pi-download"
|
||||
v-tooltip="'Package store'"
|
||||
></div
|
||||
><div class="pi pi-download"></div
|
||||
></Tab>
|
||||
<Tab :disabled="isProfileDisabled" :value="2"
|
||||
><div class="pi pi-cog" v-tooltip="'Settings'"></div
|
||||
><div class="pi pi-cog"></div
|
||||
></Tab>
|
||||
|
||||
<div class="grow"></div>
|
||||
@ -316,4 +308,8 @@ body {
|
||||
.p-tablist-active-bar {
|
||||
display: none !important;
|
||||
}
|
||||
|
||||
.p-tooltip {
|
||||
min-width: 300px;
|
||||
}
|
||||
</style>
|
||||
|
@ -1,5 +1,5 @@
|
||||
<script setup lang="ts">
|
||||
import { computed, ref } from 'vue';
|
||||
import { Ref, computed, ref } from 'vue';
|
||||
import InputText from 'primevue/inputtext';
|
||||
import Select from 'primevue/select';
|
||||
import ToggleSwitch from 'primevue/toggleswitch';
|
||||
@ -8,6 +8,7 @@ import * as path from '@tauri-apps/api/path';
|
||||
import { readTextFile, writeTextFile } from '@tauri-apps/plugin-fs';
|
||||
import OptionCategory from '../OptionCategory.vue';
|
||||
import OptionRow from '../OptionRow.vue';
|
||||
import { invoke } from '../../invoke';
|
||||
import { usePkgStore, usePrfStore } from '../../stores';
|
||||
import { Feature } from '../../types';
|
||||
import { hasFeature, pkgKey } from '../../util';
|
||||
@ -16,6 +17,7 @@ const pkgs = usePkgStore();
|
||||
const prf = usePrfStore();
|
||||
|
||||
const aimeCode = ref('');
|
||||
const coms: Ref<{ [key: string]: number }> = ref({});
|
||||
|
||||
prf.reload();
|
||||
|
||||
@ -46,6 +48,10 @@ const load = async () => {
|
||||
aimeCode.value = await readTextFile(aime_path).catch(() => '');
|
||||
};
|
||||
|
||||
invoke('list_com_ports').then((newComs) => {
|
||||
coms.value = newComs as typeof coms.value;
|
||||
});
|
||||
|
||||
listen('reload-aime-code', load);
|
||||
|
||||
load();
|
||||
@ -54,14 +60,14 @@ load();
|
||||
<template>
|
||||
<OptionCategory title="Aime">
|
||||
<OptionRow
|
||||
title="Aime emulation"
|
||||
tooltip="Aime plugins can be downloaded from the package store."
|
||||
title="Aime type"
|
||||
tooltip="Additional Aime plugins can be downloaded from the package store."
|
||||
>
|
||||
<Select
|
||||
v-model="prf.current!.data.sgt.aime"
|
||||
:options="[
|
||||
{ title: 'none', value: 'Disabled' },
|
||||
{ title: 'segatools built-in', value: 'BuiltIn' },
|
||||
{ title: 'hardware', value: 'Disabled' },
|
||||
{ title: 'segatools built-in emulation', value: 'BuiltIn' },
|
||||
...pkgs.byFeature(Feature.Aime).map((p) => {
|
||||
return {
|
||||
title: pkgKey(p),
|
||||
@ -76,11 +82,13 @@ load();
|
||||
option-value="value"
|
||||
></Select>
|
||||
</OptionRow>
|
||||
<OptionRow title="Aime code">
|
||||
<OptionRow
|
||||
title="Aime code"
|
||||
v-if="prf.current!.data.sgt.aime !== 'Disabled'"
|
||||
>
|
||||
<InputText
|
||||
class="shrink"
|
||||
size="small"
|
||||
:disabled="prf.current!.data.sgt.aime === 'Disabled'"
|
||||
:maxlength="20"
|
||||
placeholder="00000000000000000000"
|
||||
v-model="aimeCodeModel"
|
||||
@ -113,5 +121,26 @@ load();
|
||||
<ToggleSwitch v-model="prf.current!.data.sgt.amnet.physical" />
|
||||
</OptionRow>
|
||||
</div>
|
||||
<OptionRow
|
||||
title="Aime serial port"
|
||||
tooltip="Ports can be checked in Devices and Printers or at googlechromelabs.github.io/serial-terminal
|
||||
For AIC Pico, the AIME port should be selected."
|
||||
v-if="prf.current!.data.sgt.aime === 'Disabled'"
|
||||
>
|
||||
<Select
|
||||
v-model="prf.current!.data.sgt.aime_port"
|
||||
:options="[
|
||||
{ title: 'default', value: 'Disabled' },
|
||||
...Object.entries(coms ?? {}).map(([title, value]) => {
|
||||
return {
|
||||
title,
|
||||
value,
|
||||
};
|
||||
}),
|
||||
]"
|
||||
option-label="title"
|
||||
option-value="value"
|
||||
></Select>
|
||||
</OptionRow>
|
||||
</OptionCategory>
|
||||
</template>
|
||||
|
@ -77,6 +77,7 @@ export interface SegatoolsConfig {
|
||||
addr: string;
|
||||
physical: boolean;
|
||||
};
|
||||
aime_port: number;
|
||||
}
|
||||
|
||||
export interface DisplayConfig {
|
||||
|
Reference in New Issue
Block a user