Mercurial > hg > dmlib
changeset 2173:a5c4eb5c7309
Add read support for unknown PETSCII PRG export format (could be earlier version
from Marq's editor or such.)
author | Matti Hamalainen <ccr@tnsp.org> |
---|---|
date | Tue, 11 Jun 2019 21:14:49 +0300 |
parents | de88333acc44 |
children | 5b22533cb07d |
files | tools/lib64fmts.c |
diffstat | 1 files changed, 40 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/tools/lib64fmts.c Tue Jun 11 21:06:35 2019 +0300 +++ b/tools/lib64fmts.c Tue Jun 11 21:14:49 2019 +0300 @@ -185,6 +185,20 @@ } +static int fmtSetSPETSCIIData(const DMC64EncDecOp *op, DMC64Image *img, + const DMGrowBuf *buf, const DMC64ImageCommonFormat *fmt) +{ + (void) op; + (void) buf; + (void) fmt; + + img->extraInfo[D64_EI_CHAR_MODE] = D64_FMT_HIRES; + img->extraInfo[D64_EI_CHAR_CUSTOM] = 0; + + return DMERR_OK; +} + + static int fmtProbeKoalaPainter(const DMGrowBuf *buf, const DMC64ImageFormat *fmt) { int score = DM_PROBE_SCORE_FALSE; @@ -2397,6 +2411,32 @@ }, { + "upet", "Unknown PETSCII (unpacked)", 0x0801, 2499, DM_FMT_RD, + NULL, + NULL, NULL, + { + D64_FMT_HIRES | D64_FMT_CHAR, + D64_SCR_WIDTH , D64_SCR_HEIGHT, + D64_SCR_CH_WIDTH, D64_SCR_CH_HEIGHT, + 1, 1, + NULL, NULL, + NULL, + { + { DO_COPY , DS_SCREEN_RAM , 0x01ab, 0, 0, 0, NULL, NULL }, + { DO_COPY , DS_COLOR_RAM , 0x01ab + 1000, 0, 0, 0, NULL, NULL }, + + // For offset values see petscii/m_c64.pde :: save_prg() + { DO_SET_MEM_LO , DS_D020 , 0x01a7, 0, 0, 0, NULL, NULL }, + { DO_SET_MEM_LO , DS_BGCOL , 0x01a8, 0, 0, 0, NULL, NULL }, + { DO_FUNC , 0 , 0 , 0, 0, 0, fmtSetSPETSCIIData, NULL }, + + { DO_LAST , 0 , 0 , 0, 0, 0, NULL, NULL }, + } + }, + NULL + }, + + { "pkhu", "petscii.krissz.hu editor (unpacked)", 0x0801, 0, DM_FMT_RD, fmtProbePetsciiKrisszHu, NULL, NULL,