Skip to content

Commit

Permalink
Cummulative release: bugfixes #23 #24 and bytecode documentation
Browse files Browse the repository at this point in the history
* Cummulative release for bugfixes #23 & #24 and bytecode documentation.
* Include missing example file for Stimulus plugin: test.stm.
  • Loading branch information
gatuno1 committed Jun 16, 2021
1 parent 9979938 commit c647059
Show file tree
Hide file tree
Showing 7 changed files with 941 additions and 38 deletions.
4 changes: 2 additions & 2 deletions Gear/EmulationCore/Cog.cs
Original file line number Diff line number Diff line change
Expand Up @@ -362,7 +362,7 @@ public uint this[int i]
}

/// <summary>
///
/// Evaluate a precondition for an PASM instruction
/// </summary>
/// <param name="condition"></param>
/// <param name="a"></param>
Expand Down Expand Up @@ -535,7 +535,7 @@ public uint ReadLong(uint address)
/// @note PAR address is a special case, because unless Propeller Manual V1.2
/// specifications says it is a read-only register, there are claims that in reality it
/// is writable as explains
/// <a href="http://forums.parallax.com/discussion/115909/pasm-simulator-debugger)">
/// <a href="https://forums.parallax.com/discussion/comment/839684/#Comment_839684">
/// Forum thread "PASM simulator / debugger?</a>.
/// They claims that some parallax video drivers in PASM changes the PAR register,
/// and GEAR didn't emulate that.
Expand Down
22 changes: 4 additions & 18 deletions Gear/EmulationCore/FreqGenerator.cs
Original file line number Diff line number Diff line change
Expand Up @@ -99,10 +99,7 @@ public class FreqGenerator

public uint CTR
{
get
{
return Control;
}
get { return Control; }
set
{
Control = value;
Expand Down Expand Up @@ -140,10 +137,7 @@ public uint CTR

public uint FRQ
{
get
{
return Frequency;
}
get { return Frequency; }
set
{
Frequency = value;
Expand All @@ -170,14 +164,8 @@ public uint FRQ

public uint PHS
{
get
{
return PhaseAccumulator;
}
set
{
PhaseAccumulator = value;
}
get { return PhaseAccumulator; }
set { PhaseAccumulator = value; }
}

public ulong Output
Expand Down Expand Up @@ -279,9 +267,7 @@ public void Tick(ulong pins)
default:
// changed to NOT ConditionCompare(.) to repair Logic Modes Counter
if (!Cog.ConditionCompare((Assembly.ConditionCodes)((int)CtrMode - 16), PinA, PinB))
{
PHS += FRQ;
}
break;
}

Expand Down
14 changes: 7 additions & 7 deletions Gear/EmulationCore/InstructionDisassembler.cs
Original file line number Diff line number Diff line change
Expand Up @@ -28,13 +28,13 @@ namespace Gear.EmulationCore
{
/// @brief Provides a method for creating the string equivalent of a propeller operation.
public static class InstructionDisassembler
{
/// @brief Default static constructor
static InstructionDisassembler() { }

/// @brief Translate to text the bytecode opcodes.
/// @param Operation Bytecode opcodes.
/// @return Explicative text from decoded bytecode.
{
/// @brief Default static constructor
static InstructionDisassembler() { }

/// @brief Translate to text the bytecode opcodes.
/// @param Operation Bytecode opcodes.
/// @return Explicative text from decoded bytecode.
public static string AssemblyText(uint Operation)
{
Assembly.ParsedInstruction instr = new Assembly.ParsedInstruction(Operation);
Expand Down
827 changes: 819 additions & 8 deletions Gear/EmulationCore/InterpretedCog.cs

Large diffs are not rendered by default.

6 changes: 3 additions & 3 deletions Gear/Properties/AssemblyInfo.cs
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
[assembly: AssemblyConfiguration("")]
[assembly: AssemblyCompany("Gear-emu")]
[assembly: AssemblyProduct("Gear: Parallax Propeller P1 Emulator")]
[assembly: AssemblyCopyright("Copyright 2020 - Gear Developers")]
[assembly: AssemblyCopyright("Copyright 2021 - Gear Developers")]
[assembly: AssemblyTrademark("")]
[assembly: AssemblyCulture("")]

Expand All @@ -75,5 +75,5 @@
// Build Number
// Revision
//
[assembly: AssemblyVersion("20.10.01.0")]
[assembly: AssemblyFileVersion("20.10.01.0")]
[assembly: AssemblyVersion("21.06.01.0")]
[assembly: AssemblyFileVersion("21.06.01.0")]
17 changes: 17 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,23 @@ Read more in Parallax forum threads:
* [VT100 terminal plugin for the GEAR emulator](https://forums.parallax.com/discussion/106651/vt100-terminal-plugin-for-the-gear-emulator)
* [GEAR: Propeller Debugging Environment](https://forums.parallax.com/discussion/91084/gear-propeller-debugging-environment)

## Version 21.06.01 - Cummulative release: bugfixes #23 #24 and bytecode documentation
* Cummulative release for bugfixes #23 & #24 and bytecode documentation.
* Include missing example file for Stimulus plugin: test.stm.

## Commits 9979938, c0fb5ae, 90271bd - Ammends to correct issue Wuerfel21#24 & better documentation
* Refactored code to correct issue Wuerfel21#24.
* Added documentation to bytecode management, using the notation from Cluso99's SPIN bytecode document on Propeller 1 Forum [https://forums.parallax.com/discussion/comment/796018/#Comment_796018].
* More documentation on InstructionDisassembler.

## Commits 5eff3e6, 0935b40 - Fix reversed assignment ops
* Fix reversed assignment ops, base solution.

## Commit 2845f4c - Bugfix Wuerfel21#23: implement opcode 0x37 with ROL pasm instruction
* Bugfix issue Wuerfel21#23: implement opcode 0x37 (Push Packed Literal) with ROL pasm instruction and not SHL, on SPIN interpreter.
* Added some documentation placeholders and remove some '@todo Documents'.
* Corrected a propeller 1 forum link, to new web structure.

## Version 20.10.01 - Added icons & images, some refresh improvements

* Icons added to almost all windows and tools, based on Visual Studio 2019 Image Library. They are in svg native format (Gear/Resources/Icons/svg & Gear/Resources/Images/svg).
Expand Down
89 changes: 89 additions & 0 deletions plug-ins/test.stm
Original file line number Diff line number Diff line change
@@ -0,0 +1,89 @@
! Below is some examples of valid stimuli
!
! Time indications are in seconds, use
! ------------------------------------
! n - for nano
! u - for micro
! m - for milli
! K - for Kilo
! M - for Mega
! Time may be given in a relative format by starting the line with a +
! but once you've done that, mixing absolute times could result in events
! that never occur. Times may be floating point eg. 1.237m is valid, and is
! the same as 1237u
!
! Pin states are:
! ---------------
! 0 - Low = zero
! 1 - High = one
! x - No longer driven
!
! The format for the clock command is:
! ------------------------------------
! clock=[pin], but this will NOT start the clock.
! One or more of the following words are required:
! high=[time] or low=[time] or period=[time] or pwm=[0.001 to 0.999]
! * the first one used determines the initial state of the clock
! * only absolute times are allowed (NO +)
! * If only one is given, then the clock is symmetrical
!
! The format for the serial port transmitter is:
! ----------------------------------------------
! Well have a look at the example, but it is NOT YET IMPLEMENTED


! Start some clocks on pins to and 3
! Clock 2 will start high then go low, clock 3 will start low then go high
500u clock=2 high=20u low=15u clock=3 low=10u high=20u

! 10 microseconds later send a message on pin 4
! NOT YET IMPLEMENTED
+10u tx=4 baud=115.2K bytes="G'Day",32,'"World"',13,$A,0 stop=1 mode=01
! 10 microseconds later send a message on pin 5, with different pin drives
! NOT YET IMPLEMENTED
+10u tx=5 baud=115.2K bytes="G'Day",32,'"World"',13,$A,0 stop=1 mode=0x

! Do some pin jiggling
+100u 10=001 17=1
+10u 10=010
+10u 10=100
+10u 10=001
+10u 10=010 17=0 stop
+10u 10=100
+10u 10=001 2=x
+10u 10=010
+10u 10=100 17=1
+10u 10=001
+10u 11=x
+10u 10=x
+10u 12=x
+50u 11=1
+50u 10=xxx 17=x stop
+50u 3=x

! Start a clock on pin 2 to demostrate a varying amount of PWM.
+20u clock=2 period=20u pwm=0.05
+20u clock=2 pwm=0.1
+20u clock=2 pwm=0.2
+20u clock=2 pwm=0.3
+20u clock=2 pwm=0.4
+20u clock=2 pwm=0.5
+20u clock=2 pwm=0.6
+20u clock=2 pwm=0.7
+20u clock=2 pwm=0.8
+20u clock=2 pwm=0.9
+20u 2=x stop

! Put the pwm at 70%, and then vary the frequency
+20u clock=3 period=20u pwm=0.2
+20u clock=3 period=25u
+25u clock=3 period=30u
+30u clock=3 period=35u
+35u clock=3 period=40u
+40u clock=3 period=45u
+45u clock=3 period=50u
+50u clock=3 period=55u
+55u clock=3 period=60u
+60u 3=x stop
! Reset the processor and go do it all again.
+500u reset

0 comments on commit c647059

Please sign in to comment.