digarok / flapple

Flapple Bird - A de-make of Flappy Bird for the Apple II computer
GNU General Public License v2.0
36 stars 3 forks source link

//c #1

Closed mbaran5 closed 4 years ago

mbaran5 commented 9 years ago

I've just built the source (I used KEGS emulating a IIgs ROM01, Merlin 16 4.68)

It does not load on a //c. It loads fine in AppleWin emulating a IIe. In MESS with a //c ROM, it hangs at the ProDos screen.

On the physical //c, I can see a monitor line above the Apple II PRODOS 8 loading screen.

Thoughts?

digarok commented 9 years ago

I apologize for the long delay in responding. I'm not sure why, but some users were reporting issues with running on the //c. I thought I had pushed out the wrong disk image, but if you built from source, then maybe that's not the case. I have recently pushed some small changes, nothing that should affect the //c issue, but perhaps it will. I just tested the latest build and it works across my real IIe, IIc and IIgs.

As far as the issue itself, this all stems from the Apple //c using a very different method for determining the vertical blanking. If it uses the wrong vblank code, then the //c will get suck forever waiting for a vertical blanking interval. If you wanted, you could try returning immediately from the vblank routines, or take out the calls altogether. Granted, the game might not play smoothly, but it would indicate that there are still some issues with vblank on the IIc.

A few months back I had another idea for generating the vblank signal on the //c, so I will try to find some time to do that, but it is a bit of a low priority right now. If I can get that to work, I will not only backport it to this project, but also publish that method separately.

Thanks, and sorry for the difficulty.

PS- It should still build in Merlin 16+, but I also recently updated the code to allow it to be built with Merlin 32.

mbaran5 commented 8 years ago

I was bored today and I wanted to see if I could figure this out (sorry to wake this from the dead)

I followed your suggestion and adding an RTS immedately starting after the IIc vblank routine, and that lets the game launch on my //c. It crashes shortly after when I try to play. The graphics also appear garbled.

When I run the unmodified .po (fmono only) file on the 255/0 it runs successfully.

When I run the unmodified .po (fmono only) file on the 3/4 I get a loop that occurs at D9AC via the MAME64 debugger console, which is outside of the program if I am understanding this correctly. On a physical machine (ROM 3) I get a message which states "RESTART SYSTEM-$01"

I know that ROM 3 and 4 were for memory expansion, but I am not sure why that changes how the program begins to execute.

digarok commented 4 years ago

The original code used a mouse driver interrupt for the IIc. One problem with this is that I hardcoded the mouse slot at $C4xx (slot 4). The mouse firmware moved around a decent amount across all of the Apple II families. Another issue was just that the code was hard to follow.

There is a way to directly poll VBL on the Apple IIc, and I've added new code to do that. This has been tested on MAME Apple //c and //c+ models. I will test with real hardware when I can, but I am confident this will solve VBL issues across all known models.

Please try this latest release here: https://github.com/digarok/flapple/releases/tag/v1.1

Thanks for your patience! I'm closing this but if you see further problems please open a new issue.