Improved GEAR Emulator

2»

Comments

  • yetiyeti Posts: 453
    edited November 4 Vote Up0Vote Down
    Can someone please drop some hints here how to build Gear using Mono on Linux (Debian/Devuan).
    Or add the hints to Gear's readme at GitHub?
    ◁ FastSpin ▷ ◁ Stay OmmmmmmPtimistic! ▷ ◁ No Source – No Go! ▷ ◁ Please help: http://rosettacode.org/wiki/Category:Spin ▷ ◁ Why Asimov's Laws of Robotics Don't Work - Computerphile ▷ ◁ DNA is a four letter word. ▷
  • You don't need to compile it. You can just run the binary (mono's binaries are arch independent)
    [red@apophenia:~/Downloads/gear]$ unzip  ../GEAR_V14_07_03.zip
    Archive:  ../GEAR_V14_07_03.zip
      inflating: Changes and corrections-ASB.txt
      inflating: Gear.exe
      inflating: licence.txt
      inflating: PinNoise.xml
      inflating: Plugins notes.txt
      inflating: readme.txt
      inflating: SerialIO.xml
      inflating: Stimulus.xml
      inflating: Television.xml
      inflating: test.stm
      inflating: vgamonitor.xml
    
    [red@apophenia:~/Downloads/gear]$ file Gear.exe
    Gear.exe: PE32 executable (GUI) Intel 80386 [b]Mono/.Net assembly[/b], for MS Windows
    
    [red@apophenia:~/Downloads/gear]$ mono Gear.exe
    Gtk not found (missing LD_LIBRARY_PATH to libgtk-x11-2.0.so.0?), using built-in colorscheme
    

    s.pngs.png
    1075 x 663 - 24K
  • (Unless you're actually wanting to compile it of course - if that's the case let us know and we'll see if we can work it out together)
  • So, you know I had to right? ;-)
    [nix-shell:~/s]$ git clone https://github.com/davispuh/gear-emu  # Downloads the latest from github
    [nix-shell:~/s]$ cd gear-emu/
    [nix-shell:~/s/gear-emu]$ xbuild /p:Configuration=Release  # The magic (yet deprecated) incantation.
    
    >>>> xbuild tool is deprecated and will be removed in future updates, use msbuild instead <<<<
    
    XBuild Engine Version 14.0
    Mono, Version 5.8.0.108
    Copyright (C) 2005-2013 Various Mono authors
    
    Build started 11/4/2018 9:43:41 PM.
    __________________________________________________
    Project "/home/red/s/gear-emu/gear.sln" (default target(s)):
            Target ValidateSolutionConfiguration:
    ⋮
                                    Microsoft (R) Visual C# Compiler version 2.3.2.61928 (ec1cde8b)
                                    Copyright (C) Microsoft Corporation. All rights reserved.
                            Target _CopyDeployFilesToOutputDirectoryPreserveNewest:
                                    Creating directory '/home/red/s/gear-emu/Gear/bin/Release/Resources'
                                    
    ⋮
    Build succeeded.
             0 Warning(s)
             0 Error(s)
    
    Time Elapsed 00:00:06.0526560
    
    [nix-shell:~/s/gear-emu]$ mono Gear/bin/Release/Gear.exe
    

  • __red__ wrote: »
    So, you know I had to right? ;-)

    Saw that coming :P Glad you got it working :) nicely done
    David
    PropWare: C++ HAL (Hardware Abstraction Layer) for PropGCC; Robust build system using CMake; Integrated Simple Library, libpropeller, and libPropelleruino (Arduino port); Instructions for Eclipse and JetBrain's CLion; Example projects; Doxygen documentation
    CI Server: http://david.zemon.name:8111/?guest=1
  • yetiyeti Posts: 453
    edited November 5 Vote Up0Vote Down
    I tried this (some days ago) and my builds on Debian9/amd64 failed with:
    (((lots of similar lines omitted)))
            CSC: error CS0518: The predefined type `System.IntPtr' is not defined or imported
            CSC: error CS0518: The predefined type `System.UIntPtr' is not defined or imported
            CSC: error CS0518: The predefined type `System.RuntimeFieldHandle' is not defined or imported
            CSC: error CS0518: The predefined type `System.RuntimeTypeHandle' is not defined or imported
            CSC: error CS0518: The predefined type `System.Exception' is not defined or imported
    
             0 Warning(s)
             31 Error(s)
    
    Time Elapsed 00:00:02.3771650
    
    There may be some "libraries" missing but not knowing much more about DotNet than just its name I'm lost there.
    $ LANG= aptitude search '~i ^mono*' | cat # piping yields terminal width independent output format
    i A mono-4.0-gac - Mono GAC tool (for CLI 4.0)
    i A mono-csharp-shell - interactive C# shell
    i  mono-devel - Mono development tools
    i A mono-gac - Mono GAC tool
    i A mono-mcs - Mono C# 2.0 / 3.0 / 4.0 / 5.0  compiler for CLI 2.0 / 4.0 / 4.5
    i A mono-runtime - Mono runtime - default version
    i A mono-runtime-common - Mono runtime - common files
    i A mono-runtime-sgen - Mono runtime - SGen
    i A mono-xbuild - MSBuild-compatible build system for Mono
    
    I simply assumed, installing `mono-devel` would depend on all necessary stuff. :-(

    Some minutes later while looking at the head of the log...
    XBuild Engine Version 14.0
    Mono, Version 4.6.2.0
    Copyright (C) 2005-2013 Various Mono authors
    
    Maybe there's a fresher Mono in backports?
    $ LANG= apt-cache policy mono-devel 
    mono-devel:
      Installed: 4.6.2.7+dfsg-1
      Candidate: 4.6.2.7+dfsg-1
      Version table:
     *** 4.6.2.7+dfsg-1 500
            500 http://ftp.de.debian.org/debian stretch/main amd64 Packages
            100 /var/lib/dpkg/status
    
    So "stable-backports" has no fresher stuff.

    Trying weird stuff like
    $ xbuild /p:Configuration=Release /p:TargetFrameworkVersion="v4.5"
    
    results in a `Gear.exe` binary that starts but crashes wile loading a `*.binary`.
    That was my status quo 2 days ago.

    I really just poke around aimlessly in the Mono universe.
    Please laugh later...
    ◁ FastSpin ▷ ◁ Stay OmmmmmmPtimistic! ▷ ◁ No Source – No Go! ▷ ◁ Please help: http://rosettacode.org/wiki/Category:Spin ▷ ◁ Why Asimov's Laws of Robotics Don't Work - Computerphile ▷ ◁ DNA is a four letter word. ▷
  • yeti wrote: »
    results in a `Gear.exe` binary that starts but crashes wile loading a `*.binary`.

    Admittedly I have not attempted to load a .binary yet. Let me see what I can do...
  • __red__ wrote: »
    Admittedly I have not attempted to load a .binary yet. Let me see what I can do...
    So you can reproduce this crash?
    ◁ FastSpin ▷ ◁ Stay OmmmmmmPtimistic! ▷ ◁ No Source – No Go! ▷ ◁ Please help: http://rosettacode.org/wiki/Category:Spin ▷ ◁ Why Asimov's Laws of Robotics Don't Work - Computerphile ▷ ◁ DNA is a four letter word. ▷
  • Yes - it crashes for me here too. The older version attached to the first post however does work.
    [red@apophenia:~/projects/sp]$ mono /nix/store/mnb5wfkawlmskabfzykgxavd6f34k0sw-gear-emu-2015-07-14/bin/Gear.exe
    Gtk not found (missing LD_LIBRARY_PATH to libgtk-x11-2.0.so.0?), using built-in colorscheme
    System.NullReferenceException: Object reference not set to an instance of an object
      at Gear.GUI.SpinView.Repaint (System.Boolean force) [0x000c2] in <8b5bab8ab7a24c02aa57663778500dfc>:0
      at Gear.GUI.SpinView.OnSize (System.Object sender, System.EventArgs e) [0x0004c] in <8b5bab8ab7a24c02aa57663778500dfc>:0
      at (wrapper delegate-invoke) <Module>.invoke_void_object_EventArgs(object,System.EventArgs)
      at System.Windows.Forms.Control.OnSizeChanged (System.EventArgs e) [0x00026] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Control.UpdateBounds (System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height, System.Int32
    clientWidth, System.Int32 clientHeight) [0x000da] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Control.UpdateBounds (System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height) [0x0004a] in
    <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Control.SetBoundsCoreInternal (System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height, Syst
    em.Windows.Forms.BoundsSpecified specified) [0x00110] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Control.SetBoundsCore (System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height, System.Windo
    ws.Forms.BoundsSpecified specified) [0x00000] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Control.SetBoundsInternal (System.Int32 x, System.Int32 y, System.Int32 width, System.Int32 height, System.W
    indows.Forms.BoundsSpecified specified) [0x00058] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at (wrapper remoting-invoke-with-check) System.Windows.Forms.Control.SetBoundsInternal(int,int,int,int,System.Windows.Forms.BoundsSp
    ecified)
      at System.Windows.Forms.Layout.DefaultLayout.LayoutDockedChildren (System.Windows.Forms.Control parent, System.Windows.Forms.Control
    [] controls) [0x001c6] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Layout.DefaultLayout.Layout (System.Object container, System.Windows.Forms.LayoutEventArgs args) [0x00013] i
    n <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Control.OnLayout (System.Windows.Forms.LayoutEventArgs levent) [0x0006d] in <8254e6010dae4d09ac0767af6dcc75a
    f>:0
      at System.Windows.Forms.ScrollableControl.OnLayout (System.Windows.Forms.LayoutEventArgs levent) [0x00013] in <8254e6010dae4d09ac076
    7af6dcc75af>:0
      at System.Windows.Forms.ContainerControl.OnLayout (System.Windows.Forms.LayoutEventArgs e) [0x00000] in <8254e6010dae4d09ac0767af6dc
    c75af>:0
      at System.Windows.Forms.Control.PerformLayout (System.Windows.Forms.Control affectedControl, System.String affectedProperty) [0x0005
    a] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Control.PerformLayout () [0x00000] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at Gear.GUI.SpinView.InitializeComponent () [0x003ee] in <8b5bab8ab7a24c02aa57663778500dfc>:0
      at Gear.GUI.SpinView..ctor (Gear.EmulationCore.PropellerCPU chip) [0x00030] in <8b5bab8ab7a24c02aa57663778500dfc>:0
      at (wrapper remoting-invoke-with-check) Gear.GUI.SpinView..ctor(Gear.EmulationCore.PropellerCPU)
      at Gear.GUI.Emulator..ctor (System.String source) [0x0006a] in <8b5bab8ab7a24c02aa57663778500dfc>:0
      at (wrapper remoting-invoke-with-check) Gear.GUI.Emulator..ctor(string)
      at Gear.GUI.GearDesktop.OpenBinaryButton_Click (System.Object sender, System.EventArgs e) [0x00057] in <8b5bab8ab7a24c02aa5766377850
    0dfc>:0
      at System.Windows.Forms.ToolStripItem.OnClick (System.EventArgs e) [0x00019] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.ToolStripButton.OnClick (System.EventArgs e) [0x00017] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.ToolStripItem.HandleClick (System.Int32 mouse_clicks, System.EventArgs e) [0x00029] in <8254e6010dae4d09ac07
    67af6dcc75af>:0
      at System.Windows.Forms.ToolStripItem.FireEvent (System.EventArgs e, System.Windows.Forms.ToolStripItemEventType met) [0x00054] in <
    8254e6010dae4d09ac0767af6dcc75af>:0
      at (wrapper remoting-invoke-with-check) System.Windows.Forms.ToolStripItem.FireEvent(System.EventArgs,System.Windows.Forms.ToolStrip
    ItemEventType)
      at System.Windows.Forms.ToolStrip.OnMouseUp (System.Windows.Forms.MouseEventArgs mea) [0x00048] in <8254e6010dae4d09ac0767af6dcc75af
    >:0
      at System.Windows.Forms.Control.WmLButtonUp (System.Windows.Forms.Message& m) [0x00078] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Control.WndProc (System.Windows.Forms.Message& m) [0x001b4] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.ScrollableControl.WndProc (System.Windows.Forms.Message& m) [0x00000] in <8254e6010dae4d09ac0767af6dcc75af>:
    0
      at System.Windows.Forms.ToolStrip.WndProc (System.Windows.Forms.Message& m) [0x00000] in <8254e6010dae4d09ac0767af6dcc75af>:0
      at System.Windows.Forms.Control+ControlWindowTarget.OnMessage (System.Windows.Forms.Message& m) [0x00000] in <8254e6010dae4d09ac0767
    af6dcc75af>:0
      at System.Windows.Forms.Control+ControlNativeWindow.WndProc (System.Windows.Forms.Message& m) [0x0000b] in <8254e6010dae4d09ac0767af
    6dcc75af>:0
      at System.Windows.Forms.NativeWindow.WndProc (System.IntPtr hWnd, System.Windows.Forms.Msg msg, System.IntPtr wParam, System.IntPtr
    lParam) [0x00085] in <8254e6010dae4d09ac0767af6dcc75af>:0
    

    I know nothing about C# with leaves us with three options.
    i. Find a C#/.net guru.
    ii. bisect/blame the codebase until we find the offending change.
    iii. Stick to the released version above.
  • iv. Add to SpinSim whatever makes us happier...
    ◁ FastSpin ▷ ◁ Stay OmmmmmmPtimistic! ▷ ◁ No Source – No Go! ▷ ◁ Please help: http://rosettacode.org/wiki/Category:Spin ▷ ◁ Why Asimov's Laws of Robotics Don't Work - Computerphile ▷ ◁ DNA is a four letter word. ▷
  • Bisected:
    BOOM d889e1a04e8ee4302cf3cecc56964f56c8cf136a Fri Aug 29 20:06:25 2014 -0400
    ERR  1378cd810f8f06b19845966bc3b5b98b810fae83 Thu Aug 28 18:20:18 2014 -0400
    ERR  57836aaa719cbe386bcc2674aaae603937649285 Wed Aug 27 18:11:20 2014 -0400
    ERR  32b3011e39f878b749906edd57e60a9324592009 Wed Aug 27 00:43:28 2014 -0400
    ERR  9c82e6e15622fd3d1f3245193e8f4b182a5e73df Mon Aug 25 18:58:24 2014 -0400
    ERR  459f057f12bc968a6642e2c7223f70fa3e72d402 Wed Aug 13 03:32:00 2014 -0400
    ERR  100c0f1cfbe7eca95971c99077ff28f677c48a22 Tue Aug 12 20:08:51 2014 -0400
    ERR  947fa1ba08abd29ab4c97910fa8e57083c430cf0 Tue Aug 12 08:00:41 2014 -0400
    GOOD eef5fee5f8dcc6176a09d75c2203fa266a833e52 Fri Aug 8 18:16:09 2014 -0400
    

    It looks like some serious refactoring was done between 947fa1ba and 1378cd81. ERR, in the context above means that mono was unable to compile it.

    At the end of said refactoring, it crashes after loading a binary.

    Nix has packages for versions of mono:
    mono-4.4.2.11
    mono-4.6.2.16
    mono-4.8.1.0
    mono-5.0.1.1
    mono-5.14.0.177
    mono-5.4.1.6
    mono-5.8.0.108
    

    I can write a quick script to compile the current master under each of these versions and test it (in case the GUI api has changed underneath it).



  • __red____red__ Posts: 439
    edited November 5 Vote Up0Vote Down
    /nix/store/g4kjlw9c4rmhdi0x1p25zfywv7yij50c-mono-4.4.2.11   2 Warnings (still crashes)
    /nix/store/pns5993p7zc6j5vdjdmn27xj6cimdk2h-mono-4.6.2.16   1 Warnings (still crashes)
    /nix/store/ic5qiz4xrlwmiiia7618zw1ysqqmhjf2-mono-4.8.1.0    1 Warnings (still crashes)
    /nix/store/i1a62m9nkvxvamfqbraahcw9kbw3dbad-mono-5.0.1.1    0 Warnings (still crashes)
    /nix/store/1m935f07rqj2b7k8xaxm2zkgac4rrflr-mono-5.4.1.6    0 Warnings (still crashes)
    /nix/store/xhshcsj9452rq4m8549hdkjl4ipsvc56-mono-5.8.0.108  0 Warnings (still crashes)
    /nix/store/k5ic0l9j1dv80n8s56lrxzw3ar7sh0m2-mono-5.14.0.177 0 Warnings (still crashes)
    

    I guess this tells us that this isn't a mono versioning problem.
  • yetiyeti Posts: 453
    edited November 5 Vote Up0Vote Down
    :-(
    Maybe we can ping @Gatuno?
    ◁ FastSpin ▷ ◁ Stay OmmmmmmPtimistic! ▷ ◁ No Source – No Go! ▷ ◁ Please help: http://rosettacode.org/wiki/Category:Spin ▷ ◁ Why Asimov's Laws of Robotics Don't Work - Computerphile ▷ ◁ DNA is a four letter word. ▷
  • Ok... one chance more... \o/
    ◁ FastSpin ▷ ◁ Stay OmmmmmmPtimistic! ▷ ◁ No Source – No Go! ▷ ◁ Please help: http://rosettacode.org/wiki/Category:Spin ▷ ◁ Why Asimov's Laws of Robotics Don't Work - Computerphile ▷ ◁ DNA is a four letter word. ▷
  • https://github.com/davispuh/gear-emu/issues/14#issuecomment-436005538
    :-(
    Can't help: My MonoDevelop crashes faster than I can find the debugger in it.
    ◁ FastSpin ▷ ◁ Stay OmmmmmmPtimistic! ▷ ◁ No Source – No Go! ▷ ◁ Please help: http://rosettacode.org/wiki/Category:Spin ▷ ◁ Why Asimov's Laws of Robotics Don't Work - Computerphile ▷ ◁ DNA is a four letter word. ▷
  • GatunoGatuno Posts: 22
    edited November 6 Vote Up0Vote Down
    Hello!
    First of all I want to greet you for interest on use Gear Emulator.
    Keeping in mind that you are trying to compile in Linux with mono, I can tell you I never was successful on that. It compiled ON WINDOWS with mono.
    The main reason 4 years ago was the System.Windows.Forms class was not ported to linux, working only in Win*. That class is the main application framework of the app.
    Maybe the mono project had ported it?
  • @Gatuno, thanks for answering!

    Mono is like a foreign parallel dimension to me, but I see something packaged n Debian9 that "smells" like a "System.Windows.Forms" package.
    $ apt-cache search system.windows.forms
    libmono-system-windows-forms-datavisualization4.0a-cil - Mono System.Windows.Forms.DataVisualization Library (for CLI 4.0)
    libmono-system-windows-forms4.0-cil - Mono System.Windows.Forms Library (for CLI 4.0)
    
    ◁ FastSpin ▷ ◁ Stay OmmmmmmPtimistic! ▷ ◁ No Source – No Go! ▷ ◁ Please help: http://rosettacode.org/wiki/Category:Spin ▷ ◁ Why Asimov's Laws of Robotics Don't Work - Computerphile ▷ ◁ DNA is a four letter word. ▷
  • GatunoGatuno Posts: 22
    edited November 6 Vote Up0Vote Down
    I think the second one is the required for runtime, but base package is other. I use:
    $apt-cache search mono-system-windows
    ...
    libmono-system-windows4.0-cil - Mono System.Windows library (for CLI 4.0)
    

    As I read on https://www.mono-project.com/docs/gui/winforms/ now it would be possible to compile.
    There is a interesting "Guide Porting Winforms Applications" - https://www.mono-project.com/docs/gui/winforms/porting-winforms-applications/, with some assistant.

    I hope I have been helpful.

  • Gatuno - that actually helps a ton, thank you.

    I'll update once I have those dependancies resolved.
Sign In or Register to comment.