Development of Blake's 7 (was OASIS development)

Want to talks about games you like, would like to see developed on the Oric, it's here.
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by Chema »

Quick question:

I have around 130 free bytes. Which of the following you think would be more interesting to add, if any?
- Some joystick support (not sure it will fit, which one if I can have only one?)
- Some mouse support (which, how??)
- Telestrat support (nops here and there so the disk code works)
- Any other ideas?

I'd say none of them are really important (except perhaps Telestrat support, but that is quite problematic). I am not sure any joystick will work with a Microdisc attached unless you have some kind of extra expansion port connector in your amplibus. So only joysticks attached to the parallel port would work, but most of them interfere with the sound, which I don't like. So there is only one which may work (have to check). How many people has that particular joystick? And even in that case, a joystick does not provide acceleration information (the Telestrat mouse didn't either) so little benefit to control the game itself.

A mouse would be great, but I know of none, have no information on drivers and would benefit nearly nobody (who has one?).

So any ideas are welcome!
User avatar
iss
Wing Commander
Posts: 1641
Joined: Sat Apr 03, 2010 5:43 pm
Location: Bulgaria
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by iss »

Chema wrote: Sat Aug 26, 2017 5:10 pm- Any other ideas?
My project TrackOric (TrackPad for Oric) goes well and really things are looking very promising!
I'll continue it after 2 weeks (because of vacation ...) and hope to show working demo at end of September.
The plan is to put the code entirely in page $100 leaving enough space for the stack it self (and probably some cells for float point maths used by ROM routines). VIA's Timer 2 will be used. To integrate this code its interrupt handler must be chained. There will be 3 bytes to represent X,Y of the pointer and the pressed/released states of the button(s) (how many we actually need?).
Currently I'm trying to find the fastest speed to transfer always error free these 3 bytes using just simple cable connection.
I'll post the sources asap.
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by Dbug »

Chema wrote: Sat Aug 26, 2017 5:10 pm I have around 130 free bytes. (...)So any ideas are welcome!
Well, what about a code review, to see if we can find you more bytes :)
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: Development of Blake's 7 (was OASIS development)

Post by Symoon »

Chema wrote: Sat Aug 26, 2017 5:10 pmI have around 130 free bytes. Which of the following you think would be more interesting to add, if any?
No specific ideas here... Wouldn't it be safe to keep this space during beta-test, in case of bug correction?
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by Chema »

@Dbug :lol: I knew you'd say that! Yep, it is surely possible to get more space with some code optimizations.

As Symoon said, I will keep it just in case some bugs appear in the engine, but I wanted some opinions on possible additions. Does anybody think supporting joysticks is worth it? I am pretty sure Jede would like the Telestrat to be supported, but its mouse or joystick?
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: Development of Blake's 7 (was OASIS development)

Post by Symoon »

Oh, after all, an idea (an no, I'm not going to ask for direction key again ;) )
=> produce a small sound when people are speaking.
It was very efficient in Mercenary, especially as the author used higher sounds for "?" and "!" characters.

See:
https://www.youtube.com/watch?v=iHaktl0wjlY
jede
Flying Officer
Posts: 191
Joined: Tue Mar 14, 2006 11:53 am
Location: France

Re: Development of Blake's 7 (was OASIS development)

Post by jede »

Chema wrote: Sun Aug 27, 2017 12:43 pm @Dbug :lol: I knew you'd say that! Yep, it is surely possible to get more space with some code optimizations.

As Symoon said, I will keep it just in case some bugs appear in the engine, but I wanted some opinions on possible additions. Does anybody think supporting joysticks is worth it? I am pretty sure Jede would like the Telestrat to be supported, but its mouse or joystick?
Yes i would like telestrat support :) About joystick, i am interested too, but i don't know if you will have enough bytes :)
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by Chema »

Okay guys. I am totally confused with something. My saving system is not working on my Cumulus. However, it works flawlessly in emulators and with real floppies (with Silicebit's Microdisc clone).

So it must be something in the Cumulus, but all my other productions used a similar code to save data and it works with Cumulus. The only difference is that up to now I have been using SEDORIC formatted disks.

I have been making some tests. I used a fresh compilation of the game with Oricutron and moved to a point where it saves. Both the fresh game dsk and the one containing the savepoint were tested on my Cumulus. I could load the game from the image with the savepoint with no problems, so the problem is not in the way I load the savepoint. Then I booted the fresh game disk and moved to the same point in the game, so it saved (I was careful with not having the file protected and ejecting the card properly), and, when trying to load it, it hanged.

I compared the two disk images (one produced with Oricutron and the other with the Cumulus) and indeed they are different. When loading data there is a point from where the loaded data is shifted by one byte (it is not at the start or end of a sector data or a page in memory), as if a byte had not been saved.

Regarding the disk structure, the sectors used for storing data had different information. The Data record has only 6 bytes set to 0 before the A1 A1 A1 (instead of 12) and the ID record's trailing bytes after the CRC are 20 bytes set to 22 and not 22 bytes set to 22

The Cumulus code itself has a static definition for a sector header with 6 0s instead of 12...

EDIT: Clarifying things a bit. The firs sector used for saving is stored with the ID Record:
12 bytes to 00 A1 A1 A1 FE 36 00 0f 01 <crc> and 20 bytes to value 22, instead of 22

followed by the Data record with:
6 bytes to 00 (instead of 12) A1 A1 A1 FB ...

At the end of the data record there are some extra bytes in the image generated by the Cumulus 20 20 20 20 20 20 e1 22 (the last 2 are a CRC, I think) , exactly the number of bytes missing from the headers, so I guess it is old data that was in the image. No harm, because the first sector loads correctly, being the second one the one with one byte missing, but surely indicates something.

The second sector suffers from similar differences (even if it starts at the same file position in both images, so some extra byte must be somewhere), so the ID record has 20 bytes to 22 and the Data record only 6 to 00, but the thing is that the actual data starts differently: the good image is A1 A1 A1 FB FF 00 .... <rest of data here> while the one generated by the Cumulus is A1 A1 A1 FB 00 ... <rest of data here>, so an $ff is missing... (?)

All this disk structure thing is too much for me, and I don't know how to proceed from here.

any clue?
User avatar
ibisum
Wing Commander
Posts: 1645
Joined: Fri Apr 03, 2009 8:56 am
Location: Vienna, Austria
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by ibisum »

Count me in as a vote for Telestrat support as well - as I have one. :) And I'd be willing to test it on the real hardware as well ..
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by Chema »

On the disk writing and cumulus issue: I am a bit lost. The only thing I can think of is a timing issue in the cumulus firmware (there is a function called wait_for_next_byte() which takes A LOOONG delay, so even this is unlikely, but who knows).

It seems to me that some bytes are sometimes missing, but there is no drive error (if we don't serve bytes fast enough, the sector is filled with zeros and an error is flagged - the code should catch it).

My writing loop was:

Code: Select all

	
	sei
	ldy #0
loop_write_sector
	lda FDC_drq
	bmi loop_write_sector
	lda (ptr_destination),y	
	sta FDC_data
	iny
	bne loop_write_sector
	cli
I changed it to the more efficient, and nearly identical, code from 1337.

Code: Select all

	
	sei
	ldy #0
loop_write_sector
	lda (ptr_destination),y
__fdc_drq_w
	bit FDC_drq
	bmi __fdc_drq_w
	sta FDC_data
	iny
	bne loop_write_sector
	cli
But I see no way cumulus could flag drq twice for a single byte, which would cause a byte missing in the flow to the disk, but also a byte missing in the total count, which would produce an error, and my code should retry the writing.

I assume that after flagging drq it expects a write to the data register, then go for the next byte. If it does not come in time, then there is an error. So basically only if drq is flagged somehow without the cumulus checking the data and then flagged again, a byte can be lost.

If it is a bug in the FAT driver of cumulus, then it is damn bad luck that my old code and many other programs work flawlessly (though I'd bet they use IRQ'd writting, not like this one).

I am a bit on a dead-end here...
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by Dbug »

Chema wrote: Mon Aug 28, 2017 1:10 pmI changed it to the more efficient, and nearly identical, code from 1337.
What do you mean by "more efficient"?

I guess the main difference is the timing between the check of the register and the writing of the value.

What about the command to start writing, how far before is it? Is it possible an IRQ triggers between the command and the actual write loop?

(Also, I agree with Simon, having some giberish sounds when characters speak would improve the game tremendously)
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: Development of Blake's 7 (was OASIS development)

Post by Symoon »

Stupid question: could there be some initialization of variable missing somewhere?
I had that kind of problem with my progress bar, totally forgot to initialize a counter; it didn't show on the emulators but I had a "strange and random" beginning on real machine...

It's a classic, so it may sound stupid but I'd double-check this. Maybe you can have different values at startup in RAM according to the device that is plugged to your Atmos (the garbage before booting is a hint), and the bug may then only appear with the Cumulus? Sounds unlikely, but we are certainly looking for something unlikely!

EDIT: you can try changing Euphoric's RAM pattern parameter to check this (without 100% reliability, but it can be a positive test made quickly compared to a complete-but-reliable code review)
User avatar
Chema
Game master
Posts: 3014
Joined: Tue Jan 17, 2006 10:55 am
Location: Gijón, SPAIN
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by Chema »

Yes, Dbug, I used the wrong term. I meant that it takes less time to write after the DCR is flagged. The command is just above that code.

Code: Select all

	lda #CMD_WriteSector
	sta FDC_command_register
	sei
	...
The thing is that it works with a real floppy and in Oricutron, but not with the Cumulus. And similar code in 1337 works, so I am lost here. I don't know where to look. Surely it is something stupid.

I will do what Symoon says and check that there isn't anything uninitialized. Maybe that is what is happening.

Oh, by the way. The disk code now works on a Telestrat. Jede just made a quick test for me. That is good news, I think.

About the gibberish sounds while speaking... Are you guys sure? I think it would be nice for the first 5 minutes, but then wouldn't it become a pain to have that sounding each time somebody talks? I don't think it is possible to have something similar to SimTalk (which is quite well done!), but only random notes or sounds... and those won't be so nice...

And I'm afraid I won't have space to put another menu option to disable that... remember only 140 bytes or so... (yeah, I know we could try to scratch more, but even so).

In any case, does anybody know how to do something like that? I'd like not to break my SFX engine with it, so I'd prefer to avoid direct access to AY, so I thought about assigning notes to letters and pauses to whitespaces and using the string that is being displayed, but that will sound as random notes, so not very well...

I may give it a try and see how it sounds....

EDIT: I tested with Euphoric with the other RAM pattern and everything works...

EDIT2: Jede just tested with the Telestrat+HxC and saving works too... basically it's only Cumulus... And now that I mention it... maybe just MY Cumulus (?)
User avatar
Symoon
Archivist
Posts: 2307
Joined: Sat Jan 14, 2006 12:44 am
Location: Paris, France

Re: Development of Blake's 7 (was OASIS development)

Post by Symoon »

Here's what I read in Sedoric à Nu from André C.:

Sector identification: 12 bytes at [#00], [#A1 #A1 #A1], [#FE pp ff ss tt CRC CRC] then 22 bytes [#4E].
(note: pp=track, ff=side, ss=sector, tt=size of sector (1 for 256 bytes, 2 for 512, ...))
Data id: 12 bytes at [#00], [#A1 #A1 #A1], [#FB] then 256 bytes of data.

I'm certainly not teaching you anything there, but is it normal you use bytes at value 22 instead of 4E?
Chema wrote: Mon Aug 28, 2017 10:05 pm About the gibberish sounds while speaking... Are you guys sure? I think it would be nice for the first 5 minutes, but then wouldn't it become a pain to have that sounding each time somebody talks? I don't think it is possible to have something similar to SimTalk (which is quite well done!), but only random notes or sounds... and those won't be so nice...
I of course only speak for myself but the "speaking" sound in Mercenary games gave it a real identity, and I still love it 30 years later. I even have two sounds on my phone: one of Oric keyboard for SMS, another one being that "speak sound" for emails ;)
And belive me though, I love silent games, better than ones with constant music.

Another video to make up your own mind:
https://www.youtube.com/watch?v=BB1Z-XqS2mY
I thought about assigning notes to letters and pauses to whitespaces and using the string that is being displayed, but that will sound as random notes, so not very well...
I think that's exactly what happens. Note how they gave higher notes to special characters.
EDIT2: Jede just tested with the Telestrat+HxC and saving works too... basically it's only Cumulus... And now that I mention it... maybe just MY Cumulus (?)
If you want me to give it a quick try on my Cumulus next weekend let me know (please ZIP files if sending by mail, my mailbox is almost full again ;) )

EDIT: don't forget there are 3 different RAM patterns in Euphoric, 0, 1 or 2 IIRC!
User avatar
Dbug
Site Admin
Posts: 4444
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Re: Development of Blake's 7 (was OASIS development)

Post by Dbug »

Chema wrote: Mon Aug 28, 2017 10:05 pmAbout the gibberish sounds while speaking... Are you guys sure? I think it would be nice for the first 5 minutes, but then wouldn't it become a pain to have that sounding each time somebody talks? I don't think it is possible to have something similar to SimTalk (which is quite well done!), but only random notes or sounds... and those won't be so nice...
Imo the idea is not to have something totally random, but to have different sounds for different characters, a bit like the key clicks that are different for the black and red keys.

I guess I could give a shot at trying to do a small prototype.

Basically the idea is to make these long cut scenes with multiple people (like the prison scene) more dynamic :)
Post Reply