Author Topic: mode 13h Screen capture routine  (Read 2914 times)

0 Members and 1 Guest are viewing this topic.

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
mode 13h Screen capture routine
« on: June 03, 2008 »
This one took awhile to get around to doing but I finally knuckled down and had a look at the bmp format and this screen capture routine is the result it. This routine is ready to use out of the box just find the terminating ret byte (opcode 0xC3) from the end of your com file and replace it with the contents of SCREEN.BIN all offsets that are required are calculated within the routine. And its just 179 bytes in size.

Challenge Trophies Won:

Offline Rbz

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 2757
  • Karma: 493
    • View Profile
    • https://www.rbraz.com/
Re: mode 13h Screen capture routine
« Reply #1 on: June 04, 2008 »
I didn't have tested it yet, but it's useful because sometimes dosbox does not work with certain types of DOS intros.
I had some problems when uploading dos intros to Intro-Inferno and I just give up coz I didn't have a screen shoot  :)

Challenge Trophies Won:

Offline Jim

  • Founder Member
  • DBF Aficionado
  • ********
  • Posts: 5301
  • Karma: 402
    • View Profile
Re: mode 13h Screen capture routine
« Reply #2 on: June 04, 2008 »
Can you really assume that a com program doesn't store data after the final ret which would overwrite this extension?
Jim
Challenge Trophies Won:

Offline rain_storm

  • Here comes the Rain
  • DBF Aficionado
  • ******
  • Posts: 3088
  • Karma: 182
  • Rain never hurt nobody
    • View Profile
    • org_100h
Re: mode 13h Screen capture routine
« Reply #3 on: June 04, 2008 »
@rbz that is exactly why I really needed this routine it was so useful to me that I just had to share it

@jim it will definately fail if the program writes its own stuff to end of file

However it is not so difficult to modify a demo so that this can be avoided. but in many cases the subroutine can simply be pasted in as is with a hex editor. It will save much time for many intros but for those cases where it fails its back to the old way of doing a screen shot.

Challenge Trophies Won: