Skip to content

Commit

Permalink
when using fsdevice, make the first 'line number' in the directory 1 …
Browse files Browse the repository at this point in the history
…instead of 0. this is the partition number on cmd devices, and apparently the c64os setup chokes on it being 0

git-svn-id: https://svn.code.sf.net/p/vice-emu/code/trunk@45321 379a1393-f5fb-40a0-bcee-ef074d9b53f7
  • Loading branch information
mrdudz committed Aug 27, 2024
1 parent bf07a5f commit 5a97e97
Showing 1 changed file with 6 additions and 5 deletions.
11 changes: 6 additions & 5 deletions vice/src/fsdevice/fsdevice-open.c
Original file line number Diff line number Diff line change
Expand Up @@ -158,18 +158,19 @@ static int fsdevice_open_directory(vdrive_t *vdrive, unsigned int secondary,
}
strcpy(bufinfo[secondary].dir, cmd_parse->parsecmd);
/*
* Start Address, Line Link and Line number 0
* Start Address, Line Link and Line number 1 (=partition 1)
*/

p = bufinfo[secondary].name;

/* start address = 0x0401 */
*p++ = 1;
*p++ = 4;

/* who knows why this is 0x0101 ? */
*p++ = 1;
*p++ = 1;

*p++ = 0;
/* CMD puts the partition number here, it shouldn't be 0 (like on 1541) so
programs that expect a CMD device are happy with it */
*p++ = 1;
*p++ = 0;

*p++ = (uint8_t)0x12; /* Reverse on */
Expand Down

0 comments on commit 5a97e97

Please sign in to comment.