News:

Printed Amstrad Addict magazine announced, check it out here!

Main Menu
avatar_EgoTrip

EgoTrip's Game Progress Topic

Started by EgoTrip, 22:45, 09 November 15

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Executioner

Quote from: ronaldo on 22:10, 30 November 15
@Executioner: That's a good idea. Do you know of a way of doing it without using a custom interrupt handler to count interrupts?

I'm surprised you don't use your own custom interrupt handler anyway, but there is a variable in firmware memory (#B8BF on a 6128, #B192 on a 464) which keeps a count 6-1. It's not necessarily aligned with the frame flyback, but it could be made to be by setting it on VSYNC. When the CPC is started, this variable counts 256 frames before it gets reset to 6. If you set it to 6 on VSYNC, you can test it every interrupt and when it gets to 1 (or maybe 2) you'll be at the correct interrupt. The hard bit is determining whether to use #B8BF or #B192.

ronaldo

@Executioner: That may be a good way to do it, but it requires firmware being enabled. I was talking about doing it without firmware: the low-level library of CPCtelera is designed to be used without firmware running.

CPCtelera is designed to be a low-level library for programmer needs (along with a development framework based on standard GNU tools). It does not use an interrupt handler, because I think that should be up to the user. CPCtelera should not execute any kind of code by itself: everything should be up to the programmer.

However, I may create kind of a default interrupt handler for these matters, and leave the programmer the option to set it up at will.

TFM

That way a CPCTelera program could run under all OS for the CPC.  :)
TFM of FutureSoft
Also visit the CPC and Plus users favorite OS: FutureOS - The Revolution on CPC6128 and 6128Plus

Executioner

Quote from: ronaldo on 22:44, 30 November 15
However, I may create kind of a default interrupt handler for these matters, and leave the programmer the option to set it up at will.

I don't actually know very much about CPCTelera having never used it. I don't have much use for C seeing as I prefer writing assembler, but if you're not using the firmware and lower ROM is enabled, it should be pretty easy to create a standard interrupt handler (perhaps with hooks to extend it to do the other stuff like keyboard scanning etc). It's a pitty we can't read the Vertical Character count in the CRTC really, would make interrupt handlers much simpler.

ronaldo

#54
Quote from: Executioner on 06:11, 01 December 15
I don't actually know very much about CPCTelera having never used it. I don't have much use for C seeing as I prefer writing assembler...
One of the interesting things with CPCtelera is that it lets you program in C or Assembler. It can be used as framework + low-level library, or only as a framework for creating projects and building them. You can develop any kind of software. If you do not use the low-level library, it acts only as a way os simplifying management tasks: you write your .asm or .c (or even both) code, tape in  make, and you have binary, dsk and cdt files created :) .

And yes, creating a standard interrupt handler is pretty easy. The issue for me is not creating the handler, but providing it to other programmers as a service they can use or not in their programs. I invest most of my time in documenting and designing APIs and interfaces in the hope of making them easy and practical to use.

Thank you very much for your views and suggestions: they are going to be useful, for sure :D .

arnoldemu

Quote from: ronaldo on 22:10, 30 November 15
I can easily code a wait4NextInterrupt function, but I'm unsure about how to know if next interrupt is 4th or 5th without counting them.

z80 opcode:

HALT

;)
My games. My Games
My website with coding examples: Unofficial Amstrad WWW Resource

Tai

The code to keep track of interrupts within a frame was explained superbly by Fano some time ago.

You can check that here (with source code) Frame Timings



EgoTrip

Done a lot of optimising, coded in a boss, sorted puzzzles out. Everything looks and works a lot better now but theres  still a few issues that need fixing.

But, my laptop died today so there will be little/no progress until I get a new one. Which will probably be never the way things are.

VincentGR

I just finished Oceano (uploading on yt), what a great game!
Can't wait for this!!!

EgoTrip

Quote from: VincentGR on 18:18, 14 December 15
I just finished Oceano (uploading on yt), what a great game!
Can't wait for this!!!

Thanks. But as I just said theres going to be quite a delay until I am able to do more work on it. So you'll have a bit of a wait on your hands.

VincentGR

Quote from: EgoTrip on 18:38, 14 December 15
Thanks. But as I just said theres going to be quite a delay until I am able to do more work on it. So you'll have a bit of a wait on your hands.

Take your time mate, I am just excited.

EgoTrip


Powered by SMFPacks Menu Editor Mod