@ Jeff - Remove 4.3 references and add the 4.2 ones and you are done!
Add an early reward for black and youāll milk a couple more dollars out of meā¦
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
What are you doing in Western Australia?
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!
@ 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
@ 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
Nice!
@ Architect -
My steps that lead to failure:
- with my existing project remove Microsoft.SPOT.Emulator & Microsoft.SPOT.Emulator.Interface from references via the solution explorer.
- Add Microsoft.SPOT.Emulator & Microsoft.SPOT.Emulator.Interface via solution explorer add->browse c:\Program files (x86)\Microsoft .NET Micro Framework\v4.2\Tools\
- manually removed the output directories from my working directory
- rebuild solution
- 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)?