29jm / SnowflakeOS

"It is very special"
https://jmnl.xyz
MIT License
317 stars 18 forks source link

Loading saves in doom doesn't work #22

Closed 29jm closed 3 years ago

29jm commented 3 years ago

Steps to reproduce:

This is indeed a bug in SnowflakeOS because saves work correctly in the linux port, same source.
Unrelated, but doom is also quite affected by #15.

the-grue commented 3 years ago

Hi @29jm ! Just curious, running from a CDROM image, where does the saved file actually go?

29jm commented 3 years ago

Hi @the-grue ! The filesystem is entirely in memory (it's part of the iso and loaded into memory by grub as a module), and the save gets written there through the ext2 driver (ext2_fs_t::device is the pointer to the whole filesystem, until it gets replaced by a disk driver). There's currently no way to move data out of the system, it's all volatile. That makes the utility of a savegame discutable yeah ^^ One quick way to get a file out would be to disable printing to serial, and have a function to write a file to serial, but I've never gotten around to it.

29jm commented 3 years ago

Fixed in b2df60fdeae51c878958b2e02f16fdbbf1295eaf.