Welcome, Guest. Please login or register.


Show Posts

This section allows you to view all posts made by this member. Note that you can only see posts made in areas you currently have access to.


Topics - JSP

Pages: [1]
1
Other topics / Enterprise news in the Amiga Forever magazine
« on: 2019.November.14. 09:59:13 »
In case anyone is interested....

In the Amiga Forever magazine issue 141 just issued there is a section on games published on other platforms. On page 6 and 7 are evaluations of two Enterprise 128 games among the items in the section.

R-type
Nigel Mansell's Grand Prix

regards
Jesper

2
Programming / Sprites and BASIC (with some help from ZZZIP)
« on: 2019.May.20. 16:42:40 »
A month or two ago I asked myself the question - can you make a reasonable 'sprite' based game in BASIC and then compiled with ZZZIP. To produce a satisfying result some requirements needed to be satisfied:

- Flicker free.
- Pixel precise collision check.
- Ability to move in front of or behind objects on the background.
- A reasonable frame rate (+10 fps)

In other words, similar features to what you would expect from a MC program - except for the frame rate. This is after all BASIC even if speed enhanced by being run through a compiler.

I included some other feature, that might be of interest, even if they are not essential.

- Restart (RUN) the program in more than one resolution dynamically.
- Stop the program if the sprite reaches the right border zone. This was so I could test the frame rate speed, which clocked in at about 155 frames in 14 secondes, or 11 FPS with a standard 4 MHz EP128 machine.

The controls are laid out as follows:

Cursor keys: Increase or decrease speed in four directions. 4 speed levels.
<1> RUN program in graphics mode 5, colour mode 1.
<2> RUN program in graphics mode 1, colour mode 1.
<3> Fly behind other objects on the display.
<4> Collide with other objects on the display.
<5> Fly in front of other objects on the display.

When the ship reaches the border it stops in that direction - except for the right border, where the program stops, and running time is displayed.

I use a three-buffer display. Two buffers for alternating the graphics and a third for collision check. The advantage is that I can draw in any of the four colours on the two first displays and yet be sure that if pixels of the ship overlaps the mask on the third display, it will trigger a collision, because the mask is all ones (made with colour 3), so BAND'ing the ship with the mask returns a value different from zero, if there is any overlap. Another advantage of this approach is that since I repaint foreground and background directly for any changes and do not use a generic CLEAR channel command, I can maintain a complex background.

Just load the demo image and START the program.

As you can see all of the targets listed, are fulfilled at about 11 FPS. So for some types of games you could use BASIC. Some kind of game, where you don't need 50 FPS. like a submarine simulator at the same level as the first Silent Service game from Microprose.

Unfortunately there are some limitations about BASIC that limits the number of frames, I can generate.

First of all I have to do a lot of extra calculations because each of the three video pages may have addresses crossing a 16 Kb border, and since I use SPOKE extensively, I need to calculate the addresses as well as the page for each byte I poke. In fact, it takes about three seconds per frame in BASIC without ZZZIP. Fortunately ZZZIP can speed calculation and SPOKES up by at least a factor 50, since the operations are close to their MC code equivalents. I am sure a way can be found to make sure that memory used for each video page all stays within a 16 Kb page, and this would save a lot of calculations. Some other day perhaps....Suggestions are welcome.

BASIC only supports 2-dimensional arrays. This is a problem, because if I want to write routines, that can handle multiple objects flying around, I really need 3 dimensions, because I have to include the objects number as one of the parameters. It is possible to 'flatten' two or more dimensions into one dimension, but it quickly gets rather complicated, when you have to maintain meta-data about how data is stored to be able to work with the data. This also makes it hard to create standard routines, that can be used as a library for others wanting to create games using the routines as a backbone.

A third issue is the limitations causes by an integer compiler like ZZZIP, where addresses are limited in scope to 15 bit and where you only have integers available.

Still, I think the result proves, that it is possible to make some simple animations at a reasonable speed including such features as collision-check and depth-sensitivity.


regards
Jesper

3
Programming / Using SET BIAS
« on: 2019.February.11. 20:08:42 »
Hi

I am investigating the capabilities of the EP128 Basic. Just now I play with colours, and I would appreciate, if someone could confirm my understanding of how SET BIAS works. Here is how I think it works...

The Enterprise 128 can display up to 256 colours, but the reasonable compromise between resolution and number of colours, when doing graphics, is MODE 4. In this mode we have 16 colours. The first 8 colours can be modified to represent any combination of 8 of the 256 colours available using the PALETTE command. However for the other 8 colours you can only choose between 32 sets of 8 predefined colours. The first set is represented by the numbers 0-7, the next by 8-15, and so on up to 255. The trick is, that there is no physical memory location with the color code. The bit pattern of a number defines what colour it represents. There are 8 bits in the number. Three of those bits represent a value for red intensity between 0-7. Those are bit 6 ,bit 3 and bit, 0 with bit 6 as the most significant bit. Three other bits represent the green intensity. Those are bit 7, bit 4, bit 1 with bit 7 as the most significant. Finally blue intensity is held in bit 5 and bit 2. So for instance the value 22 gives a bit pattern like this:

00010110 (bit 7 on the left and 0 on the right) = Red intensity (0*4 + 0*2 + 0*1 = 0), green intensity (0*4 + 2*1 + 1*1 = 3), blue intensity (0*2 + 1*1 = 1) That is a mix of medium intensity green and weak intensity blue.

You can specify a colour using the RGB function. But i find using the BIN function more easy to use in this situation. Specifying colour intensity in 0.15 intervals between each level is messy as done within the RGB function.

You specify a set by writing:
SET #10: BIAS b
SET BIAS b

where b is any number in the b interval. So for instance to activate interval 1, you could set b to any value between 8-15. Also notice that the channel number is not really needed, since only one bias value can be active at any time no matter how many displays you have activated.

Is there more to SET BIAS than what I have described?

regards
Jesper

4
Programming / Use of KEYBOARD: device
« on: 2018.April.16. 18:49:19 »
Hi

I am a bit curious about how to reopen the KEYBOARD: device in MC code. In my scenario I work from ISDOS. I am aware that only one keyboard channel can be open at any time

Obviously the keyboard driver is initially active via the EDITOR: when working from ISDOS.

First I disable interrupts, then I read the $KEY_EDIT EXOS variable to find the existing keyboard device channel. I use this value to close the keyboard channel. Both actions return code 0 (no error).

Then I attempt to open a new keyboard channel (HL equals bytestring...... 9,"KEYBOARD:"). This fails. Return code is different from 0.

Is there some mechanism that keeps the default keyboard channel open at all times in ISDOS.

I can of  course make EXOS call 5 to read the keyboard by using the channel no from the $KEY_EDIT EXOS variable or use I/O ports directly. I just wanted to try using another channel.

I have seen some examples of code that opened another channel for the keyboard. Yet their code did not close the default channel, and only one channel can be used at any time. So what am I missing?

regards
Jesper

5
Programming / Call to ROM during reboot
« on: 2018.April.08. 17:22:43 »
Hi

Like everyone else, who are venturing into MC coding on the EP128, I use the SAMPLE.ASM programming example to get started. In my case I look at each line of the program and analyze its purpose to get a feeling for how it works.

There is a section that sets up pages for a reset. It goes like this... (comments as I understand the process)

LD C,40H ; This triggers deallocation of all user RAM during the EXOS Reset (RESET=0)
EXOS RESET ; Afterwards only PAGE0 is defined by the system and pointing to the lowest RAM segment (0F8H on my EP128)

LD A,1 ; So we initialize Page3 (port 0B3H) to point to segment 1 (ROM segment)
OUT (0B3H),A

Then comes the question...

LD A,6
JP 0C00DH

The comments in the program refer to the 6 function=Enterprise logo screen and make a call to a (fixed) address in the ROM in Page 3. Offset 0DH from the start address of memory mapped to Z80 space 0C00H-0FFFFH (Page3)

... Where can I find documentation that tells me I need to jump to this specific address with this particular value. Any help is appreciated, please.

I have the English  version of the Kernal Specification 2.1, but I have no manuals or articles discussing ROMS and their layout. If such documentation exist in English, it is preferable. If it exists in Hungarian... well, Google Translate will point me in the right direction though it obviously has issues and translates word into English words, where you need a little bit of vertical thinking to decode the actual meaning. :-)

regards
Jesper

6
Other topics / New member introduction
« on: 2017.June.27. 16:07:16 »
Hi

A couple of days ago I joined the site as 'JSP', so here is a small introduction.

I got an EP128 fairly early (serial number 00679) in the mid eighties in Denmark, including a CUB monitor and a diskettestation. Not long after I bought it the whole thing went bust as you all know. Still I enjoyed the machine for its advanced features, and every few years sinde then I have dusted it off and played with it for a few days. But with little or no access to information, it never got more serious than that. However some time ago I discovered this site and the excellent emulator ep128emu. With access to a lot of information and fresh impulses from the site and not having to use desk space for the physical computer, I am still not losing interest. So I guess it must be serious this time, which just proves there is life after 60 :) The logical next step was to join a community - se here I am.

Is anyone aware of other Danish users, by the way?

I speak and can read English and some german, but Hungarian is beyond me, sorry.

I include the obligatory picture of the system as an attachment...

regards
Jesper

Pages: [1]