mirror of
https://github.com/curioustorvald/tsvm.git
synced 2026-06-06 13:38:30 +09:00
minor spec change for Taud
This commit is contained in:
133
.idea/cody_history.xml
generated
Normal file
133
.idea/cody_history.xml
generated
Normal file
@@ -0,0 +1,133 @@
|
|||||||
|
<?xml version="1.0" encoding="UTF-8"?>
|
||||||
|
<project version="4">
|
||||||
|
<component name="ChatHistory">
|
||||||
|
<accountData>
|
||||||
|
<list>
|
||||||
|
<AccountData>
|
||||||
|
<accountId value="VXNlcjo1NTUxMzY=" />
|
||||||
|
<chats>
|
||||||
|
<list>
|
||||||
|
<chat>
|
||||||
|
<internalId value="8a32c880-d8ec-4d84-b5f7-a62b2edf63c3" />
|
||||||
|
<llm>
|
||||||
|
<llm>
|
||||||
|
<model value="anthropic/claude-3-5-sonnet-20240620" />
|
||||||
|
<provider value="Anthropic" />
|
||||||
|
<title value="Claude 3.5 Sonnet" />
|
||||||
|
<usage>
|
||||||
|
<list>
|
||||||
|
<option value="chat" />
|
||||||
|
<option value="edit" />
|
||||||
|
</list>
|
||||||
|
</usage>
|
||||||
|
</llm>
|
||||||
|
</llm>
|
||||||
|
</chat>
|
||||||
|
<chat>
|
||||||
|
<internalId value="f4e7338b-57d3-44e0-b1d9-04aa2dfb4bae" />
|
||||||
|
<llm>
|
||||||
|
<llm>
|
||||||
|
<model value="anthropic/claude-3-5-sonnet-20240620" />
|
||||||
|
<provider value="Anthropic" />
|
||||||
|
<title value="Claude 3.5 Sonnet" />
|
||||||
|
<usage>
|
||||||
|
<list>
|
||||||
|
<option value="chat" />
|
||||||
|
<option value="edit" />
|
||||||
|
</list>
|
||||||
|
</usage>
|
||||||
|
</llm>
|
||||||
|
</llm>
|
||||||
|
</chat>
|
||||||
|
<chat>
|
||||||
|
<internalId value="26ac815b-5db9-488b-be0b-ab174fbc5646" />
|
||||||
|
<llm>
|
||||||
|
<llm>
|
||||||
|
<model value="anthropic/claude-3-5-sonnet-20240620" />
|
||||||
|
<provider value="Anthropic" />
|
||||||
|
<title value="Claude 3.5 Sonnet" />
|
||||||
|
<usage>
|
||||||
|
<list>
|
||||||
|
<option value="chat" />
|
||||||
|
<option value="edit" />
|
||||||
|
</list>
|
||||||
|
</usage>
|
||||||
|
</llm>
|
||||||
|
</llm>
|
||||||
|
</chat>
|
||||||
|
<chat>
|
||||||
|
<internalId value="8ab39b26-cdda-4256-878f-e0416e66bbea" />
|
||||||
|
<llm>
|
||||||
|
<llm>
|
||||||
|
<model value="anthropic/claude-3-5-sonnet-20240620" />
|
||||||
|
<provider value="Anthropic" />
|
||||||
|
<title value="Claude 3.5 Sonnet" />
|
||||||
|
<usage>
|
||||||
|
<list>
|
||||||
|
<option value="chat" />
|
||||||
|
<option value="edit" />
|
||||||
|
</list>
|
||||||
|
</usage>
|
||||||
|
</llm>
|
||||||
|
</llm>
|
||||||
|
</chat>
|
||||||
|
<chat>
|
||||||
|
<internalId value="f79a288a-adc5-4d45-a069-4bf024d90236" />
|
||||||
|
<llm>
|
||||||
|
<llm>
|
||||||
|
<model value="anthropic/claude-3-5-sonnet-20240620" />
|
||||||
|
<provider value="Anthropic" />
|
||||||
|
<title value="Claude 3.5 Sonnet" />
|
||||||
|
<usage>
|
||||||
|
<list>
|
||||||
|
<option value="chat" />
|
||||||
|
<option value="edit" />
|
||||||
|
</list>
|
||||||
|
</usage>
|
||||||
|
</llm>
|
||||||
|
</llm>
|
||||||
|
</chat>
|
||||||
|
<chat>
|
||||||
|
<internalId value="20bc02fd-c6b5-4590-a00b-b7012a630ef4" />
|
||||||
|
<llm>
|
||||||
|
<llm>
|
||||||
|
<model value="anthropic/claude-3-5-sonnet-20240620" />
|
||||||
|
<provider value="Anthropic" />
|
||||||
|
<title value="Claude 3.5 Sonnet" />
|
||||||
|
<usage>
|
||||||
|
<list>
|
||||||
|
<option value="chat" />
|
||||||
|
<option value="edit" />
|
||||||
|
</list>
|
||||||
|
</usage>
|
||||||
|
</llm>
|
||||||
|
</llm>
|
||||||
|
</chat>
|
||||||
|
</list>
|
||||||
|
</chats>
|
||||||
|
<defaultLlm>
|
||||||
|
<llm>
|
||||||
|
<model value="anthropic/claude-3-5-sonnet-20240620" />
|
||||||
|
<provider value="Anthropic" />
|
||||||
|
<tags>
|
||||||
|
<list>
|
||||||
|
<option value="gateway" />
|
||||||
|
<option value="accuracy" />
|
||||||
|
<option value="recommended" />
|
||||||
|
<option value="free" />
|
||||||
|
</list>
|
||||||
|
</tags>
|
||||||
|
<title value="Claude 3.5 Sonnet" />
|
||||||
|
<usage>
|
||||||
|
<list>
|
||||||
|
<option value="chat" />
|
||||||
|
<option value="edit" />
|
||||||
|
</list>
|
||||||
|
</usage>
|
||||||
|
</llm>
|
||||||
|
</defaultLlm>
|
||||||
|
</AccountData>
|
||||||
|
</list>
|
||||||
|
</accountData>
|
||||||
|
</component>
|
||||||
|
</project>
|
||||||
17
.idea/runConfigurations/AppLoader.xml
generated
Normal file
17
.idea/runConfigurations/AppLoader.xml
generated
Normal file
@@ -0,0 +1,17 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="AppLoader" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||||
|
<option name="ALTERNATIVE_JRE_PATH" value="21" />
|
||||||
|
<option name="MAIN_CLASS_NAME" value="net.torvald.tsvm.AppLoader" />
|
||||||
|
<module name="tsvm_executable" />
|
||||||
|
<option name="VM_PARAMETERS" value="-ea --upgrade-module-path=lib/compiler-23.1.10.jar:lib/compiler-management-23.1.10.jar:lib/truffle-compiler-23.1.10.jar:lib/truffle-api-23.1.10.jar:lib/truffle-runtime-23.1.10.jar:lib/polyglot-23.1.10.jar:lib/collections-23.1.10.jar:lib/word-23.1.10.jar:lib/nativeimage-23.1.10.jar:lib/jniutils-23.1.10.jar -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="net.torvald.tsvm.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/TerranBASIC.xml
generated
Normal file
16
.idea/runConfigurations/TerranBASIC.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="TerranBASIC" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||||
|
<option name="MAIN_CLASS_NAME" value="net.torvald.tsvm.TerranBASIC" />
|
||||||
|
<module name="TerranBASICexecutable" />
|
||||||
|
<option name="VM_PARAMETERS" value="--upgrade-module-path=lib/compiler-23.1.10.jar:lib/compiler-management-23.1.10.jar:lib/truffle-compiler-23.1.10.jar:lib/truffle-api-23.1.10.jar:lib/truffle-runtime-23.1.10.jar:lib/polyglot-23.1.10.jar:lib/collections-23.1.10.jar:lib/word-23.1.10.jar:lib/nativeimage-23.1.10.jar:lib/jniutils-23.1.10.jar -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="net.torvald.tsvm.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
16
.idea/runConfigurations/TsvmEmulator.xml
generated
Normal file
16
.idea/runConfigurations/TsvmEmulator.xml
generated
Normal file
@@ -0,0 +1,16 @@
|
|||||||
|
<component name="ProjectRunConfigurationManager">
|
||||||
|
<configuration default="false" name="TsvmEmulator" type="Application" factoryName="Application" nameIsGenerated="true">
|
||||||
|
<option name="MAIN_CLASS_NAME" value="net.torvald.tsvm.TsvmEmulator" />
|
||||||
|
<module name="tsvm_executable" />
|
||||||
|
<option name="VM_PARAMETERS" value="-ea --upgrade-module-path=lib/compiler-23.1.10.jar:lib/compiler-management-23.1.10.jar:lib/truffle-compiler-23.1.10.jar:lib/truffle-api-23.1.10.jar:lib/truffle-runtime-23.1.10.jar:lib/polyglot-23.1.10.jar:lib/collections-23.1.10.jar:lib/word-23.1.10.jar:lib/nativeimage-23.1.10.jar:lib/jniutils-23.1.10.jar -XX:+UnlockExperimentalVMOptions -XX:+EnableJVMCI --add-exports=java.base/jdk.internal.misc=jdk.internal.vm.compiler" />
|
||||||
|
<extension name="coverage">
|
||||||
|
<pattern>
|
||||||
|
<option name="PATTERN" value="net.torvald.tsvm.*" />
|
||||||
|
<option name="ENABLED" value="true" />
|
||||||
|
</pattern>
|
||||||
|
</extension>
|
||||||
|
<method v="2">
|
||||||
|
<option name="Make" enabled="true" />
|
||||||
|
</method>
|
||||||
|
</configuration>
|
||||||
|
</component>
|
||||||
@@ -2002,8 +2002,8 @@ Instrument bin: Registry for 256 instruments, formatted as:
|
|||||||
Uint16 Loop Start (can be smaller than Play Start)
|
Uint16 Loop Start (can be smaller than Play Start)
|
||||||
Uint16 Loop End
|
Uint16 Loop End
|
||||||
Bit32 Flags
|
Bit32 Flags
|
||||||
0b h000 00pp
|
0b hhhh 00pp
|
||||||
h: sample pointer high bit
|
h: sample pointer high bit (only the lowest bit is used, keep upper 3 bits unset)
|
||||||
pp: loop mode. 0-no loop, 1-loop, 2-backandforth, 3-oneshot (ignores note length unless overridden by other notes)
|
pp: loop mode. 0-no loop, 1-loop, 2-backandforth, 3-oneshot (ignores note length unless overridden by other notes)
|
||||||
Bit16x24 Volume envelopes
|
Bit16x24 Volume envelopes
|
||||||
Byte 1: Volume
|
Byte 1: Volume
|
||||||
|
|||||||
@@ -1465,7 +1465,7 @@ class AudioAdapter(val vm: VM) : PeriBase(VM.PERITYPE_SOUND) {
|
|||||||
|
|
||||||
data class TaudInstVolEnv(var volume: Int, var offset: ThreeFiveMiniUfloat)
|
data class TaudInstVolEnv(var volume: Int, var offset: ThreeFiveMiniUfloat)
|
||||||
data class TaudInst(
|
data class TaudInst(
|
||||||
var samplePtr: Int, // 17-bit number
|
var samplePtr: Int, // 20-bit number
|
||||||
var sampleLength: Int,
|
var sampleLength: Int,
|
||||||
var samplingRate: Int,
|
var samplingRate: Int,
|
||||||
var samplePlayStart: Int,
|
var samplePlayStart: Int,
|
||||||
@@ -1496,8 +1496,8 @@ class AudioAdapter(val vm: VM) : PeriBase(VM.PERITYPE_SOUND) {
|
|||||||
10 -> sampleLoopEnd.toByte()
|
10 -> sampleLoopEnd.toByte()
|
||||||
11 -> sampleLoopEnd.ushr(8).toByte()
|
11 -> sampleLoopEnd.ushr(8).toByte()
|
||||||
|
|
||||||
12 -> (samplePtr.ushr(16).and(1).shl(7) or loopMode.and(3)).toByte()
|
12 -> (samplePtr.ushr(16).and(15).shl(4) or loopMode.and(3)).toByte()
|
||||||
13,14,15 -> -1
|
13,14,15 -> 0
|
||||||
in 16..63 step 2 -> envelopes[(offset - 16) / 2].volume.toByte()
|
in 16..63 step 2 -> envelopes[(offset - 16) / 2].volume.toByte()
|
||||||
in 17..63 step 2 -> envelopes[(offset - 17) / 2].offset.index.toByte()
|
in 17..63 step 2 -> envelopes[(offset - 17) / 2].offset.index.toByte()
|
||||||
else -> throw InternalError("Bad offset $offset")
|
else -> throw InternalError("Bad offset $offset")
|
||||||
@@ -1523,7 +1523,7 @@ class AudioAdapter(val vm: VM) : PeriBase(VM.PERITYPE_SOUND) {
|
|||||||
11 -> { sampleLoopEnd = (sampleLoopEnd and 0x00ff) or (byte shl 8) }
|
11 -> { sampleLoopEnd = (sampleLoopEnd and 0x00ff) or (byte shl 8) }
|
||||||
|
|
||||||
12 -> {
|
12 -> {
|
||||||
samplePtr = if (byte and 0b1000_0000 != 0) samplePtr or 0x10000
|
samplePtr = if (byte and 0b1111_0000 != 0) samplePtr or ((byte ushr 4) shl 16)
|
||||||
else samplePtr and 0x0ffff
|
else samplePtr and 0x0ffff
|
||||||
loopMode = byte and 3
|
loopMode = byte and 3
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user