lightrec icon indicating copy to clipboard operation
lightrec copied to clipboard

Support for other MIPS cpus

Open georgemoralis opened this issue 3 years ago • 5 comments

Considering adding support for other cpus? PSP cpu is quite similar for example

georgemoralis avatar May 17 '22 04:05 georgemoralis

It would be quite a lot of work actually. And what would be the use case?

pcercuei avatar Jun 07 '22 18:06 pcercuei

i thought you should ask. :D

I have a very basic psp emu with 1 demo working (using simple mips I instructions should be easy )

https://github.com/georgemoralis/pcsp-minifire-port

this is a WIP progress for my psp emulator on ( https://github.com/georgemoralis/pcsp)

georgemoralis avatar Jun 09 '22 04:06 georgemoralis

I see several points that would need to be worked on:

  • the PSP's CPU has more instructions to be emulated, but that won't be the bigger problem.
  • the playstation's memory map is kind of assumed everywhere right now
  • is CP0 behaving the exact same as in MIPS1?
  • the CP2 interface (number of registers, size and behaviour) is assumed to be the playstation's GTE
  • CP1 emulation would be completely new
  • How would the MPU be emulated?
  • Lightrec has no icache/dcache emulation, just so you know.

pcercuei avatar Jun 09 '22 09:06 pcercuei

  • Sure more instructions are needed but i guess that sample is to be more easier atm
  • Memory maps (RAM,scratchpad,vram) already exist in memory class ( HW mapping won't be there since emu will be HLE atm)
  • CP0 has MFC0,CFC0,MTC0,CTC0,ERET I think it is quire similar
  • There isn't GTE , but vfpu
  • CP1 exists but atm it is not neccesary
  • icache is needed but from my knowledge it is not that critical atm

Maybe should be a different repo for it , since there might be a lot of different to coexist with psx rec

georgemoralis avatar Jun 09 '22 12:06 georgemoralis

The memory map may exist in your memory class, but unless you want emulation to be a slide-show, the dynarec cannot exit at every I/O opcode to call your memory class functions.

pcercuei avatar Jun 09 '22 13:06 pcercuei

And what would be the use case?

Several mips3 variants (R4600, R4300i, CXD8661R, ...) were used in various consoles and arcade boards, having a portable dynarec that support all/most of them would be interesting.

barbudreadmon avatar Oct 20 '22 12:10 barbudreadmon

Closing this issue, as I have no plans of supporting anything else than PS1. If somebody really want this, send me a pull request.

pcercuei avatar May 05 '23 08:05 pcercuei