Commit Graph

1936 Commits

Author SHA1 Message Date
joevt
bc05593dd2 bench1: Changes to reduce variability.
Chooses the best time out of 200 times for each of the 5 runs. The number of bytes is 32KB.
Outputs a performance number MiB/s.
2024-09-24 20:45:14 -07:00
joevt
4a71dbe7bb bench1: Fixes and changes.
Change test size from 32KB to 8MB. The benchmark should last about 1 second.
Set power_on to true before running any ppc_exec_* functions.
2024-09-16 18:13:53 -07:00
dingusdev
aed250a64d Taking benchmark fixes from the nuterpreter2 branch 2024-09-16 06:22:58 -07:00
dingusdev
e2ad753f4a More clean-up 2024-09-15 18:31:36 -07:00
dingusdev
2ab23546ea One-line fix-up 2024-09-08 15:22:04 -07:00
dingusdev
9d9e826bb3 More code clean-up 2024-09-08 13:19:07 -07:00
joevt
3c2887f8c3 floppyimg: Add null floppy image converter check. 2024-09-03 06:19:07 -07:00
Rairii
8cc67b09c2 ppcmmu: Different expressions. 2024-09-03 06:09:45 -07:00
joevt
bb3e89e3af ppcexceptions: Remove unused label. 2024-09-03 06:09:10 -07:00
joevt
172dab7431 Update Open Firmware documentation.
Add New World ROM Layout notes.
Add New World Firmware version notes.
Add punctation.
Move mention of OF main fcode image from the Open Firmware kernel description section to the boot process section.
2024-09-02 19:16:18 -07:00
joevt
78da2457e8 ppcexec: Simplify next event time calculation. 2024-09-02 19:00:33 -07:00
joevt
7e70432495 ppcexec: Remove unused g_icycles_base. 2024-09-02 18:58:07 -07:00
joevt
c6060ad812 timermanager: Use decimal ints, not floats or hex. 2024-08-31 18:09:15 -07:00
joevt
f09710a5f7 viacuda: Do shutdown.
Shutdown will enter the debugger or quit depending on the execution mode.
Quit is different from shutdown since it is triggered outside the guest by using the host Quit menu item.
2024-08-31 18:09:12 -07:00
Maxim Poliakovski
de727db4c6 machineyosemite: use PCI slot names that better match device tree properties. 2024-08-29 13:19:00 +02:00
Maxim Poliakovski
671cd0c5da machineyosemite: set PCI IRQ maps. 2024-08-29 00:16:59 +02:00
Maxim Poliakovski
ef62e8b965 New API for registering PCI interrupts. 2024-08-29 00:16:59 +02:00
dingusdev
8c44da655c Documentation additions 2024-08-26 06:48:55 -07:00
dingusdev
b5850f1cd2 Slight clean-up to ppcexec 2024-08-26 06:48:40 -07:00
dingusdev
0a61970b29
Merge pull request #116 from mihaip/upstream-log
main: add more control over logging
2024-08-25 17:15:39 -07:00
Mihai Parparita
91a8e83f21 main: add more control over logging
Allow the verbosity to be adjusted.

Allow logging to be sent to stderr even when running in interpreter mode.

Allow uptime (time since program start) to be disabled. This makes it
easier to compare logs across successive runs.
2024-08-25 17:05:46 -07:00
Maxim Poliakovski
825314c869 atahd: clean up READ_MULTIPLE/WRITE_MULTIPLE. 2024-08-26 00:20:53 +02:00
dingusdev
8d9bc66a82
Merge pull request #115 from mihaip/upstream-multiple
Fixes for READ_MULTIPLE and WRITE_MULTIPLE commands
2024-08-25 06:38:15 -07:00
Mihai Parparita
52f4d847dd Fixes for READ_MULTIPLE and WRITE_MULTIPLE commands
We may be transferring less data than can fit in a chunk, so we need
to ensure that xfer_cnt is clamped to 0 when transferring the last
chunk (otherwise it remains negative, and has_data() will return true).

It's also possible that the transfer size is bigger than a chunk but not
an even multiple of the chunk size, so we need to ensure that we don't
try to transfer a whole chunk in the last iteration.

More correctly initialize the device identification struct, to report
the maximum (word 47) and current (word 59) number of blocks that can be
transferred with READ_MULTIPLE and WRITE_MULTIPLE commands.

Fix post_xfer_action to write the actual data size that was written,
as opposed to an entire chunk (which may be larger).
2024-08-24 22:51:07 -07:00
dingusdev
ebf4b0e969 minor ATA tweaks
From @Wack0's branch
2024-08-24 12:58:19 -07:00
Maxim Poliakovski
47237ff87b
Merge pull request #114 from mihaip/upstream-atahd-fix
Fix ATA HD initialization on Beige G3 when booting 9.2
2024-08-23 12:59:51 +02:00
Mihai Parparita
8d95aa5ed3 Fix ATA HD initialization on Beige G3 when booting 9.2
1f2256ec81a/7ee8b9b2 were referencing a multiple_sector_count field,
but it was never set. This was resulting in an error being returned
(`READ MULTIPLE with SET MULTIPLE==0`).` We actually should use
`sec_per_block``, which bd16b7c69e introduced.
2024-08-22 22:38:48 -07:00
dingusdev
7ee8b9b2f0 Add missing variable 2024-08-22 20:49:11 -07:00
dingusdev
1f2256ec81 Additional ATA commands
Mostly from Wack0's NT4 fork.

Co-Authored-By: Rairii <2650838+Wack0@users.noreply.github.com>
2024-08-22 20:42:43 -07:00
Maxim Poliakovski
0518f2ae2f atahd: fix DIAGNOSTICS command. 2024-08-21 23:12:53 +02:00
Maxim Poliakovski
3bf088f2c8 atahd: fix RECALIBRATE command.
Although being optional in ATA-3 and absent in >= ATA-4,
RECALIBRATE is issued by Open Firmware 3.1.1 during device
initialization. If it fails, the drive is considered non-bootable.
2024-08-21 21:21:44 +02:00
Maxim Poliakovski
bd16b7c69e atahd: implement mandatory SET_MULTIPLE_MODE command. 2024-08-21 21:21:44 +02:00
Maxim Poliakovski
f5c91968a2 idechannel: split MacIO specific stuff into a separate class.
Now we got two classes: IdeChannel and MacioIdeChannel.
The former models a generic IDE channel so it can be used elsewhere.
The latter implements MacIO specific configuration register(s)
and interrupt signaling.
2024-08-20 16:55:31 +02:00
Maxim Poliakovski
4e78ac33c5 atabasedevice: disable device interrupts on reset. 2024-08-20 15:36:12 +02:00
Maxim Poliakovski
e1acf5d160 Rename ppc_effective_address to ea. 2024-08-19 21:11:22 +02:00
dingusdev
047515d813
Merge pull request #112 from mihaip/upstream-ppc_effective_address
ppc: make ppc_effective_address into a local
2024-08-19 06:21:31 -07:00
Mihai Parparita
bdbeb742d4 ppc: remove two unused global variables
Last use of grab_return was removed in f204caa907.
grab_breakpoint was added in 2bd717e293 but
never used.
2024-08-18 22:46:52 -07:00
Mihai Parparita
e7d8e71297 ppc: make ppc_effective_address into a local
There's no reason for it to be a global, we always set it and use it
in instruction implementations, and we never read it directly.

Perhaps the compiler could optimize this away, but it's better to be
simpler (and also be easier to read).
2024-08-18 22:38:50 -07:00
Maxim Poliakovski
a34e0a4737 PCI-to-PCI bridges now return true in supports_io_space().
Doing so ensures that accesses to the I/O space are broadcasted
to the PCI-to-PCI bridges automatically.
2024-08-17 01:01:53 +02:00
Maxim Poliakovski
2c026259b1 pcibridge: improve formatting. 2024-08-17 01:01:53 +02:00
Maxim Poliakovski
cd36df5500 pcibridge: fix a bug in pci_io_write() caused by copy-and-paste coding. 2024-08-17 01:01:53 +02:00
Maxim Poliakovski
5ea7b8c5f8
Merge pull request #111 from mihaip/upstream-alignment
atapibasedevice: fix unaligned memory access
2024-08-16 12:56:08 +02:00
Mihai Parparita
372b9cae7a atapibasedevice: fix unaligned memory access
Both cmd_pkt and data_buf class members are cast to a uint16_t pointer,
so we need to make sure they are properly aligned, otherwise it is
undefined behavior.
2024-08-15 22:32:46 -07:00
Maxim Poliakovski
595478ed6f hwcomponent: add IDE_HOST component type. 2024-08-12 14:03:05 +02:00
dingusdev
a2776ddae1 Documentation update - Aug. 11, 2024 2024-08-11 17:48:55 -07:00
Maxim Poliakovski
f9338b8dd9 pcihost: broadcast I/O requests to PCI-to-PCI bridges. 2024-08-11 15:51:06 +02:00
dingusdev
dee7090071 More documentation work 2024-08-07 22:38:35 -07:00
dingusdev
2a8e5538b2 Partially addressing Issue #109
It'll be better to use a keycode file in the future. This will hopefully do for now.
2024-08-04 15:02:48 -07:00
Maxim Poliakovski
20b2fb1bef viacuda: refactor emulation of the VIA registers.
Take the DDRA and DDRB registers into account as well because
there is software that tries to change state of the pins configured
as inputs.
This commit fixes Cuda for Rhapsody.
2024-08-04 21:43:06 +02:00
Maxim Poliakovski
f096eef66d viacuda.h: cosmetic improvements. 2024-08-04 21:43:06 +02:00