Welcome, Guest. Please login or register.


Author Topic: COM file size (Read 13715 times)

Offline Under4Mhz

  • Newbie
  • Posts: 4
COM file size
« on: 2023.August.27. 02:42:46 »
I'm porting a game to the Elan Enterprise.

That game is around 24K and I'm finding that IS-Basic is only loading in the first 16K, no matter what I set in the header.

What's the maximum size of a COM file? Is it 16K?

My guess is this is why most games I've seen have a ~2K COM loader with a 32K sidecar file that it presumably loads.

I wanted to check this is correct before I tried to get around the limitation.

Online geco

  • EP addict
  • *
  • Posts: 7121
  • Country: hu
    • Támogató Támogató
Re: COM file size
« Reply #1 on: 2023.August.27. 07:14:23 »
Great :-)
No the limit of file size of COM file is around 42kb, and if you have a loader the next file to be loaded can be much bigger.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14739
  • Country: hu
    • http://enterprise.iko.hu/
Re: COM file size
« Reply #2 on: 2023.August.27. 16:27:02 »
If you use more code than the 0100h-3FFFh, then need to page in the additional segments from EXOS USR_P1 and USR_P2 variables.
Code: [Select]
LD A,(0BFFDh) ;USR_P1
OUT (0B1h),A
LD A,(0BFFEh) ;USR_P2
OUT (0B2h),A

Offline Under4Mhz

  • Newbie
  • Posts: 4
Re: COM file size
« Reply #3 on: 2023.September.02. 03:31:04 »

Offline SlashNet

  • EP addict
  • *
  • Posts: 1213
  • Country: ua
  • Enterprise 128K | Cubietruck
    • My old site about Enterprise
Re: COM file size
« Reply #4 on: 2023.September.02. 09:03:11 »
Cool!

But something going vrong. :(

[ Guests cannot view attachments ]

Online geco

  • EP addict
  • *
  • Posts: 7121
  • Country: hu
    • Támogató Támogató
Re: COM file size
« Reply #5 on: 2023.September.02. 09:27:40 »

Online geco

  • EP addict
  • *
  • Posts: 7121
  • Country: hu
    • Támogató Támogató
Re: COM file size
« Reply #6 on: 2023.September.02. 09:29:02 »
Cool!

But something going vrong. :(

The problem is incorrect file size entered into EXOS header 5, it contains the corrected file size.

Offline SlashNet

  • EP addict
  • *
  • Posts: 1213
  • Country: ua
  • Enterprise 128K | Cubietruck
    • My old site about Enterprise
Re: COM file size
« Reply #7 on: 2023.September.02. 10:14:00 »
The problem is incorrect file size entered into EXOS header 5, it contains the corrected file size.

This file produces only black screen :(

Online geco

  • EP addict
  • *
  • Posts: 7121
  • Country: hu
    • Támogató Támogató
Re: COM file size
« Reply #8 on: 2023.September.02. 10:55:31 »
This file produces only black screen :(
Please wait.

Offline SlashNet

  • EP addict
  • *
  • Posts: 1213
  • Country: ua
  • Enterprise 128K | Cubietruck
    • My old site about Enterprise
Re: COM file size
« Reply #9 on: 2023.September.02. 23:48:30 »
Please wait.

Oh. 52 seconds from the end of the download to the start screen. :smt107

Online geco

  • EP addict
  • *
  • Posts: 7121
  • Country: hu
    • Támogató Támogató
Re: COM file size
« Reply #10 on: 2023.September.03. 14:51:27 »
The problem was that FF segment was used for Graphics page, EXOS LPT is located on FF segment, and the program deleted Graphich page 1st and then changed the LPT from EXOS LPT to Game LPT, so LPT pointer remained on empty segment, and took 52 seconds until it reached a "reload" bit somewhere in the memory.
I changed Graphics segment from FF to FD, 2 byte should be patched 1 where FF segment was paged in, and other at Graphics address in LPT.
Now the game starts immediately.

Offline Under4Mhz

  • Newbie
  • Posts: 4
Re: COM file size
« Reply #11 on: 2023.September.05. 03:50:00 »
Woah, that was some serious rom hacking.

Thanks, that made it simple to fix, I would have spent days trying to figure out the LPT page issue.

I've fixed that problem as well the header size byte. I've added some sound effects and updated the colours (I had the rgb colour bits around the wrong way).

Offline SlashNet

  • EP addict
  • *
  • Posts: 1213
  • Country: ua
  • Enterprise 128K | Cubietruck
    • My old site about Enterprise
Re: COM file size
« Reply #12 on: 2023.September.05. 09:21:05 »
Cool! :)
That's much better.

I found 2 not critical bugs:

The first one came from the CPC version.
When the level is restarted, the cursor outside the redrawable area does not disappear.
[ Guests cannot view attachments ]

Second - keyboard has some strange keys definition
IJKL keys - OK
Classic QAOP keys (P doesn't work - ` instead)

External Joy 1 has wrong definitions
ExtJoy1Up - not used
ExtJoy1Down - Left
ExtJoy1Left - not used

ExtJoy1Right - Right (OK)
ExtJoy1Fire - not used
ExtJoy1Fire2 - Restart level (OK)

Online szipucsu

  • Global Moderator
  • EP addict
  • *
  • Posts: 9952
  • Country: hu
    • Támogató Támogató
    • Webnyelv.hu - Tanuljunk nyelveket!
Re: COM file size
« Reply #13 on: 2023.September.05. 15:21:06 »
It is a cool game. I played until level 10 and it was too hard for me.
I miss the sound effects.
100 SOUND SOURCE 2,STYLE 128,PITCH 25.2,SYNC 1
110 SOUND PITCH 25,SYNC 1
120 ! Videos

Online geco

  • EP addict
  • *
  • Posts: 7121
  • Country: hu
    • Támogató Támogató
Re: COM file size
« Reply #14 on: 2023.September.05. 18:17:48 »
I gave up at level 10 also after some attempts :-D , then i turned into fixing the 52 seconds issue :-)
Other small thing could be added, using FF segment if it is an ep64 machine, in this case the game could run on ep64, and a soft reset routine could be added also :-)
« Last Edit: 2023.September.05. 18:25:09 by geco »