Welcome, Guest. Please login or register.


Author Topic: IRQ-loading - would this be possible on the EP? (Read 10567 times)

Offline Sdw

  • User
  • *
  • Posts: 50
IRQ-loading - would this be possible on the EP?
« on: 2016.September.11. 23:49:20 »
While programming my demo "First Contact", I was limited to what I could fit into a single tape-load (48kb) since loading from tape via audio-port from PC is the only way I can load things into my Enterprise.
I think I could have fit a bit more in if I loaded a smaller .com file, and then did file-loading from EXOS? Still, the limiting factor is still what fits into memory.
I had some ideas for effects that simply used too much memory (they would need to us almost all VRAM, and then quite a bit of stuff in normal RAM as well).
One solution would be to simply rely on a memory expansion being installed, but that seems like a "cheating" solution, and also not in the spirit of using what was available at the time (mid 80ies) when the computer was out.
However, if I understand correctly, the EXDOS expansion which allowed you to connect diskdrives was actually available back in those days?

On the C64 (which is what I grew up with) we have this technique called "IRQ-loading", which is where you can have an IRQ playing music that keeps running, even while you load new content from disk. That allows you to have longer demos with a continuous flow (music doesn't stop) while still using large amounts of RAM for each part.

Does anyone know if this is technically possible to do on the Enterprise?

Offline endi

  • EP addict
  • *
  • Posts: 7298
  • Country: hu
  • grafikus, játékfejlesztõ, programozás, scifi, tudományok, vallás
    • Honlapom
Re: IRQ-loading - would this be possible on the EP?
« Reply #1 on: 2016.September.12. 00:13:06 »
it is possible to make special code for tape load, but with disk... I dont know

and check scroll demo, it has a nice lpt animation on loading
http://ep128.hu/Ep_Demo/Prg/Scroll_demo.rar
Vigyázat! Szektás vagyok! :)

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: IRQ-loading - would this be possible on the EP?
« Reply #2 on: 2016.September.12. 01:44:03 »
There is one issue with IRQ-loading. On platforms like C64, everybody would expect for IEC-serial 1541 compatible drive or something like that. Even custom "disk turbo" routines are written, and everything is known how it works to the last time fragment precisions. However, on EP, because of the nice EXOS, it's really easy to use almost every possible storage methods. Some can have a real EXDOS card with floppy drive. Others use IDE hard disks. Nowadays, people like SD-card cartridge. These are transparent, thanks to the EXOS/EXDOS. However if you want something, like an IRQ loader, you should do things at the hardware level, because EXOS/EXDOS would be too "complicated" and also requires intact system segment, maybe enough RAM to be allocated during the process etc. But you can't expect for every possible solutions in your program, to do it at your own.

I'm not sure about this, but maybe you can try to have a simple effect, and only update it from IRQ, letting EXDOS/EXOS do its work to load meanwhile. But I guess it can even disable interrupts and other problems you would face ...

These are just my ideas, do not get me word-by-word ...

Offline ergoGnomik

  • EP addict
  • *
  • Posts: 1298
  • Country: hu
  • Stray cat from Commodore alley
Re: IRQ-loading - would this be possible on the EP?
« Reply #3 on: 2016.September.12. 07:35:07 »
Although what lgb wrote is absolutely true, I don't see the picture that black. What Sdw could do is setting system requirements. Every IRQ-loading C64 demo expect 1541 compatible disk drive, although recent loader system support a wide variety of IEC drives, that is a restriction in itself. It is obvious that those demos won't run from tape or IEEE-488 drives.

The original EXDOS is built on WD177[0|2] FDCs. These support 250kbps and 125kbps data streams. This means that on an unmodified Enterprise there are 128 or 256 clock cycles between two data bytes read from the disk. He should pick a fixed format and produce his demo in that, setting system requirements something like for example 5.25" disk formatted in 125kbps. If he does that there maybe won't occur insurmountable difficulties in loading during running some kind of effect or simply playing music. Obviously, he'll have to directly program the FDC. But this is only theory. There will be numerous challenges to face, and this will deny EXOS compatibility. Sdw will have to walk an untrodden path.

Offline IstvanV

  • EP addict
  • *
  • Posts: 4822
Re: IRQ-loading - would this be possible on the EP?
« Reply #4 on: 2016.September.12. 08:07:45 »
When programming the FDC directly, other tricks may also be used, like reducing the sector size to 128 bytes. That way, it is possible to read sectors between 50 Hz interrupts. Of course, it would require non-standard formatting, and also lower level FDC emulation in emulators (ep128emu only has that for the CPC, where many games and demos require it). :oops:

But not using IRQ loading is also less of a problem than on the C64, instead of only a few KB/s, you can read at more than 20 KB/s from a DD disk, so the next part can be loaded in a few seconds.

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: IRQ-loading - would this be possible on the EP?
« Reply #5 on: 2016.September.12. 08:11:40 »
You're right, just some people don't have or don't want even to have floppy drive, because using an SD-card is so much easier :) Think about IDE64 for C64. Its IDEDOS is nice enough though it will fail every time if software doesn't use standard KERNAL entry points, and doing direct (ie: hardware level) access, or even just the IEC related KERNAL functions. By depending on some hardware you risk the same situation happening. With EP exactly because the EXOS/EXDOS (as OS too) people usually don't worry about issues like this. At the other hand, that's also true, that direct hardware programming is the way to "extract" the max out of the machine ... Hmmmm.

Offline ergoGnomik

  • EP addict
  • *
  • Posts: 1298
  • Country: hu
  • Stray cat from Commodore alley
Re: IRQ-loading - would this be possible on the EP?
« Reply #6 on: 2016.September.12. 08:57:35 »
You're right, just some people don't have or don't want even to have floppy drive, because using an SD-card is so much easier :) Think about IDE64 for C64. Its IDEDOS is nice enough though it will fail every time if software doesn't use standard KERNAL entry points, and doing direct (ie: hardware level) access, or even just the IEC related KERNAL functions. By depending on some hardware you risk the same situation happening. With EP exactly because the EXOS/EXDOS (as OS too) people usually don't worry about issues like this. At the other hand, that's also true, that direct hardware programming is the way to "extract" the max out of the machine ... Hmmmm.
You are absolutely right. However, the fact regarding C64 demos is that, although there are modern storage solutions, the standard is the old obsolete floppy disk. IDEDOS or SD2IEC demos are not the norm but the exception. Usually, there is only KERNAL fallback to support these. Depending on obsolete hardware makes the retro feeling complete. If it was not an important point of view the old computers could have been replaced with emulators completely. And if I see it right, the Spanish section is insistently working on cloning the original EXDOS cards.

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: IRQ-loading - would this be possible on the EP?
« Reply #7 on: 2016.September.12. 09:24:53 »
You are absolutely right. However, the fact regarding C64 demos is that, although there are modern storage solutions, the standard is the old obsolete floppy disk. IDEDOS or SD2IEC demos are not the norm but the exception. Usually, there is only KERNAL fallback to support these. Depending on obsolete hardware makes the retro feeling complete. If it was not an important point of view the old computers could have been replaced with emulators completely. And if I see it right, the Spanish section is insistently working on cloning the original EXDOS cards.

Well I can't agree with this, sorry, but there is nothing wrong about that :D I mean, EP exactly has the so modern/versatile/modular/etc (compared to its age) OS that it won't cause problem at all. It's not the case of C64, since it simply hasn't got anything like this, so there couldn't be a standard "strong" software level interface (at least nothing like on EP) thus of course nobody wanted to push things through some primitive/slow/etc kernal functions cannot be even compared to the EXOS/EXDOS (I mean the software part of EXDOS here now) infrastructure.

One thing is clear: I wouldn't ever want a real floppy for EP :) I know, that is *MY* problem :) But for C64 as well, I would use SD2IEC if that's enough (and if it's not, maybe 1541 ultimate, though it's kinda expensive, so I have to forget it). Retro feeling is interesting, from some aspects I am great fan of retro computing, but not because the storage methods, that's something I am very sure about :) "Making the feeling complete" - that's a subjective topic. For me, this way it's complete. We're not in the past. We can't just deny our present, I want to combine things, for me, that's the complete. However, others can feel otherwise.

I can't get your point though, what kind of "emulators" do you mean here? We're talking about the real EP ...

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: IRQ-loading - would this be possible on the EP?
« Reply #8 on: 2016.September.12. 09:32:14 »
But anyway that was only a note from me (I just mentioned since I remember I was confused with EP a lot because its so versatile OS compared to other 8 bit micros), that not everybody has or want to have "real floppy drive" stuff. Still, it would be interesting to see a software to "exploit" everything, ie with direct hw access :D Even like using floppy drives.

Offline Zozosoft

  • Global Moderator
  • EP addict
  • *
  • Posts: 14731
  • Country: hu
    • http://enterprise.iko.hu/
Re: IRQ-loading - would this be possible on the EP?
« Reply #9 on: 2016.September.12. 09:42:03 »
When programming the FDC directly, other tricks may also be used, like reducing the sector size to 128 bytes. That way, it is possible to read sectors between 50 Hz interrupts.
I worked on this thing about 22 years ago :-) It is used real 8 sectored disk (formated with FAFO) and played MusicBox music. And yes, I used own low level disk I/O.
It was near to good. Probably using smaller sectors will be more realiable.

But as the others say: todays not a good idea develop floppy only softwares.

Soo, loading music not easy*, but the Enterprise can do another trick: Nick chip with multi screen LPT can play small animations without CPU usage. These can work with any loading source, including tape. Some demos using this trick (for example most of Nasa&Guy demos).

* easy with SD or IDE :-)

Offline geco

  • EP addict
  • *
  • Posts: 7113
  • Country: hu
    • Támogató Támogató
Re: IRQ-loading - would this be possible on the EP?
« Reply #10 on: 2016.September.12. 09:49:14 »
Soo, loading music not easy*, but the Enterprise can do another trick: Nick chip with multi screen LPT can play small animations without CPU usage. These can work with any loading source, including tape. Some demos using this trick (for example most of Nasa&Guy demos).

* easy with SD or IDE :-)
Or slow music with Floppy also by loading small packages, it could be work also, no?
Trantor used also animation during loading, and I used it also in Buzzsaw conversion, and Wavplayer is using it during wav play.

Offline ergoGnomik

  • EP addict
  • *
  • Posts: 1298
  • Country: hu
  • Stray cat from Commodore alley
Re: IRQ-loading - would this be possible on the EP?
« Reply #11 on: 2016.September.12. 09:52:11 »
/OFF
Well I can't agree with this, sorry, but there is nothing wrong about that :D I mean, EP exactly has the so modern/versatile/modular/etc (compared to its age) OS that it won't cause problem at all. It's not the case of C64, since it simply hasn't got anything like this, so there couldn't be a standard "strong" software level interface (at least nothing like on EP) thus of course nobody wanted to push things through some primitive/slow/etc kernal functions cannot be even compared to the EXOS/EXDOS (I mean the software part of EXDOS here now) infrastructure.

One thing is clear: I wouldn't ever want a real floppy for EP :) I know, that is *MY* problem :) But for C64 as well, I would use SD2IEC if that's enough (and if it's not, maybe 1541 ultimate, though it's kinda expensive, so I have to forget it). Retro feeling is interesting, from some aspects I am great fan of retro computing, but not because the storage methods, that's something I am very sure about :) "Making the feeling complete" - that's a subjective topic. For me, this way it's complete. We're not in the past. We can't just deny our present, I want to combine things, for me, that's the complete. However, others can feel otherwise.

I can't get your point though, what kind of "emulators" do you mean here? We're talking about the real EP ...
OK, but this simplifies the answer of Sdw's question to "not at all, or maybe in some botched way". I can't see enough resources in the EP that would enable doing under EXOS what he'd like to do. But proving me wrong is welcome anytime. I only offered a theory about a different solution that seems to be feasible, although it goes against the beauty of the EXOS system.

Well, yes. Discussing taste is an endless exercise in futility.

My point about emulators generically was that if we start arbitrarily omitting parts of these obsolete systems we may shortly arrive to using emulators only, or giving it up altogether. And as the man said himself:
One solution would be to simply rely on a memory expansion being installed, but that seems like a "cheating" solution, and also not in the spirit of using what was available at the time (mid 80ies) when the computer was out.
However, if I understand correctly, the EXDOS expansion which allowed you to connect diskdrives was actually available back in those days?
/ON

Offline lgb

  • EP addict
  • *
  • Posts: 3563
  • Country: hu
  • æðsta yfirmaður
    • http://lgb.hu/
Re: IRQ-loading - would this be possible on the EP?
« Reply #12 on: 2016.September.12. 10:12:45 »
/OFFOK, but this simplifies the answer of Sdw's question to "not at all, or maybe in some botched way". I can't see enough resources in the EP that would enable doing under EXOS what he'd like to do. But proving me wrong is welcome anytime. I only offered a theory about a different solution that seems to be feasible, although it goes against the beauty of the EXOS system.

Well, yes. Discussing taste is an endless exercise in futility.

My point about emulators generically was that if we start arbitrarily omitting parts of these obsolete systems we may shortly arrive to using emulators only, or giving it up altogether. And as the man said himself:/ON

I see. Not the same, but it's again *my* taste :) For me the computer is over at its case. Floppy disk etc, not the part of the computer, so can be replaced. Memory expansion is more tightly integrated part of the system though, than "only" the storage solution (OK, that is a bit "because I think this way" kind of statement, but anyway ...). However even that is a kinda odd in case of EP. Not in a negative way ... Just think about C64 again, which was not so much designed to have more memory, and kinda awkward solutions are needed. EP has the clean design of 4Mbyte address space "built-in" and "already" and even you should not assume "where is the RAM" (which segment, I mean, surely the 64K VRAM can be treated as "always there"), since even 128K can be constructed (even when you would think, EP128 has 128K a same way, that's not true, or at least not always!) using different segment numbers. So even this is a thing, you should rely on OS, to allocate RAM, and not just start reading/writing, you think RAM is. So I just wanted to note, that EP has the "magical" feeling, that it's more versatile compared to other 8 bit micros, that can cause even problems, if you are about using the hardware directly. In same cases, at least :) But yes, the 128K RAM stuff maybe a bit extreme idea (but not so much, there are EP64s expanded to 128, maybe also EXOS replaced, so they are "almost EP128" but maybe not the same memory segment layout ... EXOS - I think - wouldn't have problem with this, but you will, if you think RAM should be there as you think), the question of storage is a more common "problem" at least in this topic.

But again: I would love to see some tricks using WD177x, demo effect etc, together :)

Offline gflorez

  • EP addict
  • *
  • Posts: 3610
  • Country: es
    • Támogató Támogató
Re: IRQ-loading - would this be possible on the EP?
« Reply #13 on: 2016.September.12. 10:21:13 »
And if I see it right, the Spanish section is insistently working on cloning the original EXDOS cards.

This is true, but it  can change soon when almost all of them get SD-adapters. The same people that build the clone Exdos are now eager of getting the most modern and easy approach of the SD-cartridge. Soon, if Pear doesn't remedies it(joke...), Szorg's will be THE STANDARD on most EPs.

Offline Sdw

  • User
  • *
  • Posts: 50
Re: IRQ-loading - would this be possible on the EP?
« Reply #14 on: 2016.September.12. 10:27:48 »
Interesting discussion, thanks for all your answers!

Sadly it seems like the conclusion I can draw is that it is not possible to do it, at least not in a way that works for all setups.
And since the target audience for an Enterprise demo is very small from the beginning, doing something that only works on a very specific setup seems like a bad idea.
If I were to buy something myself, it would probably be the SD-adapter (as I think that is more reasonably priced than trying to get an EXDOS, and also seems like a much more convinent setup) - and then I would like to do a demo that worked on that, but also on something that was available in the 80ies.