FEZ Game-O, an open-source console

@ Jeff - Remove 4.3 references and add the 4.2 ones and you are done! :wink:

:frowning: Add an early reward for black and you’ll milk a couple more dollars out of me… :wink:

This is a good day. For game-o!

Emulator
New backing level for getting black and pin early
And the schematic is now at https://www.ghielectronics.com/catalog/product/448

I hope you are enjoying this as much as we do :slight_smile:

What are you doing in Western Australia? :wink:

Lol, or gameo. Fixed!

@ Architect - tried changing all the 4.3 stuff in the proj file to 4.2, but i’m missing something somewhere get load errors and crashes VS when I try to deploy a 4.2 app.

Hmm. Just tried in my emulator - no errors.

@ Jeff - Are you sure you have updated the references correctly (only 2 assemblies). Just did it using your emulator and it worked too. See in the picture.

Excellent! :slight_smile:

@ Architect - thanks for the help, i’ve tried multiple times, but I’m probably doing something dumb. Will attack it again when fresh on Monday!

Hi, the documentation might need a small tweak for Example 1. It may be worth pointing out that you will need to add a reference to Microsoft.SPOT.Hardware to run that example.

Jas

@ jasuk70 - done, thanks!

On another front, it looks like I’m going to have to get creative in being able to load bitmaps from resources/file system and displaying them on the screen.

First attempt:

Option Explicit On
Option Strict On

Imports Microsoft.SPOT
Imports Microsoft.SPOT.Hardware
Imports Microsoft.SPOT.Presentation.Media
Imports System.Threading

Namespace Tyrannt_O

    Public Module Module1

        Public Sub Main()
            Dim lcd As New Bitmap(190, 120)
            Dim sprite As New Bitmap(Resources.GetBytes(Resources.BinaryResources.logo), Bitmap.BitmapImageType.Gif)
            lcd.DrawImage(0, 0, sprite, 0, 0, 190, 47)
            lcd.Flush()
            Thread.Sleep(-1)
        End Sub

    End Module

End Namespace

Produced an out of memory error trying to create the sprite bitmap. (I notice there is not Resources.GetBitmap method) This is really bring back the days where I only had 16k to play with on my spectrum :slight_smile:

@ jasuk70 - One more thing. The lcd should be 160x120.

@ Architect - Did you do your 4.2 example with VS2012? How did you deploy your v4.2 app to the emulator – without editing the registry the new emulator is only available to v4.3 targetted apps. I’m assuming by the two references you mean Microsoft.SPOT.Emulator & Microsoft.SPOT.Emulator.Interface? I’ve made all changes via the visual interface, i.e. no hand editing of the .csproj

@ jasuk70 - yes game-o is made to teach the basics, simple and powerful.

To load full images on the screen, you need to break the images into smaller images, tiles. That is if you are using the bitmap class. We are experimenting with adding other methods that slow for a single paint on the full image.

Of course you already have a full bitmap, the one you flush but loading a second one and decoding it will only work on small images.

@ Jeff - Yes, I have added it to the registry, but for 4.2 not 4.3. Those are the two assemblies.

Whoops on the 190x120. Fixed that (Thanks Architect).

I dropped it to 40x40 tiles and that still didn’t work. The images were in .gif format which probably need memory to convert into a bitmap so I saved the images as 8 bit bitmap (I don’t need 16bit colour) and it managed to load the whole image and display :slight_smile:

Nice!

@ Architect -

My steps that lead to failure:

  1. with my existing project remove Microsoft.SPOT.Emulator & Microsoft.SPOT.Emulator.Interface from references via the solution explorer.
  2. Add Microsoft.SPOT.Emulator & Microsoft.SPOT.Emulator.Interface via solution explorer add->browse c:\Program files (x86)\Microsoft .NET Micro Framework\v4.2\Tools\
  3. manually removed the output directories from my working directory
  4. rebuild solution
  5. regedit and copy the key from HKEY_CURRENT_USER\Software\Microsoft.NETMicroFramework\v4.3\Emulators into v4.2 emulators.

in VS2010 created:

using System;
using Microsoft.SPOT;
namespace MFConsoleApplication13
{
    public class Program
    {
        public static void Main()
        {
            Debug.Print(
                "helloWorld");
        }
    }
}

as 4.2 console application. selected gameo-emu as deployment target. I get

Looking for a device on transport ā€˜Emulator’
Launching emulator with command line: ā€˜ā€œC:\Users\GHI\Desktop\ghigit\gameo-emulator\Gameo\bin\Debug\Gameo-emu.exeā€ ā€œ/waitfordebuggerā€ ā€œ/load:C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\mscorlib.peā€ ā€œ/load:C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Graphics.peā€ ā€œ/load:C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Hardware.peā€ ā€œ/load:C:\Program Files (x86)\Microsoft .NET Micro Framework\v4.2\Assemblies\le\Microsoft.SPOT.Native.peā€ ā€œ/load:c:\users\ghi\documents\visual studio 2012\Projects\MFConsoleApplication13\MFConsoleApplication13\bin\Debug\le\MFConsoleApplication13.peā€ā€™
Restarting interpreter…
Attaching to device…
Deployment error: failed to (re)connect debugger engine to debugging target.
The debugging target and the debugger engine failed to initialize because of unspecified device errors.
The debugger engine thread has terminated unexpectedly with error ā€˜Debugger engine could not attach to debugging target.’.

So what is different between your set-up and mine (all done on VS2012 (express)?