I actually started looking at using 9fans.net/go/draw to support it,
but it turns out ... irony of ironies ... package drawfcall does not
build on plan 9. And, the 9fans/go code itself comes with a dependency
on C. I've not gotten an answer on whether they could include
GOOS=plan9 in their CI, so that it at least builds for Plan 9. It
would be nice to have this code working.

If getting 9fans/go to build or work on Plan 9 does not work out, I
guess I'll try to find some earlier rev of the code that does build
drawfcall on plan 9, OR just fork it to get to a working Plan 9
version.

This is purely I-need-a-break work, so will not go fast; the risc-v
port is higher priority.

On Tue, Dec 16, 2025 at 6:50 PM ron minnich <[email protected]> wrote:
>
> and ... here we go:
>
> term% git/clone [email protected]:plan9foundation/ebiten
>
> fetching... \
>
> indexing 77609 objects: 100%
>
> checking out repository...
>
> term% cd ebiten/
>
> term% git/branch -n -b origin/plan9 plan9
>
> term$ cd examples/cursor
>
> term% go build
>
> term% ./cursor
>
> panic: init not implemented
>
>
> goroutine 1 [running]:
>
> github.com/hajimehoshi/ebiten/v2/internal/ui.(*UserInterface).init(...)
>
>         /usr/glenda/ebiten/internal/ui/ui_plan9.go:101
>
> github.com/hajimehoshi/ebiten/v2/internal/ui.newUserInterface()
>
>         /usr/glenda/ebiten/internal/ui/ui.go:124 +0x245
>
> github.com/hajimehoshi/ebiten/v2/internal/ui.init.0()
>
>         /usr/glenda/ebiten/internal/ui/ui.go:99 +0x13
>
>
> so it's a matter of filling in those blanks.
>
>
> On Sat, Dec 13, 2025 at 8:04 PM ron minnich <[email protected]> wrote:
>>
>> if you check out the plan9 branch of 
>> [email protected]:plan9foundation/ebiten.git, and you cd to examples/cursor, 
>> you can
>> GOOS=plan9 GOARCH=amd64 go build
>> you'll get a plan 9 binary.
>>
>> You can run it; it won't end well. All the functions you need to implement 
>> (48 of them) are stubbed out to panic.
>>
>> This is pretty much how I port unknown Go or C code to 9: stub out the stuff 
>> I don't know how to do with panic (or for that matter, Plan 9  to a new 
>> architecture, or
>> when we ported Plan 9 code to Akaros).
>>
>> Here are the functions.
>>
>> internal/ui/input_plan9.go:func (u *UserInterface) 
>> updateInputStateFromOutside(keyPressedTimes, keyReleasedTimes [KeyMax + 
>> 1]InputTime, runes []rune, touches []TouchForInput) {
>> internal/ui/input_plan9.go:func (u *UserInterface) 
>> updateInputStateForFrame() error {
>> internal/ui/input_plan9.go:func (u *UserInterface) KeyName(key Key) string {
>> internal/ui/ui_plan9.go:func (g *graphicsDriverCreatorImpl) newAuto() 
>> (graphicsdriver.Graphics, GraphicsLibrary, error) {
>> internal/ui/ui_plan9.go:func (g *graphicsDriverCreatorImpl) newOpenGL() 
>> (graphicsdriver.Graphics, error) {
>> internal/ui/ui_plan9.go:func (*graphicsDriverCreatorImpl) newDirectX() 
>> (graphicsdriver.Graphics, error) {
>> internal/ui/ui_plan9.go:func (g *graphicsDriverCreatorImpl) newMetal() 
>> (graphicsdriver.Graphics, error) {
>> internal/ui/ui_plan9.go:func (*graphicsDriverCreatorImpl) newPlayStation5() 
>> (graphicsdriver.Graphics, error) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) SetUIView(uiview uintptr) 
>> error {
>> internal/ui/ui_plan9.go:func (u *UserInterface) IsGL() (bool, error) {
>> internal/ui/ui_plan9.go:func dipToNativePixels(x float64, scale float64) 
>> float64 {
>> internal/ui/ui_plan9.go:func dipFromNativePixels(x float64, scale float64) 
>> float64 {
>> internal/ui/ui_plan9.go:func (u *UserInterface) displayInfo() (int, int, 
>> float64, bool) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) init() error {
>> internal/ui/ui_plan9.go:func (u *UserInterface) Update() error {
>> internal/ui/ui_plan9.go:func (u *UserInterface) SetForeground(foreground 
>> bool) error {
>> internal/ui/ui_plan9.go:func (u *UserInterface) RunWithoutMainLoop(game 
>> Game, options *RunOptions) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) runMobile(game Game, options 
>> *RunOptions) (err error) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) outsideSize() (float64, 
>> float64) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) update() error {
>> internal/ui/ui_plan9.go:func (u *UserInterface) SetOutsideSize(outsideWidth, 
>> outsideHeight float64) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) CursorMode() CursorMode {
>> internal/ui/ui_plan9.go:func (u *UserInterface) SetCursorMode(mode 
>> CursorMode) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) CursorShape() CursorShape {
>> internal/ui/ui_plan9.go:func (u *UserInterface) SetCursorShape(shape 
>> CursorShape) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) IsFullscreen() bool {
>> internal/ui/ui_plan9.go:func (u *UserInterface) SetFullscreen(fullscreen 
>> bool) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) IsFocused() bool {
>> internal/ui/ui_plan9.go:func (u *UserInterface) IsRunnableOnUnfocused() bool 
>> {
>> internal/ui/ui_plan9.go:func (u *UserInterface) 
>> SetRunnableOnUnfocused(runnableOnUnfocused bool) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) FPSMode() FPSModeType {
>> internal/ui/ui_plan9.go:func (u *UserInterface) SetFPSMode(mode FPSModeType) 
>> {
>> internal/ui/ui_plan9.go:func (u *UserInterface) 
>> updateExplicitRenderingModeIfNeeded(fpsMode FPSModeType) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) readInputState(inputState 
>> *InputState) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) Window() Window {
>> internal/ui/ui_plan9.go:func (m *Monitor) Name() string {
>> internal/ui/ui_plan9.go:func (m *Monitor) ensureValues() monitor {
>> internal/ui/ui_plan9.go:func (m *Monitor) DeviceScaleFactor() float64 {
>> internal/ui/ui_plan9.go:func (m *Monitor) Size() (int, int) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) AppendMonitors(mons 
>> []*Monitor) []*Monitor {
>> internal/ui/ui_plan9.go:func (u *UserInterface) Monitor() *Monitor {
>> internal/ui/ui_plan9.go:func (u *UserInterface) UpdateInput(keyPressedTimes, 
>> keyReleasedTimes [KeyMax + 1]InputTime, runes []rune, touches 
>> []TouchForInput) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) SetRenderer(renderer 
>> Renderer) {
>> internal/ui/ui_plan9.go:func (u *UserInterface) ScheduleFrame() {
>> internal/ui/ui_plan9.go:func (u *UserInterface) updateIconIfNeeded() error {
>> internal/ui/ui_plan9.go:func IsScreenTransparentAvailable() bool {
>> internal/ui/ui_plan9.go:func (u *UserInterface) initOnMainThread(options 
>> *RunOptions) error {
>> internal/ui/ui_plan9.go:func (u *UserInterface) loopGame() error {
>>
>>
>>
>> On Sat, Dec 13, 2025 at 12:25 PM ron minnich <[email protected]> wrote:
>>>
>>> https://github.com/hajimehoshi/ebiten
>>>
>>> I'm going to take a shot at turning off all linux dependencies, which 
>>> should remove GL dependencies, and see what's missing. But a look at the 
>>> graphics used on other platforms said to me that it doesn't demand too much.
>>>
>>> On Fri, Dec 12, 2025 at 1:07 PM Clout Tolstoy <[email protected]> 
>>> wrote:
>>>>
>>>> npe looks like it has limited sdl2 support. That seems how you could get 
>>>> along the fastest without having to refactor  image drawing, and IO to 
>>>> plan9 abstractions.   Ebitengine requires a bit of C  libraries that are 
>>>> unavailable on plan9/9front.
>>>>
>>>> Mainly referring to this data structure
>>>> https://github.com/hajimehoshi/ebiten/blob/7d0692124a95528ee624ab641104e7a7bf1cb4b2/internal/graphicscommand/image.go#L31
>>>>
>>>> I'm not sure which (raylib/ebiten) would feel more daunting to port 
>>>> because of those dependencies.
>>>>
>>>> If you have a source repo of your efforts, I can try  on a rpi0 or rpi4.
>>>>
>>>> Best of luck and sorry for the slight derail.
>>>>
>>>> Clout
>>>>
>>>>
>>>>
>>>>
>>>> On Thu, Dec 11, 2025, 8:37 PM ron minnich <[email protected]> wrote:
>>>>>
>>>>> My goal, for 9, was to look into a pure Go 2D game engine, to see if it 
>>>>> would work. This discussion spiraled off into thousands of other paths, 
>>>>> as things on this list are wont to do :-)
>>>>>
>>>>> But I'm still wondering if the 2D game engine in Go could work. I think 
>>>>> I'd better go look.
>>>>>
>>>>> On Thu, Dec 11, 2025 at 8:33 PM Noam Preil <[email protected]> wrote:
>>>>>>
>>>>>> Fwiw if the goal is something like this on 9, raylib is likely a much 
>>>>>> better choice. It can render entirely in software, to a framebuffer, 
>>>>>> iirc, and is entirely in C.
>
> 9fans / 9fans / see discussions + participants + delivery options Permalink

------------------------------------------
9fans: 9fans
Permalink: 
https://9fans.topicbox.com/groups/9fans/T33e3d4a8f04a347f-Mab999111e9a1d8cdc51bbded
Delivery options: https://9fans.topicbox.com/groups/9fans/subscription

Reply via email to