SymbOS MSX multitasking operating system - help needed! (MSX development MSX Forum)MSX Resource Center               
              
English Nederlands Espa�ol Portugu�s Russian French         

MSX Forum


MSX Forum

MSX development - SymbOS MSX multitasking operating system - help needed!

Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 Next Page )
Author

SymbOS MSX multitasking operating system - help needed!

mars2000you
msx master
Posts: 1723
Posted: June 03 2006, 20:57   
This database exists already : see the blueMSX/openMSX database !
Prodatron
msx master
Posts: 1125
Posted: June 03 2006, 21:01   
@Dvik: Right in this minute it runs the first time on my real MSX. I figured out, that the VG8235 has the normal Philips FDC (#7ff8-...).
I am quite happy, that it runs now more or less, but there are several issues:
- I didn't remember that SymbOS didn't support double side FAT12 discs. Now it does, but currently it's hardcoded. To find out, if it's a single or double side disc, I would need to read the boot sector every time when accessing the disc (reading the directory or opening a file), so I hope it will not slow down the disc access.
- I have to optimize the code between reading two clusters, as the 1:1 interleave is often too fast for SymbOS (Amsdos uses an interleave of 1:2), which currently results in slow track reading.
- Some applications don't start. Some people with IDE interface already reported, that they can only start some specific applications. Maybe it's the same problem. Unfortunately it doesn't happen in BlueMSX with emulated VG8235, so debugging will not be trivial.

@Flyguille: I don't want to say "bye bye auto-detect", but for the beginning, the appended parameter should help until we have a good solution.
What's about this:
- test, if track or sector register is R/W (so it's not a ROM)
- turn off the motor
- write something to command register and read the status register at the same address. If it's ram, I will get, what I wrote before, if it's really the FDC, then I receive some reasonable bits
But yes, I am afraid it will become a headache in any case...

Does someone have a list of example machines (supported in BlueMSX) for every different FDC?

flyguille
msx master
Posts: 1356
Posted: June 03 2006, 21:28   
nono, just try the STEP UP track command because it works always never mind if motor is on or off or if there is a disk or not!!!! and done!!! that way is perfect to detect the WD.

I worries if is two different mapping of bits at xxxC/D register in the same RANGE if it is not, so when you detects the range, already you knows what it is.
flyguille
msx master
Posts: 1356
Posted: June 03 2006, 21:34   
Quote:


@Flyguille: I don't want to say "bye bye auto-detect", but for the beginning, the appended parameter should help until we have a good solution.
What's about this:
- test, if track or sector register is R/W (so it's not a ROM)
- turn off the motor
- write something to command register and read the status register at the same address. If it's ram, I will get, what I wrote before, if it's really the FDC, then I receive some reasonable bits
But yes, I am afraid it will become a headache in any case...



yes sure, a headache because that way will not works...

Quote:

...write something to command register and read the status register at the same address....



because the routine will be confused if there is is NOT RAM, will be get confused if there is ROM and if there is nothing....

my final idea is perfect.

mars2000you
msx master
Posts: 1723
Posted: June 03 2006, 21:35   
WD1793 :

Spectravideo SVI-738 (MSX1 with a MSX2 VDP)

WD2793 :

Ciel Expert 3 (MSX2+)
Philips NMS-8245
Philips NMS-8280
Philips VG-8235
Philips VG-8240
Philips NMS-8250
Philips NMS-8255
Philips VY-0010 (extern diskdrive)
Sharp Epcom HB-3600 (extern diskdrive)
Sony HB-F1XD
Sony HB-F1XDMK2
Sony HB-F700
Sony HB-F900
Sony HB-G900
Sony HB-F1XDJ (MSX2+)
Sony HB-F1XV (MSX2+)
Sony HB-F500
Sony HBD-50 (extern diskdrive)
Sony HBD-F1
Sony HBK-30 (extern diskdrive)

MB8877A :

Daewoo CPC-400
Daewoo CPC-400S
National CF-3300 (MSX1)
Gradiente Expert DDPlus (MSX1)
National FS-4600
National FS-4700
National FS-5500
National FS-FD351 (extern diskdrive)
Yamaha YIS-805R3

Microsol :

Microsol Tecnologia CDX-2 used with Brazilian MSX1/2 (extern diskdrive - is included as intern diskdrive in the generic Brazilian MSX1/2 machines of blueMSX)

TC8566AF :

Panasonic FS-A1F
Panasonic FS-A1FM
Panasonic FS-A1FX (MSX2+)
Panasonic FS-A1WX (MSX2+)
Panasonic FS-A1GT (Turbo-R)
Panasonic FS-A1ST (Turbo-R)
Panasonic FS-A1WSX (MSX2+)
Panasonic FS-FD1 (extern diskdrive)
Panasonic FS-FD1A (extern diskdrive)
Sanyo Wavy PHC-70FD1 (MSX2+)
Sanyo Wavy PHC-70FD2 (MSX2+)
Trebmint
msx addict
Posts: 289
Posted: June 03 2006, 21:35   
With the msx version of symbos moving so quickly I thought I better get started on basic for symstudio. As you can see from the screen below the language is progressing however I've reached the point where I need an assembly genius to help me code the z80 functions. Not fair for me to keep annoying Prodatron with requests (cos he's a little busy already)
So Anyone?

TBH my z80 coding is now very poor, and some of the routines I've coded are slower than than they should be, though still many times faster than normal interpreted basic. I'd prefer to get working on the PC side of syntax parsing and the code editor, consequently need some handy genius.
Rob
dvik
msx master
Posts: 1481
Posted: June 03 2006, 22:11   
@Trebmint: I'm pretty good at z80 assembly and very good at optimizing code in general so maybe I can help out. I'm a bit busy with other projects atm but I can certanly help out when I can. Do you have a cvs or similar and docs describing the design, interfaces and other things that are good to know.
spl
msx professional
Posts: 813
Posted: June 04 2006, 02:08   
Trembint: ask also here http://forum.karoshicorp.com
PingPong
msx master
Posts: 1290
Posted: June 04 2006, 09:04   
Quote:

With the msx version of symbos moving so quickly I thought I better get started on basic for symstudio. As you can see from the screen below the language is progressing however I've reached the point where I need an assembly genius to help me code the z80 functions. Not fair for me to keep annoying Prodatron with requests (cos he's a little busy already)
So Anyone?

TBH my z80 coding is now very poor, and some of the routines I've coded are slower than than they should be, though still many times faster than normal interpreted basic. I'd prefer to get working on the PC side of syntax parsing and the code editor, consequently need some handy genius.
Rob



Trebint, do not worry: it's easy do get better speed in msx-basic, since this interpreter is like a tired snail!
Patsie
msx freak
Posts: 199
Posted: June 04 2006, 10:19   
To make starting SymbOS with the correct diskrom easier, I would like to suggest that you can not only specify the name of the rom to use, but also a more easier to remember name, like the manufacturer of your MSX. (not everybody is technical and knows what chipset is in his/her computer)
So for example:
 symbos /fdd:wd2793
or
 symbos /fdd:philips
and
 symbos /fdd:tc8566af
or
 symbos /fdd:panasonic
would start the same diskrom. I've made a short list from mars2000you's long list (asuming this is correct):
 WD1793   = svi
 WD2793   = ciel, philips, sharp, sony
 MB8877A  = daewoo, national, gradiente, yamaha
 microsol = microsol :)
 TC8566AF = panasonic, sanyo
@Trebmint: the programming language in SymStudio looks great! Is it (partly) working? Are there some docs or examples how to use it?

Trebmint
msx addict
Posts: 289
Posted: June 04 2006, 10:56   
Quote:

Trebmint: the programming language in SymStudio looks great! Is it (partly) working? Are there some docs or examples how to use it?


Yes it can currently compile apps that run happily in symbos, but as yet I have no docs. There are also currently many features not yet supported like arrays, or floats, plus it only has about 30 instructions/functions so far so its very limited in what you can code. But those there all work!
Functions/Instructions can easily be added as the assembler will recognise functions and what has to be passed to them for example:
;*******************
;**** CloseFile ****
;*******************
AFunction CloseFile(SymBasic_FileTemp)
   ld		a,(SymBasic_FileTemp)			;**** Get Passed File number
   call	SySystem_CallFunction			;**** Symbos Close File Function
   db		MSC_SYS_SYSFIL					;
   db		FNC_FIL_FILCLO					;
   call	c,SymBasic_Drive_Error			;**** If error reported jump to Error Set
   pop		hl								;**** Pop Return address
   ld		de,0							;**** Put a Null 32bit Result on Stack
   push	de								;****
   push	de								;****
   jp		(hl)							;**** Return to 

This is a now a correctly working instruction called Closefile(x). This is freely mixable between Z80 or Basic so you could make a function like:
;**** Assembler ****
AFunction Max(Number1,Number2)
pop ix ;Return Address
ld hl,(Number1)
ld de,(Number2)
....
push de
push hl
jp (ix)
EndF
;**** Basic ****
Function Max(Number1,Number2)
If Number1>=Number2 Then
Return Number1
Else
Return Number2
Endif
EndF
;****End****
This could now be included in any expression like
A=Count*(Max(First,Second)-32)/6

Another nice feature is that objects created in the form editor are automatically included in the langauge at assembly. So a button or a label created with the form editor can be physically changed by altering the variable. e.g
Button1_Text=Str$(Count)
Label1_X=Label1_X+1
etc.

Sonic_aka_T

msx guru
Posts: 2345
Posted: June 04 2006, 13:11   
Quote:

@Sonic_aka_T: Yes, I have the piece of code for getting the diskrom slot table in the init routine you sent me, thank you, I will use this!

Regarding FDC detection: If it's not so trivial I will first take PingPongs suggestion. The user can create a batch file like "sym.bat", which starts "symbos.com" with the correct FDC option. This batch could be created later with an install program, so I don't need to touch the CMOS.

Well, here's something that might work okay for the moment. It's not brilliant, but it might still do the trick, especially for the first beta versions of SymbOS:

Page in the diskROM using the slot-address from the init routine. Then, simply add the first 32 bytes of the disk ROM (basically the jumptable) to $00. Do this using A, and you'll get an 8bit result, ignore carries and whatnot. By testing a bunch of ROMs from the interwebs I came up with the following numbers:

WD2793: $0F, $26, $9B or $AB
TC8566AF: $43,$96,$D0 or $F2
MB8877A: $0A, $2E, $BD or $D7

These numbers seems to be fairly consistant between similar models. I assume this might not be a bad method to detect the proper FDC setup. It might be needed to expand the checksum a little if two different FDCs return the same checksum, but for the ROMs I checked (like 20 orso) this was not the case. I'm guessing that all-in-all there may be like 20-30 different diskROMs out there, so this might turn out to be a clean and simple method to check which FDC is used. Apart from that, it should work on any device (floppy or otherwise) which has a disk ROM. If we're lucky enough, just checking the jumptable might be enough!
manuel
msx legend
Posts: 4321
Posted: June 04 2006, 14:31   
A way to override it is still necessary of course.
Sonic_aka_T

msx guru
Posts: 2345
Posted: June 04 2006, 15:45   
Quote:

A way to override it is still necessary of course.

Indeed, if the checksum fails you'd have to load each of the drivers and try to find the proper FDC driver. Alternatively one big routine with the detection code for all the FDCs would work too. I don't know how many there are in total, maybe 5? I also don't really kow if there's any difference in address-ranges etc... Where's Alex Wulms when you need him?
Prodatron
msx master
Posts: 1125
Posted: June 05 2006, 00:32   
Currently I still have problems with sector read/write ("only" on the real machine, not in the emulator):
- it seems, that I have to wait a special time between sending the command and reading the status register for checking, if I can read the first byte of the sector. If I don't wait a specific time, I receive "fdc is ready for next command", so my 512byte read routine quits directly at the beginning.
- if I wait too long, sometimes I receive an additional crap byte at the beginning, so the first byte of the sector is corrupt and the following bytes are shifted by one.

Thanx to PingPong I could have a look at the disassembled disc rom routines of the VG8245. They don't use the status register but the IRQ/DRQ register. Is it possible, that this register contains a "better" status? (maybe that's the reason, why this register exists?) I would like to use the status register always, as it would be more easier to make the routines compatible for all fdcs. But maybe I shouldn't do this?
 
Goto page ( Previous Page 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | 48 | 49 | 50 | 51 | 52 | 53 | 54 | 55 | 56 | 57 | 58 | 59 | 60 | 61 | 62 | 63 | 64 | 65 | 66 | 67 | 68 | 69 | 70 | 71 | 72 | 73 | 74 | 75 | 76 | 77 | 78 | 79 | 80 | 81 | 82 | 83 | 84 | 85 | 86 | 87 | 88 | 89 | 90 | 91 | 92 | 93 | 94 | 95 | 96 | 97 | 98 | 99 | 100 | 101 | 102 | 103 | 104 | 105 | 106 | 107 | 108 | 109 | 110 | 111 | 112 | 113 | 114 | 115 | 116 | 117 | 118 | 119 | 120 | 121 | 122 | 123 | 124 | 125 | 126 | 127 | 128 | 129 | 130 | 131 | 132 | 133 | 134 | 135 | 136 | 137 | 138 | 139 | 140 | 141 | 142 | 143 | 144 | 145 | 146 | 147 | 148 | 149 | 150 | 151 | 152 | 153 | 154 | 155 | 156 | 157 | 158 | 159 | 160 | 161 | 162 | 163 | 164 | 165 | 166 | 167 | 168 | 169 | 170 | 171 | 172 | 173 | 174 | 175 | 176 | 177 | 178 | 179 | 180 | 181 | 182 | 183 | 184 | 185 | 186 | 187 | 188 | 189 | 190 | 191 | 192 | 193 | 194 | 195 | 196 | 197 | 198 | 199 | 200 | 201 Next Page )
 







(c) 1994 - 2010 MSX Resource Center Foundation. MSX is a trademark of MSX Licensing Corporation.