Commit Graph

18 Commits (master)

Author SHA1 Message Date
Nabile Rahmani 0753fbce9b - Blank the screen on invalid video state.
- Name the CPU thread.
2018-12-24 17:13:27 +01:00
Nabile Rahmani 585645d791 Somewhat fixed the SDL implementation (frame buffer scaling, hanged on Windows, did not gracefully quit everywhere).
- Blitting the frame buffer works for 240p and 480p, though due to the usage of the scale-up values, some lines don't make it through in 480p. Additionally, something is wrong with 16-bit buffers.
- Running the window thread on the main thread since the main thread created the window. Windows isn't able to poll SDL events on a different thread.
- Disposing the SDL window on the thread which created it instead of relying on the finaliser to destroy it. Not doing so triggers a segfault as DestroyRenderer gets called. No need to destroy textures when disposing of the renderer as it does it.
- Display string for Point struct.
2018-11-29 04:17:35 +01:00
Nabile Rahmani 58a454f112 First pass on video output.
- Added SDL video output.
- Send VI interrupts when the currently scanned line hits the interrupt register's.
- Added some program options related to video.
2018-06-27 16:12:46 +02:00
Nabile Rahmani 34dfe21c05 Handle cartridge swap events by updating the memory map. Reduces branching and calls. 2018-06-27 16:08:45 +02:00
Nabile Rahmani 158f01ccf9 Exception processing, interrupts, registers. 2018-01-01 18:01:59 +01:00
Nabile Rahmani cc81d9d21d As the external agent, the RCP should define its memory maps. 2017-12-20 01:20:12 +01:00
Nabile Rahmani 17dbe71cef * VR4300.Exceptions.cs: Added a custom exception.
* VR4300.cs: Fixed SLLV/SRLV not downcasting a register source.

* Debugger.InstructionFormat.cs: Added some more formatting
  exceptions.

* Program.cs:
* Cartridge.cs:
* DotN64.csproj:
* RDRAM.cs:
* PeripheralInterface.cs:
* RDRAM.ConfigIndex.cs:
* RDRAM.ConfigRegister.cs:
* PeripheralInterface.CIC.cs:
* PeripheralInterface.CICStatus.cs:
* PeripheralInterface.DeviceState.cs:
* RealityCoprocessor.RDRAMInterface.cs:
* RealityCoprocessor.PeripheralInterface.cs:

* Nintendo64.cs: Added peripherals and rewiring.

* RealityCoprocessor.PeripheralInterface.StatusRegister.cs: Moved
  write register constants to an enum, too.

* BitHelper.cs: Better method signatures.
2017-12-18 08:50:25 +01:00
Nabile Rahmani 23b06e69b5 Huge changes (too lazy to separate).
* VR4300.SystemControlUnit.StatusRegister.cs: Removed unneeded
  value.

* VR4300.SystemControlUnit.cs: Renamed method.

* VR4300.Instruction.cs: Refactored instruction contents. Now
  individual parts can be written to as well.
It is also possible to strip an instruction to its bare opcode
  identifier, or even create one from a specified opcode, so this can
  be used as a key in a dictionary of operations.
A basic ToString implementation displays the opcode of the
  instruction.

* VR4300.OpCode.cs:
* VR4300.RegImmOpCode.cs:
* VR4300.SpecialOpCode.cs: Added opcodes.

* VR4300.cs: Unified operations into a single dictionary thanks to the
  instruction refactoring.
Added ops: JAL, SLTI, XORI, BLEZL, SB, LBU, SLT, BGEZL.

* Debugger.Command.cs: Basic display of what the command is about.

* Debugger.InstructionFormat.cs: First pass of the formatter.

* Debugger.cs: Proper disassembly of instructions. Stepping also
  displays the contents of registers.
~Infinite~ count argument for stepping/disassembling.
Refactored instruction fetch into using the CPU's SysAD bus (no need
  to manually access the N64's memory maps).

* DotN64.csproj:
* RealityCoprocessor.SignalProcessor.StatusRegister.cs:
* RealityCoprocessor.DisplayProcessor.StatusRegister.cs:
* RealityCoprocessor.RDRAMInterface.RDRAMConfigIndex.cs:
* RealityCoprocessor.RDRAMInterface.RDRAMConfigRegister.cs:

* MappingEntryExtensions.cs: Saves some typing.

* BitHelper.cs: Reusable methods.

* Nintendo64.cs: More memory maps.

* Program.cs: Minor changes.

* RealityCoprocessor.Interface.cs:
* RealityCoprocessor.AudioInterface.cs:
* RealityCoprocessor.VideoInterface.cs:
* RealityCoprocessor.SerialInterface.cs: Simplified mapping accesses.

* RealityCoprocessor.DisplayProcessor.cs: Added an actual register.
Simplified mapping accesses.

* RealityCoprocessor.MIPSInterface.cs: Added dummy version register
  read.
Simplified mapping accesses.

* RealityCoprocessor.PeripheralInterface.cs: Basic DMA.
Simplified mapping accesses.

* RealityCoprocessor.RDRAMInterface.cs: Removed constants that get set
  in the boot process.
Added RDRAM registers.
Simplified mapping accesses.

* RealityCoprocessor.SignalProcessor.cs: Better types for existing
  registers and handle status writes.
Simplified mapping accesses.
2017-12-11 15:04:53 +01:00
Nabile Rahmani a6ae17a345 Use SysAD pins instead of passing maps. 2017-11-21 12:59:59 +01:00
Nabile Rahmani 449b6ebd0c A debugger appeared. 2017-11-16 08:33:04 +01:00
Nabile Rahmani 66e5efff59 Moved members in their respective place. 2017-11-04 17:59:34 +01:00
Nabile Rahmani ea629a6b16 Moved RCP interfaces inside itself. 2017-11-04 15:24:26 +01:00
Nabile Rahmani 467ea2a07d Proper CPU reset. 2017-11-04 13:43:15 +01:00
Nabile Rahmani 35932316c4 Renames. 2017-11-04 12:14:51 +01:00
Nabile Rahmani 2ebfa53387 - Fake CACHE.
- Pretty print maps.
- Main memory get.
2017-10-30 21:46:09 +01:00
Nabile Rahmani a605598241 More registers. 2017-10-30 12:55:01 +01:00
Nabile Rahmani 9da7b68741 - Reduced memory allocation and CPU usage by not using LINQ, foreach in hot paths and unsafe writes instead of array copies.
- 64-bit addressing in mapping entries instead of down-casting.
- Fixed cartridge field length.
- Adjusted ops.
2017-10-30 10:05:09 +01:00
Nabile Rahmani f938e58c2e Name change. 2017-10-09 08:21:31 +02:00