mame icon indicating copy to clipboard operation
mame copied to clipboard

ioprocs.h: Add read_stream::alloc_read and random_read::alloc_read_at…

Open ajrhacker opened this issue 1 year ago • 1 comments

…. These work just like read and read_at, but take a std::unique_ptr to a uint8_t buffer and attempt to newly allocate it with the requested length. If the allocation fails, these return an error code instead of throwing an exception.

  • formats/trs80_dsk.cpp: Test the JV3 writable byte without slurping in the entire file.

  • diimage.h: Retire image_feof and the pointer-allocating versions of fread.

ajrhacker avatar Oct 01 '23 18:10 ajrhacker

Well, I haven’t read the entire change, but this breaks Odyssey2 software list loading – it always returns image_error::UNSPECIFIED. This doesn’t inspire confidence.

This also doesn’t address the desire for wrappers to deal with attempting to complete a read/write that returns short. #11608 is more along the lines of where I wanted to go with this.

cuavas avatar Oct 11 '23 17:10 cuavas