Shop OBEX P1 Docs P2 Docs Learn Events
GEAR: Propeller Debugging Environment - Page 2 — Parallax Forums

GEAR: Propeller Debugging Environment

2456

Comments

  • asterickasterick Posts: 158
    edited 2007-01-22 18:14
    Updated version (1.4.0.0):

    Fixed a HUGE problem involving inplace effected memory (interpreted)
    x /= y was being processed as x := y / x (Which is bad).. Order of operations is now appropriate
    Changed the name of BusModule to PluginBase (makes more sense to me)
    Sped up the interpreted core a little bit (doesn't use the stack for internal temporary variables)
    Cleaned up the source significantly
    Fixed a minor bug in the composite video generator phase shifting code (s-video)
    Numerous bug fixes scattered about the native and interpreted cores


    It still doesn't want to work in mono, I managed to get it to compile in mono, but it threw a fit when I tried to run it.
  • Ym2413aYm2413a Posts: 630
    edited 2007-01-22 18:28
    Cool! I'm glad you added the monitor plugin!
    I wanna' play with it now.
  • asterickasterick Posts: 158
    edited 2007-01-22 18:51
    Ym2413a said...
    Cool! I'm glad you added the monitor plugin!
    I wanna' play with it now.

    It's not perfect mad.gif, but it's getting closer with every release. HSS manages to produce some form of PWM audio (it looks like it's ~80% volume solid out the speaker) I don't know if it's just producing silence before it plays audio, or if it's emulation glitching. The later is probably the case, since the TV driver never actually sets any pins out output, and locks in WAITVID.

    We'll see I guess. [noparse]:)[/noparse]
  • Ym2413aYm2413a Posts: 630
    edited 2007-01-22 21:27
    Yeah, but it's still amazing work even though its not done. ^^
    I think GEAR could really be something great.

    (Hss) output should be 50% PWM on start after a quick 0 PWM pulse during the audio COG's bootup.
    I'm looking forward to working with the Propeller some more, since I wasn't able to do anything the past few days.

    --Andrew Arsenault
  • rokickirokicki Posts: 1,000
    edited 2007-01-22 21:47
    I have to concur; gear is really quite neat! I've tried some things with it and it works really amazingly well.

    -tom
  • asterickasterick Posts: 158
    edited 2007-01-22 22:15
    You guys don't know how much it means to hear praise on my project. The last 5 minutes have been pretty one big mood boost after another. [noparse]:)[/noparse] (Check the screenshot from what I managed in the last few minutes)

    Post Edited (asterick) : 1/23/2007 12:56:50 AM GMT
    1081 x 1075 - 60K
    1464 x 1014 - 66K
  • Ym2413aYm2413a Posts: 630
    edited 2007-01-23 16:16
    Well I played around with GEAR and (Hss).
    It really seems to run the code faster and better then I thought it would!

    Althought it didn't produce the correct PWM output. (It stayed at 75% duty and wouldn't update)...
    The sound engine's code seems to jump around correctly!

    The branching order seemed fine and all parts of the program where getting hit correctly.
    So if anything it has to be a little bug for why it's not running.

    lol.gif
  • asterickasterick Posts: 158
    edited 2007-01-23 16:53
    I'm pretty sure the bug has to do with the native core. The interpreted core does well with just about everything I've thrown at it. I'm going to try hand verifying all your instructions and see if I can get it to output audio (and it was 15/16th duty, I double checked. [noparse]:)[/noparse]

    I'm trying to stick with VGA and HSS based applications since they are the easiest for be to verify the output of. (the propeller doesn't have that many instructions, so it's really only a matter of time)
  • Ym2413aYm2413a Posts: 630
    edited 2007-01-23 20:42
    Yeah, it is only a matter of time before this becomes a great development tool for the Prop. (lol)
    I'm going to write a few smaller PWM test programs and run them thru GEAR for testing reasons to find where these little bugs are.

    Who knows, It might just be a weird little bug or something. I'm going to help get to the bottom of this!

    --Andrew Arsenault
  • asterickasterick Posts: 158
    edited 2007-01-23 20:57
    I now buffer the video settings at the start of a WAITVID call (both VCFG and VSCL, which is probably waaaay wrong). I'm starting to think what the propeller does is loads a counter with PixelClocks when it is counting down a pixel, and when it reaches zero, it reloads it... same thing with frame clocks.

    Also, I've changed the way that ?x and x? works in the interpreter, it's much more random, and closer to what the actual propeller would do (negative feedback LSFR)

    Also, when the entry function of a cog returns, it stops itself, rather than reboots the propeller now (nessessary for some of the demo applications)

    There have been a few timing adjustments, and bug fixes, once I get more stuff working, I'll update again.
  • asterickasterick Posts: 158
    edited 2007-01-23 22:03
    Well, I think I squished one of the last BIG bugs in the native mode cog core... and I'm a right idiot for not noticing it before hand.

    I do delay latch on the results of various operations, for the sake of compatibility. Essentially, a operation executes, and stores it's results in 3 different values which are copied into their final destinations. This is all well and good, except those values are not preinitalized, for the sake of speed, since every instruction sets carry / zero / result to SOMETHING. Every instruction except something that is not supose to execute. This resulted in a rather unforunate incident where operations where conditions were not true were writing values to places that they should not have been, which resulted in things clobbering values with trash.

    This fixed a few problems.
  • Mike GreenMike Green Posts: 23,101
    edited 2007-01-23 22:06
    Nice program. I can run it under Windows, but I need to get GTK installed on my Mac so I can run it without having to run Windows too ... long story.
  • asterickasterick Posts: 158
    edited 2007-01-23 22:17
    Virtual machine?
  • asterickasterick Posts: 158
    edited 2007-01-23 22:27
    New release (1.5.0.0) is up, quick coverage of the changes (that I remember):

    Proper handling of condition field on native instructions
    VSCL is now buffered between WAITVID frames (VCFG is not)
    Changed behavior of Forward and Reverse random (negitive feedback LSFR, rather than rotating buffer with XOR)
    Timing fixed on instructions
    Fixed parity and other various instruction flag issues
    A cog stops rather than reboots the chip if the interpreter returns from it's starting function (stack underflow)
    Increased the size of the virtual VGA monitor plug-in (Bitmap 512x384 VGA runs at 1024x768 with pixel / line doubling)
    Included a PinNoise plugin, which plays with some pins.
    PLLs dejitter is now more accurate (uses sub-system clock accuracy)
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-01-24 00:08
    I have requested from Chip the code for generating the ? operator for you so you can accurately model it's behavior.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • asterickasterick Posts: 158
    edited 2007-01-24 01:11
    Thank you very much! I'm glad to see that the folks at parallax are taking interest. [noparse]:D[/noparse]
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-01-24 02:45
    I've been following your project with interest. I've been too busy take your program for a spin, but I can tell by your screenshots that you're doing a bang up job.

    Something I overlooked in the thread, can it work with assembly code as well? Have you thought of implementing some pattern matching to generate IDE-like spin code?

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.

    Post Edited (Paul Baker (Parallax)) : 1/24/2007 2:49:24 AM GMT
  • asterickasterick Posts: 158
    edited 2007-01-24 02:52
    Well I appreciate the interest. [noparse]:)[/noparse]

    The emulator currently emulates every aspect of the propeller except broadcast video generation because I don't know how that works. (baseband is in there though). So yes, it does do assembly, as well as interpreted.

    As far as the pattern matching, I'm avoiding doing any logic like that if I can, since the compiler's output could change in a future revision, and still be bytecode compatible. what I'm hoping to do is implement a .spin loader / compiler (MAYBE) that will create a map for the source file and let people step through that way. It's a LONG ways off though. I want to make sure the emulation is accurate, then work on all the extras like that.

    Who knows, maybe you kids will make a line tab file output for me. [noparse]:)[/noparse]
  • KlossKloss Posts: 43
    edited 2007-01-24 12:14
    Whenever I try to open a binary (even one of the simple examples from the manual),
    I get the following error.
    System is an US WinXP professional SP2, CeleronD 1.6 GHz, 512MB RAM
    Any ideas?


    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at Gear.GUI.CogViewer.Repaint(Boolean tick)
    at Gear.GUI.CogViewer.AsmSized(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
    at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
    at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)
    at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
    at System.Windows.Forms.Control.ScaleControl(SizeF factor, BoundsSpecified specified)
    at System.Windows.Forms.ScrollableControl.ScaleControl(SizeF factor, BoundsSpecified specified)
    at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.Control.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.Control.ScaleChildControls(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.ContainerControl.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean includedBounds, Boolean excludedBounds)
    at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout()
    at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean performLayout)
    at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
    at Gear.GUI.CogViewer.InitializeComponent()
    at Gear.GUI.CogViewer..ctor(Int32 host)
    at Gear.GUI.Emulator..ctor(String source)
    at Gear.GUI.GearMain.OpenFile(Object sender, EventArgs e)
    at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
    at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
    at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.ToolStrip.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Gear
    Assembly Version: 1.5.0.0
    Win32 Version: 1.5.0.0
    CodeBase: file:///F:/Propeller/Gear/Gear-1.5.0.0/Gear.exe
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
    System.Xml
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
  • Ym2413aYm2413a Posts: 630
    edited 2007-01-24 14:53
    Kloss try installing Microsoft's .net framework version 2.
    This might fix your problem. ^^
  • asterickasterick Posts: 158
    edited 2007-01-24 15:16
    That doesn't look like a .net 2 problem (all the assembly versions are 2.0.0.0 except gear itself. >_>)

    I'll look into it, thanks for giving me the trace back.

    I attached an updated executable, it should fix it (I wasn't checking to see if the emulator was initialized yet)
    Gear.zip 102.2K
  • KlossKloss Posts: 43
    edited 2007-01-24 16:09
    Didn't fix the problem, but now it takes longer before the exceprion appears.
    I have .net 2, including SP1.
    And I've already tried reinstalling it.

    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at Gear.GUI.MemoryView.Repaint(Boolean tick)
    at Gear.GUI.MemoryView.SizeChange(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
    at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
    at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)
    at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
    at System.Windows.Forms.Control.ScaleControl(SizeF factor, BoundsSpecified specified)
    at System.Windows.Forms.ScrollableControl.ScaleControl(SizeF factor, BoundsSpecified specified)
    at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.Control.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.Control.ScaleChildControls(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.ContainerControl.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean includedBounds, Boolean excludedBounds)
    at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout()
    at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean performLayout)
    at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
    at Gear.GUI.MemoryView.InitializeComponent()
    at Gear.GUI.MemoryView..ctor()
    at Gear.GUI.Emulator..ctor(String source)
    at Gear.GUI.GearMain.OpenFile(Object sender, EventArgs e)
    at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
    at System.Windows.Forms.ToolStripButton.OnClick(EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
    at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.ToolStrip.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Gear
    Assembly Version: 1.5.0.0
    Win32 Version: 1.5.0.0
    CodeBase: file:///F:/Propeller/Gear/Gear-1.5.0.0/Gear.exe
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  • asterickasterick Posts: 158
    edited 2007-01-24 16:28
    My lack of error checking is slowly biting me in the butt it would seem. [noparse]:)[/noparse]

    I've put as many "emulator not initialized" checks in as possible, should work better now.
    Gear.zip 102.2K
  • KlossKloss Posts: 43
    edited 2007-01-24 16:43
    shhhhh....

    I don't think that there is something wrong with the .net framework,
    as other programs run fine (paint.net as an example).
    Not to mention my own programs, because I use visual studio.net.


    ************** Exception Text **************
    System.NullReferenceException: Object reference not set to an instance of an object.
    at Gear.GUI.LogicProbe.OnSized(Object sender, EventArgs e)
    at System.Windows.Forms.Control.OnSizeChanged(EventArgs e)
    at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height, Int32 clientWidth, Int32 clientHeight)
    at System.Windows.Forms.Control.UpdateBounds(Int32 x, Int32 y, Int32 width, Int32 height)
    at System.Windows.Forms.Control.SetBoundsCore(Int32 x, Int32 y, Int32 width, Int32 height, BoundsSpecified specified)
    at System.Windows.Forms.Control.ScaleControl(SizeF factor, BoundsSpecified specified)
    at System.Windows.Forms.ScrollableControl.ScaleControl(SizeF factor, BoundsSpecified specified)
    at System.Windows.Forms.Control.ScaleControl(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.Control.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.Control.ScaleChildControls(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.ContainerControl.Scale(SizeF includedFactor, SizeF excludedFactor, Control requestingControl)
    at System.Windows.Forms.ContainerControl.PerformAutoScale(Boolean includedBounds, Boolean excludedBounds)
    at System.Windows.Forms.ContainerControl.PerformNeededAutoScaleOnLayout()
    at System.Windows.Forms.ContainerControl.OnLayoutResuming(Boolean performLayout)
    at System.Windows.Forms.Control.ResumeLayout(Boolean performLayout)
    at Gear.GUI.LogicProbe.InitializeComponent()
    at Gear.GUI.LogicProbe..ctor()
    at Gear.GUI.Emulator..ctor(String source)
    at Gear.GUI.GearMain.OpenFile(Object sender, EventArgs e)
    at System.Windows.Forms.ToolStripItem.RaiseEvent(Object key, EventArgs e)
    at System.Windows.Forms.ToolStripMenuItem.OnClick(EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleClick(EventArgs e)
    at System.Windows.Forms.ToolStripItem.HandleMouseUp(MouseEventArgs e)
    at System.Windows.Forms.ToolStripItem.FireEventInteractive(EventArgs e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStripItem.FireEvent(EventArgs e, ToolStripItemEventType met)
    at System.Windows.Forms.ToolStrip.OnMouseUp(MouseEventArgs mea)
    at System.Windows.Forms.ToolStripDropDown.OnMouseUp(MouseEventArgs mea)
    at System.Windows.Forms.Control.WmMouseUp(Message& m, MouseButtons button, Int32 clicks)
    at System.Windows.Forms.Control.WndProc(Message& m)
    at System.Windows.Forms.ScrollableControl.WndProc(Message& m)
    at System.Windows.Forms.ToolStrip.WndProc(Message& m)
    at System.Windows.Forms.ToolStripDropDown.WndProc(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.OnMessage(Message& m)
    at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
    at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)


    ************** Loaded Assemblies **************
    mscorlib
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
    Gear
    Assembly Version: 1.5.0.0
    Win32 Version: 1.5.0.0
    CodeBase: file:///F:/Propeller/Gear/Gear-1.5.0.0/Gear.exe
    System.Windows.Forms
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
    System
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
    System.Drawing
    Assembly Version: 2.0.0.0
    Win32 Version: 2.0.50727.42 (RTM.050727-4200)
    CodeBase: file:///C:/WINNT/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
  • BergamotBergamot Posts: 185
    edited 2007-01-24 16:51
    asterick: give Kloss a version of the app compiled in "Debug" mode, so the stack trace shows line numbers.
  • asterickasterick Posts: 158
    edited 2007-01-24 17:03
    The line numbers are not that big of a deal, I know why these exceptions are happening, I changed the way the internal tabs (which are now built around the plugin system) and I forgot to add the conditions to make sure that the object was presented with the emulator. For some reason, my machine doesn't perform any of the repaint stuff until AFTER it's been given the emulator, so I never thought to fix it.

    Although, Kloss, could you truncate down to like 4 lines in the exception text from now on? those traces are a little long.

    I'm currently smack dab in the middle of debugging like 4 asm instructions, so I'll post a new debugged version soon.
  • asterickasterick Posts: 158
    edited 2007-01-24 17:58
    Looking at your error trace, it has something to do with form components not getting initialized. The only thing I can think is that is the result of GDI+ not being up to date (IE: You are not running SP2)

    I would recommend you do that, but you can always run this executable, it's a debug build.


    It includes a fix on CMPSUB (which is probably still incorrect)

    Right now, it works like:

                if (DestinationValue >= SourceValue)
                {
                    DataResult = DestinationValue - SourceValue;
                    ZeroResult = DestinationValue == SourceValue;
                    CarryResult = true;
                }
                else
                {
                    DataResult = DestinationValue;
                    ZeroResult = false;
                    CarryResult = false;
                }
    
    




    I don't know if that's correct, but it didn't work at all last time. Before, it always subtracted source from destination. Which tried to drive the video PLL at 0.6Hz for the video generator (which it didn't like)
  • asterickasterick Posts: 158
    edited 2007-01-24 18:06
    Made a huge fix on the video generator. I wasn't updating the output to accomidate for chroma during the pixels... now it works proper.
  • Paul BakerPaul Baker Posts: 6,351
    edited 2007-01-24 19:28
    Heres the promised source for the ? operator

    [color=black][color=black]' z=1: ?x
    [/color][/color][color=black][color=black]' Z=0: x?[/color][/color]
    [color=black][color=black]                  min   x,#1              '?var/var?
    [/color][/color][color=black][color=black]                  mov   y,#32
    [/color][/color][color=black][color=black]                  mov   a,#%10111
    [/color][/color][color=black][color=black]      if_nz       ror   a,#1
    [/color][/color][color=black][color=black]:rndlp            test  x,a         wc
    [/color][/color][color=black][color=black]      if_z        rcr   x,#1
    [/color][/color][color=black][color=black]      if_nz       rcl   x,#1
    [/color][/color][color=black][color=black]                  djnz  y,#:rndlp[/color][/color]
    
    

    I asked about the line tab file and he said the way the compiler is organized it wouldn't be a trival task to generate a line tab file.

    ▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔▔
    Paul Baker
    Propeller Applications Engineer

    Parallax, Inc.
  • asterickasterick Posts: 158
    edited 2007-01-24 19:37
    Awesome! I'll get started on getting the proper random behavior implemented.

    Oh, and I added something 'new' to the logic view, mostly for my benefit... but it's nice to have none the less

    EDIT: Nice use of parity by the way. [noparse]:D[/noparse]
    929 x 715 - 59K
Sign In or Register to comment.