bmp2dhr
bitmap to double hi-res (bmp2dhr)
“Hi all,
Looks like Bill's link to grab bmp2dhr for macos is a 404 these days. Anyone have a link to a current site for the static binary?
Thanks!” — Presley Acuna
macgui.com
usenet:comp.sys.apple2.programmer
You might want to try buckshot
apple2.gs
The Wayback machine is your friend. hoop-la.ca/apple2/appleoldies/bmp2dhr
archive.org
# https://nullprogram.com/blog/2017/08/20/ .POSIX: CC = cc CFLAGS = -DMINGW # -O3 -Wno-unused-result -Wno-format -include ctype.h all: b2d test: b2d bmp2dhr.zip unzip -oj bmp2dhr.zip bmp2dhr/bmp/lenna140.bmp ./b2d lenna140.bmp hgr ls -la LENNA140C.BIN b2d: b2d.c $(CC) $(LDFLAGS) $(CFLAGS) b2d.c -o b2d strip b2d ulong: unzip -j bmp2dhr.zip bmp2dhr/src/b2d.c bmp2dhr/src/b2d.h bmp2dhr/src/tomthumb.h grep ulong *.[ch] b2d.c: bmp2dhr.zip b2d.h tomthumb.h unzip -p bmp2dhr.zip bmp2dhr/src/b2d.c | sed -e 's/ulong/u_int32_t/g' > b2d.c b2d.h: bmp2dhr.zip unzip -p bmp2dhr.zip bmp2dhr/src/b2d.h | sed -e '/typedef unsigned long ulong;/d' -e 's/ulong/u_int32_t/g' > b2d.h tomthumb.h: bmp2dhr.zip unzip -p bmp2dhr.zip bmp2dhr/src/tomthumb.h > tomthumb.h clean: rm -fr bmp2dhr b2d b2d.c b2d.h tomthumb.h BMP2DHR lenna140.bmp LENNA140C.BIN bmp2dhr.zip: ################ DO NOT download files using make ################ # # curl -O http://www.appleoldies.ca/cc65/programs/dhgr/bmp2dhr.zip # exit 1
The makefile was tested using Linux. It should also work with macos using Xcode
developer.apple.com
Notes
- The
ulong
type needs to be 32-bits, but using the C compiler on Linux, theulong
type is usually 64-bits which won't work. Search and replace is done to turn allulong
intou_int32_t
. - The
b2d
program will build for PowerPC Mac but doesn’t work because there are some endian issues with the bitmap file format. Here is a new build of an old PowerPC static binary that works:MD5 (b2d-powerpc-apple-darwin9.zip) = 4d4de2d5e423b887a542fff368aed299
31009 bytes MD5 (b2d) = 3c3ead03d8a6bcd47b697e9852979400
123992 bytes
$
b2d
bmp2dhr 1.1.1a2 build 22 2023-09-07 modified by mmphosis on September 9, 2016. (c) Copyright Bill Buckels 2015. All Rights Reserved. Usage: b2d file.bmp [HGR] [mono] [S2] [F] [D1-D9] [L | DL [top] ... ] file.bmp required to be a Version 3 uncompressed BMP file Options: mono, 16 color, 256 color, or 24-bit mode: dhgr Apple2FullscreenColored .A2FC (Default) HGR hgr Apple2FullscreenColored .BIN mono dhgr Apple2FullscreenMonochrome .A2FM or hgr .BIN scale: full dhgr and hgr from 1 x 1 to 140 x 192 S2 half dhgr and hgr from 1 x 1 to 280 x 192 F dhgr sprite DL | L Double Lo-res or Lo-res GR fullscreen, or top mixed screen D1-9 dither D1 Floyd-Steinberg to D9 Buckels E2 | E4 error diffusion R1-100 color bleed Z1-100 cross hatching P1-16 palette See documentation for more information including additional input size info
Link
Bmp2DHR , Apple II Graphics and Googling for Heroesappleoldies.com