101010.pl is one of the many independent Mastodon servers you can use to participate in the fediverse.
101010.pl czyli najstarszy polski serwer Mastodon. Posiadamy wpisy do 2048 znaków.

Server stats:

490
active users

#micropython

4 posts4 participants0 posts today

For those not following #m68kMicroPython development, a lot has been happening rather quickly in the last couple of weeks!

There's enough support for the Toolbox now that I've been able to re-create the #Macstodon splash/loading screen with it - see below.

Big thanks to @stylus for all his hard work developing the port and making this possible!

#RetroComputing #RetroProgramming #VintageMac #Apple #Mac #MacOS #ClassicMac #68k #Python #MicroPython oldbytes.space/@smallsco/11488

#m68kMicroPython happenings: The "struct-types" branch is coming along. There are now autogenerated bindings for the following parts of the API: modmactypes.c
modqd.c
modtoolboxevent.c
modtoolboxutil.c
modwindowmgr.c

there's probably broken stuff but for instance you can now splat directly onto the screen

>>> scrn = qd.qdGlobals().screenBits
>>> n = scrn.bounds.bottom * scrn.rowBytes
>>> for i in range(n): scrn.baseAddr[i] = i

and types are checked:

>>> qd.FillRect(7, "blue")
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
TypeError: Expected int, got Rect

um well except the error message is backwards 💦

and in upstream #micropython land my exploration found that there were problems with the uctypes module and "REPR_B", so I'm working on fixing that and ensuring it stays fixed via the CI system: github.com/micropython/micropy

right at the moment, the micropython PR is failing for some reason that will probably be more obvious to me once I've had another night to recover from jet lag.

GitHubTest REPR_B & fix test failures by jepler · Pull Request #17688 · micropython/micropythonBy jepler

I am a sucker for opto-electronics, so got this discarded kit (ex CNN's London studio?)

Each button has a 36x24 LCD display and red+green LEDS.

Well-designed hardware: ColdFire (=68k) CPU, plenty of RAM, plenty of FLASH, serial port, ethernet etc.

Firmware ? Not so impressive, but very easy to get rid of:

Anybody can flash new firmware from ethernet: No userid, no password, all you need to know is the IP# and how they botched their CRC-16 implementation.

Now it runs #MicroPython :-)

Replied in thread

Doing a little iterative code development in micropython on an emulated m68k mac... I might not be so happy with the loading time if a real floppy was involved, but in an emulator it's heckin' snappy.

Clearly I need to tackle the issue that you can't REALLY draw to the same window as the terminal....

I found a nice way to interact with the S0 counting bus of my three energy meters. Every single used GPIO pin gets it's own interrupt for measuring the time in between last 1->0 change. Every 15 seconds a mqtt broadcast is done to report the average consumption. In addition a one hour and 24 hour sum array is filled too. So no need for PIO operations any more.
#Tinkering #Raspberry #PiPico2W #MicroPython

Is there anyone in the room with knowledge about #ESP32 microcontrollers?

I am playing with a #Waveshare development board that has an #AMOLED and a touchscreen, and it says it has built-in #SH8601 display driver and #FT3168 capacitive touch chip, using #QSPI and #I2C communication respectively.

waveshare.com/product/arduino/

It directly works in #Arduino with #C, but I am trying to make it work with #MicroPython.

Before I spend effort trying to compile it with #LVGL, I want to know if I could print a "Hello World" to the screen as is, and while my mind tells me that I need a driver, the sentence "built-in display driver using QSPI" makes me think that I could eventually use the display without code drivers, but I don't know how.

I'd love to see an example, if it's possible, or to be pointed to any resources that I can read in this regard. I am complete newbie.

Re-posts are appreciated.

Thank in advance 😊

www.waveshare.comESP32-S3 1.8inch AMOLED Touch Display Development Board, 32-bit LX7 Dual-core Processor, 368×448 Pixels, Accelerometer And Gyroscope Sensor, ESP32 With Display | ESP32-S3-Touch-AMOLED-1.8ESP32-S3 1.8inch AMOLED Touch Display Development Board, 32-bit LX7 Dual-core Processor, 368×448 Pixels, Accelerometer And Gyroscope Sensor, ESP32 With Display | ESP32-S3-Touch-AMOLED-1.8
Replied in thread

Are there any folks with vintage Mac programming experience who'd like to collaborate on figuring out what's next with Micropython on Mac?

I think that might be: What's the minimal set of APIs to do a fun graphical demo.

Pointers to "how to"-ish documentation in Pascal and C would be great as well, I have failed at finding this kind of stuff. (I do have Inside Macintosh but it is not a great tutorial)

#micropython
#python
#retrocomputing
#retro68
#macintosh
#m68k

Replied in thread

oh my yay, it now works well enough to save and edit a file, then import and run that file.

you could basically use an old m68k mac as a python3 (well, micropython) development system now.

don't mind the debug messages, they're as scared of you as you are of them.

Replied in thread

Whee! Now we can import files from the filesystem, as well as reading and writing files. Still haven't wrapped my head around how folders work, still can't enumerate files ..

as usual, work pushed to my micropython fork on github (which is called circuitpython, because you can't have two different forks of the "same" original project, argh).

Continued thread

Darn, I think all the easy parts of the micropython mac m68k port are done.

unfortunately, vfs_posix doesn't seem to be a good fit. I did manage to create a "file" but couldn't actually write data to it.

And while it was working in system6 I just tried it again with system7 and it's failing to start at all. boo.

github.com/jepler/circuitpytho

GitHubcircuitpython/ports/m68kmac/README.md at ports-m68kmac · jepler/circuitpythonCircuitPython - a Python implementation for teaching coding with microcontrollers - jepler/circuitpython
Continued thread

Build updated at emergent.unpythonic.net/files/

Almost all of the "full features" support level of micropython are enabled, "mpz" for long integers and "float" for floating point numbers.

Backspace works in the repl. arrow keys don't.

A TODO section in the new README lists key items to work on:

  • Correctly implement GC collection (stack + registers)
  • Add Mac API support (e.g., quickdraw, arbitrary traps)
  • Support larger heap
  • Address GPL files (RetroConsole), GitHub Actions CI, and other issues that might prevent upstream inclusion.