I explored the graphics of Knight Lore game a bit. and I think that
could be possible to reproduce them on Oric because the character's sprite is 3x32 bytes or 4x32 bytes (18x32 or 24x32 pixels ) !
The problem would probably be with the speed of 1mhz against 3.5mhz for the ZX Spectrum
also we will lose the visibility of 1 byte on each side of the screen
What do you think ?
is it possible to convert Knight Lore to Oric ?
is it possible to convert Knight Lore to Oric ?
Last edited by goyo on Sat Nov 21, 2020 8:41 pm, edited 3 times in total.
- coco.oric
- Squad Leader
- Posts: 720
- Joined: Tue Aug 11, 2009 9:50 am
- Location: North of France
- Contact:
Re: is it possible to convert Knight Lore to Oric ?
Yes ... Knight Lore should be adapted on oric. However, it's a big project, you've to look at the best solution :
- graph ratio similar
- using macro to copy paste z80 routines
..
Didier
- graph ratio similar
- using macro to copy paste z80 routines
..
Didier
coco.oric as DidierV, CEO Member
Historic owner of Oric, Apple II, Atari ST, Amiga
Historic owner of Oric, Apple II, Atari ST, Amiga
Re: is it possible to convert Knight Lore to Oric ?
Imo, you should start by looking at the closest thing on the Oric: Space 1999.
The source code is available, Chema even documented the principles behind what he did, and he probably some good ideas about how feasible that is
The source code is available, Chema even documented the principles behind what he did, and he probably some good ideas about how feasible that is
- ibisum
- Wing Commander
- Posts: 1652
- Joined: Fri Apr 03, 2009 8:56 am
- Location: Vienna, Austria
- Contact:
Re: is it possible to convert Knight Lore to Oric ?
I second a look at the SPACE:1999 code, it is pretty much as good an approach into isometric games as you can find for the Oric so far ..
This thread has the good links:
https://forum.defence-force.org/viewtop ... space+1999
This thread has the good links:
https://forum.defence-force.org/viewtop ... space+1999
Re: is it possible to convert Knight Lore to Oric ?
A port of Knight Lore should be possible indeed. I still don't know how the programmers approached some of the problems I faced, but I am quite sure they simply ignored some inconsistencies to keep it running as fast as possible.
The biggest problem in my opinion, is the graphics. I am quite sure I had all the sprite sheet (it is available out there) and most of them were 32 pixels wide, which is 4 bytes (8-bit scans in a speccy - and in any other sane video system). We would need either to shrink the graphics to 24 pixels wide to keep it 4 scans wide, or go for 5, so 30 pixels wide, or 6 and have 36.
Of course, more scans means more memory to move, more operations to perform, more space needed for the graphics and masks and buffers, etc.
And, yes, the z80 with its 16-bit registers is much better for all these operations than the humble 6502. And you have other tricks to speed up rendering, so we would need very clever tricks if we want it to move as fast as the spectrum version (which was not particularly fast anyway, IIRC). We also can access the overlay if needed, so we can store more data, unroll loops and use bigger code (6502 code tends to be larger in my experience).
Also, IIRC, these games in the spectrum used to rotate the sprites (and mirror them) on the fly. Mirroring can be done with a table quite fast (I did that!) but rotating is painfully slow in our case, so we would need to have pre-rotated sprites & masks for all the animation frames. Luckily not all the horizontal positions are used, as movements in the x direction are twice those on the y direction, so we would place the sprite only at coordinates 0,2, and 4 horizontally. In any case our memory needs will grow a lot.
All that being said, it should be doable. I learnt a lot since I developed Space:1999 and I am sure it could be enhanced a lot!
The biggest problem in my opinion, is the graphics. I am quite sure I had all the sprite sheet (it is available out there) and most of them were 32 pixels wide, which is 4 bytes (8-bit scans in a speccy - and in any other sane video system). We would need either to shrink the graphics to 24 pixels wide to keep it 4 scans wide, or go for 5, so 30 pixels wide, or 6 and have 36.
Of course, more scans means more memory to move, more operations to perform, more space needed for the graphics and masks and buffers, etc.
And, yes, the z80 with its 16-bit registers is much better for all these operations than the humble 6502. And you have other tricks to speed up rendering, so we would need very clever tricks if we want it to move as fast as the spectrum version (which was not particularly fast anyway, IIRC). We also can access the overlay if needed, so we can store more data, unroll loops and use bigger code (6502 code tends to be larger in my experience).
Also, IIRC, these games in the spectrum used to rotate the sprites (and mirror them) on the fly. Mirroring can be done with a table quite fast (I did that!) but rotating is painfully slow in our case, so we would need to have pre-rotated sprites & masks for all the animation frames. Luckily not all the horizontal positions are used, as movements in the x direction are twice those on the y direction, so we would place the sprite only at coordinates 0,2, and 4 horizontally. In any case our memory needs will grow a lot.
All that being said, it should be doable. I learnt a lot since I developed Space:1999 and I am sure it could be enhanced a lot!
Re: is it possible to convert Knight Lore to Oric ?
Thank you Chema for all of this detailed informations on this fascinating subject.
I think the difficulties are also:
the loss of 8 pixels on each side of the screen. Which would imply too heavy clipping of the sprites.
Among other things, it would not be impossible to dynamically generate the sprite masks by algorithm (using the lost 2bits). which would save half the sprites memory.
Also it is possible to do a dynamic horizontal mirroring of sprites. I have already done it works well.
I think we should not reduce the size of the sprites, I think that would lose all the interest of the project.
Finally,
there is a full Knight Lore convertion to 6502 (for C64)
It could be an easy starting point for such a project...
I think the difficulties are also:
the loss of 8 pixels on each side of the screen. Which would imply too heavy clipping of the sprites.
Among other things, it would not be impossible to dynamically generate the sprite masks by algorithm (using the lost 2bits). which would save half the sprites memory.
Also it is possible to do a dynamic horizontal mirroring of sprites. I have already done it works well.
I think we should not reduce the size of the sprites, I think that would lose all the interest of the project.
Finally,
there is a full Knight Lore convertion to 6502 (for C64)
It could be an easy starting point for such a project...
Last edited by goyo on Mon Nov 23, 2020 11:50 am, edited 1 time in total.
- ibisum
- Wing Commander
- Posts: 1652
- Joined: Fri Apr 03, 2009 8:56 am
- Location: Vienna, Austria
- Contact:
Re: is it possible to convert Knight Lore to Oric ?
Port the existing Knights Lore artwork for C64 to a new "8Bit Unity" project for C64, then get Oric version also, maybe?
Re: is it possible to convert Knight Lore to Oric ?
Goyo's graphic result is very well drawn !
Re: is it possible to convert Knight Lore to Oric ?
Using the two bits for mask handling is something Twilighte used on a number of projects.
Regarding the memory usage, the Oric should probably not be any worse than the Spectrum, because if you are not using the system and target disk drive, you can freely use:
- The page 2
- The entire memory area from $400 to the charsets (where there's a lot of wasted room, so you can use one of the charsets for yourself)
- The entire area from after the screen to the end of memory
in total you have about 55000 bytes, and you can dynamically load whatever you need
Regarding the memory usage, the Oric should probably not be any worse than the Spectrum, because if you are not using the system and target disk drive, you can freely use:
- The page 2
- The entire memory area from $400 to the charsets (where there's a lot of wasted room, so you can use one of the charsets for yourself)
- The entire area from after the screen to the end of memory
in total you have about 55000 bytes, and you can dynamically load whatever you need
Re: is it possible to convert Knight Lore to Oric ?
If you are looking for 6502 source code of Pentagram
https://csdb.dk/release/download.php?id=194746
https://csdb.dk/release/download.php?id=194746