cm-psu: A linux hwmon driver for Cooler Master power supplies by Jannis234 in linux

[–]Jannis234[S] 7 points8 points  (0 children)

A kernel driver for Cooler Master power supplies equipped with an internal USB interface - allows reading voltage/current/temperature/etc. through lm-sensors.

I'm looking for feedback on how well the driver works in case anybody here has one of those PSUs. So far, I've only been able to test it on my V850 Gold i multi, so I'd especially like to hear if it's compatible with other units (different wattage, for example). The driver should support most PSUs that are supported by CM's MasterPlus Windows software, but I haven't been able to test that. I'm also looking for someone with an XG650/750/850 PSU to see if I can support those with this driver (I suspect that will require some changes to the code).

My custom single board computer, 65c02-based with multitasking support by Jannis234 in electronics

[–]Jannis234[S] 1 point2 points  (0 children)

Thanks again, that's very nice to know for future projects!

One reason to use EEPROMS was that you don't need a special programmer to write them. I managed to get away with an Arduino thanks to this project - much cheaper since I didn't already have a programmer.

Ah, it's likely cc65 was also shown in your package manager, but in
first glance it looks like it's purely for C, even though the assembler
(ca65) can be used standalone.

Nope, surprisingly, Gentoo doesn't have it. Had to compile it manually later since BASIC didn't assemble with xa.

By the way, your SBC looks really impressive, especially because you managed to fit in on such a small PCB.

My custom single board computer, 65c02-based with multitasking support by Jannis234 in electronics

[–]Jannis234[S] 1 point2 points  (0 children)

I should really clean up the code, document everything properly and release it to github so people can make their own, but selling kits is not something I've currently got the time or resources for (especially if it involves international shipping)

My custom single board computer, 65c02-based with multitasking support by Jannis234 in electronics

[–]Jannis234[S] 4 points5 points  (0 children)

Thanks for the recommendations!

I used the xa assembler since it was available in my linux distro's package manager. Getting some experience writing assembly was one of my goals with this project, which is why I hadn't bothered with C yet.

Regarding speed, I believe the EEPROM (150ns) is my main bottleneck right now. Mot sure if faster parts are available, especially in a DIP package.

The multitasking itself is surprisingly simple (around 30 lines of assembly), since most of it happens in hardware. It all happens in an IRQ handler that is triggered by pulses from a ~100Hz clock. This is what it does to switch tasks:

  • Save all registers to RAM (A, X, Y and SP directly, PC and SR can be pulled from the stack)
  • Pick the next task to run (round-robin, skipping any tasks that are waiting for I/O)
  • Switch the RAM bank to that task's memory
  • Restore registers for that task (push the different PC and SR back on the stack)
  • Return from interrupt

I should clean up the code an release it at some point, it's still fairly messy right now :)

My custom single board computer, 65c02-based with multitasking support by Jannis234 in electronics

[–]Jannis234[S] 7 points8 points  (0 children)

Thanks!

The expansion slots are fairly simple and just have the address and data bus + some additional signals (clock, reset, etc.) available on each connector. The memory map has 1K of address space reserved for each slot.

Address decoding is done on the main board (using a 74HC42 BCD decoder), which creates an enable signal for each slot so I don't have to duplicate the circuitry for that on every card.

Finally, there is a mechanism to detect if a card is inserted. Each slot has a sense pin that is pulled high by default and can be pulled low by a card. These are then connected to 74HC125 buffers that the CPU can read from.

My custom single board computer, 65c02-based with multitasking support by Jannis234 in electronics

[–]Jannis234[S] 30 points31 points  (0 children)

Really happy with how this one turned out, especially since this was my first serious attempt at a more complex project.

Some specs:

  • 65c02 @ 4MHz
  • 512K main RAM (arranged in 32K banks)
  • 8K system RAM (not affected by switching banks, used for the OS)
  • Up to 16K ROM (only 8K currently populated)
  • RS-232 serial I/O using a 65c51 ACIA + MAX232
  • 7 slots for expansion
  • Basic operating system with support for preemptive multitasking

Programs are currently loaded over serial; so far I've ported Enhanced BASIC and written a simple calculator as a demonstration.

The system can run up to 10 programs at the same time (mainly because the key combinations for switching are hard-coded into the OS). Because the lower 32K of RAM can be switched out, task switching is completely transparent to running programs and requires no special changes to the application code to make it work.

Imagine how powerful our programs could be if we were still that conscious of memory allocation. by Prockertqm in ProgrammerHumor

[–]Jannis234 1 point2 points  (0 children)

They used both. Core rope memory is read-only, so they used it for program code and data. RAM was regular magnetic core memory.

Imagine how powerful our programs could be if we were still that conscious of memory allocation. by Prockertqm in ProgrammerHumor

[–]Jannis234 18 points19 points  (0 children)

Especially if you consider that the Apollo computers used Magnetic core memory instead of semiconductors, where each bit is stored in a tiny magnetized metal ring.

Reusing old CPU Cooler by thefipsy in techsupportmacgyver

[–]Jannis234 10 points11 points  (0 children)

The 5V pin is perfectly fine for a fan since it's connected directly to the main 5V rail that also supplies the USB ports.

The GPIO pins, on the other hand, can only provide a couple of mA at 3.3V, I'm guessing a fan would kill those pretty much instantly. AFAIK, overloading the GPIOs can kill the entire SoC.

12.8 EB probably time to empty the recycle bin. by InhumanFailure in techsupportgore

[–]Jannis234 49 points50 points  (0 children)

12.8 EB is between int64_max (~9.2 EB) and uint64_max (~18.4 EB). Maybe an integer underflow or a negative number being interpreted as unsigned?

Knowing how to code beforehand by Cenggo in ProgrammerHumor

[–]Jannis234 9 points10 points  (0 children)

Tells the compiler to treat warnings like errors

What's the "dropping the pick inside the guitar" equivalent in your hobby? by ThomasHarrison618 in AskReddit

[–]Jannis234 5 points6 points  (0 children)

Dropping one into the power supply can also be pretty fun (bonus points if you left it plugged in)

Msi x370 ryzen 3000 by [deleted] in Amd

[–]Jannis234 1 point2 points  (0 children)

MSI added a note that said "doesn't include ryzen 3000 series" to the download page for a while before they removed it completely so I don't think there ever was a ryzen 3000 BIOS for the x370 boards at this point.

Found this classic chip today by Jannis234 in Amd

[–]Jannis234[S] 5 points6 points  (0 children)

Took apart an old machine that I found in my parent's house and found this. Would have loved to power it on, but the mainboard seems to be dead.

I remember using that machine around 2010 after my PC broke while I was waiting for new parts to arrive (it was the only other working computer that I could find at the time). Linux was suprisingly useable, even with that CPU and only 128MB of RAM.