Mednafen Members Members   Search Search   Help Help   Register Register   Login Login   Home Home
Home » Other » PC Engine, PC-FX » PC Engine Operating System
Show: Today's Messages  :: Show Polls :: Message Navigator
Switch to threaded view of this topic Create a new topic Submit Reply
PC Engine Operating System [message #659] Thu, 08 February 2007 19:01 Go to next message
Administrator  [PM]
I've done some experiments with ISO-9660 CDFS data tracks and having the PC Engine boot from them.

The next step is to create a basic OS that will load a game or command prompt from the CDFS volume. Maybe a port or something similar to OS-9 would be pretty cool. Using the BRK+operand you can have up to 255 software interrupt routines and the Arcade card would be great for swapping between programs/stacks.


PCE_OS v1.0 (?)

Using HuC, you would generate 'overlay' files instead of iso or pce files, create an ISO-9660 iso file with these files and other graphic/pcm/data files, and patch the first 3 sectors with the PCE security sector, load sector, and inital boot program.

The system card would load a small program from sector $03 at startup, look for the _boot.os file in the CDFS table and load the 2k file. The _boot.os file sets up the system and parse through files listed in the CDFS table, storing the sector addresses for each entry into an array in memory. The _startup.sys would contain additional OS environment settings/attributes and the user file to boot(game) or the command prompt/GUI if none specified.

Things to do: A PS/2 keyboard & mouse to joypad port converter and code to read the devices if plugged into the multi-tap other than port 1.

Ideas? Suggestions? Comments?

Hmm, is there any existing OS for the 65c02?

-Rich
Re: PC Engine Operating System [message #660 is a reply to message #659 ] Thu, 08 February 2007 19:02 Go to previous messageGo to next message
Administrator  [PM]
Quote:

Using the BRK+operand you can have up to 255 software interrupt routines and the Arcade card would be great for swapping between programs/stacks.


The BRK/IRQ2 interrupt vector is used for ADPCM playback though, and from a coding perspective I found getting at the BRK operand was problematic in terms of efficiency.

What I would do was something like this:

__irq2:
pha
phx
tsx
lda $2100-offset, x

.. to index the stack, where 'offset' was the offset from the stack pointer I wanted to access. But then you need to do other things like fix up the pushed PC value, etc.

We could have a 128-entry table with something like this:

lda #interrupt_number
jsr swi
:
swi:
pha
phx
asl a
tax
jmp [swi_dispatch, x]

Then each of the 128 vectors in the swi_dispatch table point to a routine that ends with PLX/PLA/RTS. Might as well push Y while we're at it.

Quote:

settings/attributes and the user file to boot(game) or the command prompt/GUI if none specified.



Good idea; using the hi-res mode would give a nice 64-character wide screen. I could shamlessly plug the software interlacing idea for a 64x60 (8x8 font) or 64x30 (8x16) character display, but it doesn't work with all TVs. Wink

Quote:


Things to do: A PS/2 keyboard & mouse to joypad port converter and code to read the devices if plugged into the multi-tap other than port 1.


Very doable. The PS/2 interface used for the keyboard and mouse need one output (clock) and one input (data). This could be done using the SEL and D0 pins on the joypad port. Pretty sure the signaling is standard TTL too.

Quote:

Hmm, is there any existing OS for the 65c02?


I don't know of any generic ones, but the Apple and C64 computers had operating systems; with the C64 even having a graphical one (GeOS).
Re: PC Engine Operating System [message #661 is a reply to message #659 ] Thu, 08 February 2007 19:02 Go to previous messageGo to next message
Administrator  [PM]
Quote:

Very doable. The PS/2 interface used for the keyboard and mouse need one output (clock) and one input (data). This could be done using the SEL and D0 pins on the joypad port. Pretty sure the signaling is standard TTL too.



One of the main 65c02 sites has a AT/XT converter board, but they use a buffer system for it.

Btw, does the Huc6280 have the SOV pin like the 6502 chips and is it attached to anything?
Re: PC Engine Operating System [message #662 is a reply to message #659 ] Thu, 08 February 2007 19:03 Go to previous message
Administrator  [PM]
It doesn't. But if you need fast I/O response, you can map extra hardware to bits 7,6 of the data bus at a given address and do loops using BIT, which copies bits 7,6 to the N,V flags. Like this:

wait:
bit $1c00 ; read our hardware's status flags or whatever
bmi wait

.. or ..

wait:
bit $1c00
bvs wait

This is faster than 'TST #bitmask, $1C00'. This also has the advantage of not using any registers.
  Switch to threaded view of this topic Create a new topic Submit Reply
Previous Topic:Question about the VDC latch
Next Topic:PCE flashcarts
Goto Forum:
  

-=] Back to Top [=-
[ Syndicate this forum (XML) ] [ ]

Current Time: Sat May 11 05:50:55 CDT 2024
.:: Contact :: Home ::.

Powered by FUDforum.
Copyright © FUDforum Bulletin Board Software