Re: [hatari-devel] STX (Pasti support) |
[ Thread Index |
Date Index
| More lists.tuxfamily.org/hatari-devel Archives
]
Hi,
On lauantai 18 helmikuu 2012, Fredrik Olsson wrote:
> I am new to Hatari dev, diffs, and CMake so I thought I should get some
> verification that I am doing the right thing before I do something
> completely off the tracks.
>
> I have implemented rudimentary support for STX (Pasti) disk images.
> Currently it only supports unprotected disks with 512bytes sectors (More
> support requires some rewrites that I want input on first). Many, but
> far from all, images from http://www.atarimania.com/ works now. Bad
> Company works and boots as expected. Whereas Bombuzal and Dungeon master
> disks can be browsed in GEM, but fails copy protection checks due to
> missing timing and fuzzy sectors.
>
> I have attached my patch as diff-file for the 1.6.1 source tree. I only
> have access to a Mac OS X machine, so I would also be glad if it could
> be verified to work on Linux. And also get input on coding style, and
> what is the official route for submitting patches?
>
> I have added stx.h/stx.c, and modified floppy.c/createBlankImage.c. And
> relevant CMakeLists.txt.
Thanks!
I haven't tried this yet, but on quick look the changes look good to me.
Some comments:
* You should use Use Uint8 / Uint16 / Uint32 in STX structs instead of
unsigned chars, shorts and longs. Longs can be 64-bit on 64-bit machines.
* Why pragma pack is used for STX struct typedefs in stx.c?
All the structure members seem to be aligned on their natural boundaries
and structures sizes are aligned to 64-bits so I don't think compiler
would pad them...
* You had the autogenerated conftypes.py file in your patch. It's better
if you use "hg diff" for doing the diff, that ignores autogenerated
files.
- Eero