Request : Demos for Jasmin

Want to discuss about Demos on the Oric, here you are !
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Request : Demos for Jasmin

Post by waskol »

Hello demomakers,
Since a moment I have Jasmin drive working, but all your demos are released for microdisc drives.

Well, I would like sooooooo much to feeed my Atmos with you fabulous electronic fireworks :P

That Would be kind of you to provide them in jasmin dsk format ? or may be it is way too diffficult ?

thank you very much.
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

The problem is the boot and loading system.
We have a custom loader and boot sequence in the demos.

If somebody can provide the code for doing a loader/booter that works on microdisc and jasmin, I guess we can patch the demos.

It was already very complicated to get the demos to work both on Oric Atmos AND Telestrat, because the bootsector is not loaded at the same location...

The loader was written by Jede, who is not active anymore... the good thing is that all the demos use the same loader (except the very first one without music which use sedoric calls to load data), so if somebody can find how to adapt the code, it would work for all of them.

What's needed is:
- how to disable the overlay memory
- a read sector function

And that's it.
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

Dbug wrote: What's needed is:
- how to disable the overlay memory
- a read sector function

And that's it.
Humm, for the booter, I don't know if I could manage to do that... I don't feel enough experienced in the art of assembly language. I just start to understand all those pieces of code and all the mechanics that go around, but I do not have yet the dexterity to write some complicated stuff. I've learned a lot with your various sources :wink:

For the overlay memory, I think I've seen something in Theoric about it.... (not sure, but who knows). Anyway there is something in the FTDOS documentation about iyt :
La particularité de l'ORIC et de l'ATMOS est d'avoir 16k octets de mémoire vive (MEV)
qui ont les mêmes adresses que la mémoire morte du BASIC, donc cachées par cette
dernière et non utilisées.
Nous l'appelons la MEV (ou RAM) "OVERLAY" ou parallèle. C'est là que se charge le
T.DOS, laissant ainsi libre le reste de la mémoire. Si, pour des applications particulières
vous voulez accéder à la MEV ,il suffit de suivre le protocole suivant
1- Interdire toute interruption par SEl
2- Mettre 127 dans #30E pour interdire les interruptions de la VIA
3-Mettre 1 dans #3FA, à ce moment tout accès aux mémoires de #COOO à #FFFF est
dans la RAM OVERLAY
Remarque
Il faut interdire les interruptions avant d'entrer dans la RAM OVERLAY si les adresses
du sous programme de traitement d'interruption ne sont pas mises à jour dans la RAM
OVERLAY.
Pour se remettre en situation normale (avec la ROM BASIC):
1- Mettre 0 dans #3FA.
2- Mettre 192 ou #C0 dans #30E.
3-Remettre les interruptions par CLI.
For the sector read I think I have some clues, at least about how to call any Jasmin commands in C like it is already done with microdisc in the Lib.h of the OSDK.
Moreover, recently I've spent some time to read the Jasmin documentation, and there is also someting about the reading of sectors with Jasmin :
ACCÈS DIRECT AUX SECTEURS
Vous pouvez lire ou écrire un bloc de 256 octets directement sur un secteur quelconque
de la disquette. Un secteur est repéré par
-le numéro de lecteur (NLU) de 1 à 4, situé à l'adresse #48C
-le numéro de piste (NP) de 0 à 81, situé à l'adresse #48D
-le numéro de secteur (NS) de 1 à 17, situé à l'adresse #48E Lorsque vous lisez un
secteur, il doit être transféré en mémoire centrale. Il faut donc indiquer l'adresse DB du
début du bloc dans lequel les 256 octets du secteur doivent être transférés.
Lorsque vous écrivez sur un secteur, il faut indiquer l'adresse DB du début du bloc de
256 octets à transférer dans le secteur. Cette adresse DB se trouve en #48F et #490.
-1 Recherche du premier secteur libre !FS.
Syntaxe : !FS.
*Action : charger dans NP et NS (#48D et #48E) le numéro de piste et le numéro de
secteur du premier secteur libre de la disquette du lecteur désigné par NLU (#48C).
*Remarque : avant d'utiliser !FS, NLU doit être défini, par exemple par POKE #48C,1.
-2 Lire un secteur de la disquette !RS
Syntaxe : !RS
*Action : Transférer 256 octets d'un secteur de la disquette déterminé par le numéro de
lecteur NS, dans un bloc en mémoire centrale, commencé à l'adresse DB.
*Remarque : avant d'utiliser !RS; NLU, NP et DB doivent être définis par exemple par
des POKE et DOKE.
The exercise, if I understand well, is to find wherere resides those two functions in the Jasmin rom in order to "copy/paste" the block of assembly code that correspond to them.

Hopefully, there is a debugger in Euphoric :wink:
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Ok, we can try to get the LCP intro to work on Jasmin :)

Somewhere in the code, I have this:

Code: Select all

  sei
  lda #%11111101
  sta $314


Which is the code I use to disable the overlay memory.
Doing instead:

Code: Select all

  sei
  lda #1
  sta $3FA
Would normaly make it work on Jasmin.
Now, what would be cool, is to have a way to detect which system we have, and then I could do a new release of the intro which would work on Jasmin and Microdisc, or display an error message if the disk drive is not present.

(This particular intro does not read anything on the disk, it's just for the additional 16k)
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

wow, nice !!!

Here an exerpt I foud on Fabrice's site (Hardware Programming) :
Drive interfaces for the oric are all driven by the same family of FDC (floppy disc controllers): Western Digital 177x for the Jasmin and new 179x generation for the Microdisc (and Telestrat). Differences in this family exist to connect negative or positive drives, and to allow double-density formats (MFM mode). The FDC 1773 of the Jasmin and the 1793 of the Microdisc are compatible, but the additional circuitry is quite different so the programming routines have to be deeply adapted from one to the other (the telestrat has a second ULA integrating the Microdisc electronics, so it is largely compatible with it). The FDC 1793 (or 1773) is accessible through locations 0310-0313 in Microdisc's electronics, and 03F4-03F7 in Jasmin's electronics. This requires the interface to disable the internal VIA, with the use of the I/O CONTROL line on the system bus. See appendix for FDC programming commands
I put what is good as a start in green, and what I think is not cool at all in red :mrgreen:

In blue, the link to the file.

Are there any mean to read at least a byte in the microdisc Rom (and in the Jasmin rom), in order to test for the value of this byte ? That would be a good test.
May be the difference in memory location is enough for this test (just have to test both locations) ?
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

Ok, one thing after another :p

Go there: http://www.defence-force.org/computing/ ... /index.htm

Download the Buggy Boy demo and patch it. In the file NONAME000.COM at offset 3F75 (or offset F531 in the DSK itself) there is the sequence "78 A9 FD 8D 14 03", if you replace it by "78 A9 01 8D FA 03" then you should have a Jasmin compatible file.

Good luck :)
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

OK, I'll do it !
While at this, there is an article with some assembly routines for writing/reading Jasmin disks sectors in THEORIC n°8 p31-34 :P
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

\o/

That works fine real Jasmin II, real Oric !

:P


EDit : it bugged just after the nice bear (white screen, then bug) ! :lol:
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

OK, here a Jasmin dsk file with the buggy boy demo :
http://www.steekr.com/index.php?m=c9ae7 ... 904b3dd75c

How to for euphoric :

Start Euphoric with a Jasmin drive
c:\euphoric > euphoric -j

F1 ---> put buggyjas in drive A -->F1

Then press F6 to boot (booting TDOS should appear)

then type this :

Code: Select all

!"BUGGY.BIN"
The demo should start... it crashes on Euphoric just like on the real Oric :wink:
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

It's freezing as soons as I press F6, no TDOS message.
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

Dbug wrote:It's freezing as soons as I press F6, no TDOS message.
And in drive A (under euphoric configuration screen (F1)) you put buggyjas.dsk before pressing the F6 key of course ?

I just tried from my office : it works just fine...

Thus, it works on my real Oric
At my Office : XP (no DOSBOX, nor VDMSound installed)
It works at home : with VISTA/DOSBOX... (if it works there, it MUST work on your computer...) :mrgreen:

Are you under XP ? There is a know issue in XP with euphoric :
try to patch your XP with the link provided in this thread : Euphoric not running on WindowsXP : a possible solution

and then do not use DOSBOX anymore under XP (you don't need it) !!!

VDMSounds works far better, but you only need it if you do not want some crappy sound, that's it.

By the way, I imagine that just right after the Finish Bear,that the overlay memory is accessed, am I right ?
May be have we forgotten this in the patch :
"Mettre 127 dans #30E pour interdire les interruptions de la VIA"
User avatar
Dbug
Site Admin
Posts: 4437
Joined: Fri Jan 06, 2006 10:00 pm
Location: Oslo, Norway
Contact:

Post by Dbug »

I'm using the Overlay memory and the interruptions all over the place.
I have a custom IRQ handler which is perfectly happy to have the ROM out, because it was actually designed to work without the ROM enabled at all.

About the Euphoric freeze, I was talking of the emulated Oric being frozen. Not Euphoric. I've been using VDMS for years:
http://groups.google.com/group/comp.sys ... 75329e3afb

My Euphoric works fine with or without VDMS or Dos Box, and yes there is a very good reason for chosing Dos BOX over VDMS or native mode: The windowed display.

Starting to wonder if the problem is not in version 1.007 I'm using. Everything works fine except Jasmin emulation that freezes as soon as I press F6.
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

Dbug wrote: Starting to wonder if the problem is not in version 1.007 I'm using. Everything works fine except Jasmin emulation that freezes as soon as I press F6.
hum, true to say that I am using version 1.009 :D
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

Well, anyway, I found a bunch of thing digging out my Theoric :

A complete Boot system "Do it yourself" for the Jasmin
Many usefull memory locations
How to detect the presence of the Jasmin drive
and...
Small Asm code to read and write sectors on disc
User avatar
waskol
Flight Lieutenant
Posts: 414
Joined: Wed Jun 13, 2007 8:20 pm
Location: FRANCE, Paris

Post by waskol »

Read and Write Sectors on Jasmin
----------------------------------------

1) 1st method, use of the FTDOS (from asm or C)
OK, Thus we have all the address locations of the FTDOS functions in Theoric n°25, p30-31

The FTDOS provide some routines in order to read or write directly on some disk sectors.

Routine Address Description
-------------------------------------
!WS #E7A0 Write sector
!RS #E7D6 Read sector
!FS #FS23 Search for the first empty sector

Knowing This :
Vous pouvez lire ou écrire un bloc de 256 octets directement sur un secteur quelconque
de la disquette. Un secteur est repéré par
-le numéro de lecteur (NLU) de 1 à 4, situé à l'adresse #48C
-le numéro de piste (NP) de 0 à 81, situé à l'adresse #48D
-le numéro de secteur (NS) de 1 à 17, situé à l'adresse #48E Lorsque vous lisez un
secteur, il doit être transféré en mémoire centrale. Il faut donc indiquer l'adresse DB du
début du bloc dans lequel les 256 octets du secteur doivent être transférés.
Lorsque vous écrivez sur un secteur, il faut indiquer l'adresse DB du début du bloc de
256 octets à transférer dans le secteur. Cette adresse DB se trouve en #48F et #490.
It should not be difficult to have a very simple routine for the Jasmin

Code: Select all

//Read a Jasmin sector
void main ()
{
poke(#48C,sector_number);
poke(#48D,track_number);
poke(#48E,sector_number);
doke(#48F,address_where_it_should_be_loaded);
call(#E7D6)
}
2) Method 2, without FTDOS
--------------------------------
Everything is exlained in Theoric n°25, pages 15-22 !

How to see if the Jasmin is connected :

Code: Select all

In BASIC :
REPEAT:UNTIL (PEEK(#3F4) AND#01)=0

Or in ASM :
wait
   lda# $01
   and $03f4
   bne wait
   rts

How to create a custom DOS boot for Jasmin
---------------------------------------------------
See Theoric n°29 p16-18 : everything there !


You can download Theoric issues on www.abandonware-magazines.org :P
Post Reply