Scratch 2.0 Emulator

3 views
Skip to first unread message

Sabina Kehler

unread,
Aug 3, 2024, 5:31:30 PM8/3/24
to okinboskee

Well that certainly won't work then because the HAXM technology requires direct access to the underlying Intel hardware. Running High Sierra in a VM will prevent that as VirtualBox won't expose the right instructions. What is the reason behind this really non-standard setup?

You could try installing one of the ARM-based images via Android Studio and see if that would work instead since the ARM instruction set is emulated rather than virtualized with HAXM in the case of the x86 images.

My students for their tests have to develop (simple) App Inventor projects. The standard setup is the offline AI2Live with the Emulator running on Windows PCs in a lab. However, during this lockdown year, tests are remote so that students have to use their computers at home. During tests students are not allowed to use their smartphones, so the Companion is not an option. The Emulator runs fine on Windows 10 and on macs running Catalina and BigSur. I don't know much about HighSierra and Mojave, except for one single student unable to install it. My fear is that, when the exams will get closer, many more students will raise the same problem. Upgrading to BigSur is not an option to them, as the other app they need to use for their test is Scratch 1.4, a 32bits app. This is not an issue for students that have already upgraded to Catalina/BigSur, as they have more powerful macs where they can run a HighSierra VM I setup to them to run Scratch 1.4. I tried to install the Emulator in this VM but, as you said, it doesn't work.

My MacBook Pro (early 2013) is running High Sierra and runs the emulator package without issue. I think the key thing here is that this comes down to the HAXM support, which based on the information you sent from the iMac seemed like it should work without issue. Clearly that's not the case though. Please have them try the ARM support instead via Android Studio and see if using ARM (which needs to be emulated) provides a sufficient workaround for the lack of HAXM support.

I'll do that for sure tomorrow. I would also like to point out that when I say that, when I select "Connect > Emulator", nothing happens I mean that a folder shows up for a split moment in the dock but then it immediately closes.

Right, that's the emulator starting and then crashing before its icon is properly rendered. When you use Android Studio you need to start the emulator first otherwise App Inventor will try to start its own copy of the emulator.

I tested the installation of the ARM AVD (nexus 5, Android 6.0, Google). It worked fine on my Catalina mac. It successfully installed on the HighSierra mac of my student, but when I click the green flag to start the emulator I see for a split second its icon in the dock (see video) and then it closes immediately. Also, when I closed Visual Studio on the PC of my student, I got the following error log

It's possible that newer versions of the emulator don't work on High Sierra (that's originally why we released the 3.x branch for macOS because Apple removed APIs needed by the 2.x version). Looking at the crash log, it appears that an API called by the latest version of the Android emulator is returning an unexpected empty value, which is dereferenced causing the crash. One thing you could try with this configuration though is the following:

And I want to remove the window border of the emulator where the window controls like Maximize, Minimize, Close buttons are located. I can try programming my own emulator to suit my needs, but unfortunately I'm not smart enough to do that.

The end user has to install BlueStacks for that before they can use your app, plus not all computers (Especially mine; I use an 11y/o laptop that already runs like....garbage, even I am using that right now to write this post; it was quite powerful for its time though) can run BlueStacks well...

You want a miracle? Delphi Community Edition is a free, limited commercial-use compiler that allows you to develop Windows, macOS, Android, and iOS applications with a single codebase. Perhaps that is what you expect. You cannot do that with App Inventor made apps other than refactoring your app using a compiler designed to run exe files.

For more information, see Emulator on Wikipedia.An emulator is a piece of hardware or software (software-based emulators are the most common) that allows a computer or other such device to function like another piece of technology. In general, emulators run programs or other devices that were meant for another system architecture.

Interpretation Emulators use the interpretation method to read the original code and execute the instructions based on the presented code. This method may be very slow due to the instructions being decoded line by line and then interpreted on the fly.

Dynamic Recompilation is when the emulator converts large portions of code (as the program reaches it) into a format that is easier for the system architecture to execute. The system then can read the converted program in a much faster manner.

Static Recompilation is similar to Dynamic Recompilation in the respect that it converts the code into a different format. However, this method re-compiles the program into the needed format before the program runs. This method is faster while the program runs, but it does take time to convert the entire thing before execution. Problems may arise from this method, such as not being able to execute instructions that were not present at the time of recompilation.

Some users upload projects with 'Emulator' in the name that are technically not Emulators, but rather Simulators instead.[citation needed] Simulators are different to Emulators, as Simulators mimic the menu/games of a certain platform, whilst Emulators emulate the hardware, enabling users to import ROMs, and interact (usually) with the emulation. These projects with potentially misleading titles are often frowned upon by other Scratchers.[citation needed]

As an exercise I'd like to write a terminal emulator for Linux from scratch in order to understand what moving parts are involved into it. My language of choice is D (because I'm learning it currently).

It obviously doesn't have to be something big. I'd like it to have a window with a background color (and opacity, later) displaying command promt. User may type in a command and it will spew out the result. Basic stuff. Except I'm not even sure where to start.

I suppose the visual part should be handled by something like gtk (which I never worked with), but what about everything else? Can someone please describe a possible architecture and what should I be looking at?

forkphorus runs Scratch 3, 2, and 1 projects really fast by compiling them to JavaScript. Try it out by pasting a project ID or URL into the field below, selecting a project file, dropping a file on the page, or exploring the examples studio.

forkphorus is maintained by GarboMuffin and other contributors. It is a fork of Nathan's phosphorus. Its CPS-style compilation was inspired by Rhys's sb2.js. The JSZip library is used to read .sb2 and .sb3 files. The canvg library is used to render SVGs for Scratch 2 projects. The scratch-sb1-converter library is used to support Scratch 1 projects.

App Inventor provides an Android emulator for people who do not have Android devices, or who would prefer not to use one while creating apps. To use the emulator, choose Emulator from the Connect dropdown menu. The emulator should start on your computer, and connect to App Inventor so you can test your app and do live development.

The process that starts the emulator involves several programs working together. There are many things that can go wrong, such as unexpected configurations, restrictions on the network you are using, or other software running on your computer that interferes with App Inventor. For school computers, we've seen several issues that interfere with App Inventor, including firewalls on school networks, restrictions on software the the machines can run, and ports being blocked. Symptoms you might encounter include the emulator starting up and then freezing, or not starting at all, or App Inventor displaying "unable to connect" messages.

If you encounter a problem connecting to the emulator, visit the pageDebugging issues in running the App Inventor Setup Tools and the emulator on WindowsThis gives a step-by-step procedure for attempting to isolate and ifix issues. (This procedure is for Windows. The issues are the same for MacOS and we will be publishing a Mac version of this document soon.)Please go through this procedure before filing an issue on the App Inventor forum. If you eventually file an issue, first search on the forum to see if others have experienced similar problems. When you post to the forum, describe the results of the steps you tried, so that people who want to help you will have more information about where to begin.

If the problem is with only this project then there is probably something in the project that is tickling a bug in App Inventor. Please submit an issue and include the project source (aia) file. On the other hand, if the emulator won't start for any of your projects, then continue with the debugging steps here. An intermediate case is when you have a large project that has many images or sounds, or many screens. In that case, try reduced versions of the project that have fewer screens or assets to see how large things before the problem occurs.

c80f0f1006
Reply all
Reply to author
Forward
0 new messages