Skip to content

Commit

Permalink
PDP11: Add BOOT ability to the VT device to run the Lunar Lander program
Browse files Browse the repository at this point in the history
  • Loading branch information
markpizz committed Jan 11, 2016
1 parent 542b2cb commit 6210ba2
Show file tree
Hide file tree
Showing 4 changed files with 908 additions and 7 deletions.
13 changes: 7 additions & 6 deletions .gitattributes
Original file line number Diff line number Diff line change
@@ -1,10 +1,11 @@
*.jpg binary
*.png binary
*.sln binary
*.vcproj binary
*.exe binary
*.jpg binary
*.png binary
*.sln binary
*.vcproj binary
*.exe binary
*.lda binary
*.bin binary
*.imd binary
*.rim binary
sim_rev.h export-subst
sim_rev.h export-subst

24 changes: 23 additions & 1 deletion PDP11/pdp11_vt.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,14 +246,36 @@ vt_reset(DEVICE *dptr)
return auto_config ("VT", (dptr->flags & DEV_DIS) ? 0 : 1);
}

#include "pdp11_vt_lunar_rom.h" /* Lunar Lander image */

/*
* GT4x/GT62 bootstrap (acts as remote terminal)
*
*/
t_stat
vt_boot(int32 unit, DEVICE *dptr)
{
t_stat r;
extern int32 saved_PC;
extern uint16 *M;

/* XXX should do something like vt11_set_dpc(&appropriate_ROM_image) */
return SCPE_NOFNC; /* not yet implemented */

/* Instead, since that won't be too useful.... */
/* Load and start Lunar Lander which has the potential to be fun! */
sim_set_memory_load_file (BOOT_CODE_ARRAY, BOOT_CODE_SIZE);
r = load_cmd (0, BOOT_CODE_FILENAME);
sim_set_memory_load_file (NULL, 0);
/* Lunar Lander presumes a VT device vector of 320 */
if (0320 != vt_dib.vec) { /* If that is not the case, then copy the 320 vector to */
M[vt_dib.vec >> 1] = M[0320 >> 1];
M[(vt_dib.vec >> 1) + 1] = M[(0320 >> 1) + 1];
}
M[032530>>1] = 1;
cpu_set_boot (saved_PC);
set_cmd (0, "VT SCALE=1");
set_cmd (0, "VT CRT=VR14");
return r;
}

/* SET/SHOW VT options: */
Expand Down
Loading

0 comments on commit 6210ba2

Please sign in to comment.