Thursday, June 12, 2008

Ngaro Updates

With recent work on Ngaro it's become possible to run Retro on many smaller systems (including phones and pdas). This has lead to a need for supporting smaller memory configurations and screen sizes.

To help reduce the work involved involved in adapting Retro to these devices, I've set I/O port 5 as a hardware query device. This can be queried by writing specific values, waiting, then reading back the result.

Since some implementations are likely to support optional hardware devices in the future, they can use this to provide Retro with information about these devices.

In the SVN repository the C implementations of Ngaro have been adapted to support this. I'm working on the JavaScript implementations and should have them ready tomorrow.

The initial capabilities that can be detected are:
  • -1 Get Amount of Memory
  • -2 Get Framebuffer Address (0 if not supported)
  • -3 Get Framebuffer Width (0 if not supported)
  • -4 Get Framebuffer Height (0 if not supported)
I've updated the Retro source to detect the framebuffer settings on startup and use them rather than relying on hardcoded values. Retro also detects the amount of memory being provided, but the memory map still needs to be configured in the source.

No comments: