-
-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
76daec8
commit b6b2843
Showing
2 changed files
with
36 additions
and
36 deletions.
There are no files selected for viewing
70 changes: 35 additions & 35 deletions
70
Platforms/ZXBox.Blazor/Components/EmulatorComponent.razor
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,45 +1,45 @@ | ||
@using ZXBox.Blazor.Pages | ||
@using ZXBox.Snapshot | ||
@using System.Timers | ||
@using Toolbelt.Blazor.Gamepad; | ||
@using Microsoft.AspNetCore.Components | ||
@inject Toolbelt.Blazor.Gamepad.GamepadList GamePadList; | ||
@inherits EmulatorComponentModel | ||
|
||
<canvas id="emulatorCanvas" width="296" height="232" style="@(gameLoop.Enabled?"":"display:none;")"></canvas> | ||
@if (gameLoop.Enabled) | ||
{ | ||
<div style="text-align:center; color:white"> | ||
Load a game (supported formats: TAP, Z80, and SNA)<br /> | ||
<InputFile OnChange="HandleFileSelected" /><br /> | ||
Use a gamepad for Kempston joystick<br /> | ||
@((MarkupString)Instructions)<br /> | ||
<button @onclick="@(()=>LoadGame("ManicMiner.z80","left - q<br/>right - w<br/>jump - space"))">Load Manic Miner (1983)(Bug-Byte Software)</button> | ||
@using ZXBox.Blazor.Pages | ||
@using ZXBox.Snapshot | ||
@using System.Timers | ||
@using Toolbelt.Blazor.Gamepad; | ||
@using Microsoft.AspNetCore.Components | ||
@inject Toolbelt.Blazor.Gamepad.GamepadList GamePadList; | ||
@inherits EmulatorComponentModel | ||
|
||
<canvas id="emulatorCanvas" width="296" height="232" style="@(gameLoop.Enabled?"":"display:none;")"></canvas> | ||
@if (gameLoop.Enabled) | ||
{ | ||
<div style="text-align:center; color:white"> | ||
Load a game (supported formats: TAP, Z80, and SNA)<br /> | ||
<InputFile OnChange="HandleFileSelected" /><br /> | ||
Use a gamepad for Kempston joystick<br /> | ||
@((MarkupString)Instructions)<br /> | ||
<button @onclick="@(()=>LoadGame("ManicMiner.z80","left - q<br/>right - w<br/>jump - space"))">Load Manic Miner (1983)(Bug-Byte Software)</button> | ||
@if (tapePlayer.EarValues.Count > 0) | ||
{ | ||
@if (!tapePlayer.IsPlaying) | ||
{ | ||
<button @onclick="tapePlayer.Play">Start tape</button> | ||
} | ||
} | ||
else | ||
{ | ||
<div style="height:300px;"> | ||
<TapePlayerComponent Percent="@PercentLoaded" TapeName="@TapeName"></TapePlayerComponent> | ||
<div style="height:300px;"> | ||
<TapePlayerComponent Percent="@PercentLoaded" TapeName="@TapeName"></TapePlayerComponent> | ||
</div> | ||
} | ||
} | ||
</div> | ||
} | ||
else | ||
{ | ||
<div style="height:100vh;text-align:center;padding-top:200px;"> | ||
Choose the computer you want to run<br/> | ||
<a href="#" @onclick:preventDefault @onclick="@(()=>StartZXSpectrum(RomEnum.ZXSpectrum48k))"><img src="./images/ZXSpectrum48k.png"/></a> | ||
<a href="#" @onclick:preventDefault @onclick="@(()=>StartZXSpectrum(RomEnum.ZXSpectrumPlus))"><img src="./images/ZXSpectrum128k.png"/></a> | ||
</div> | ||
} | ||
|
||
@*<img style="position:absolute;right:0px;bottom:0px;" src="/images/Atari2600/JoystickBase.png"/> | ||
<img style="position:absolute;right:100px;bottom:100px;" src="/images/Atari2600/JoystickStick.png" />*@ | ||
|
||
} | ||
</div> | ||
} | ||
else | ||
{ | ||
<div style="height:100vh;text-align:center;padding-top:200px;"> | ||
Choose the computer you want to run<br/> | ||
<a href="#" @onclick:preventDefault @onclick="@(()=>StartZXSpectrum(RomEnum.ZXSpectrum48k))"><img src="./images/ZXSpectrum48k.png"/></a> | ||
<a href="#" @onclick:preventDefault @onclick="@(()=>StartZXSpectrum(RomEnum.ZXSpectrumPlus))"><img src="./images/ZXSpectrum128k.png"/></a> | ||
</div> | ||
} | ||
|
||
@*<img style="position:absolute;right:0px;bottom:0px;" src="/images/Atari2600/JoystickBase.png"/> | ||
<img style="position:absolute;right:100px;bottom:100px;" src="/images/Atari2600/JoystickStick.png" />*@ | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters