/[projet1]/public/oric/demos/OricTech/code/disk_info.h
Defence Force logotype

Contents of /public/oric/demos/OricTech/code/disk_info.h

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1346 - (show annotations)
Sat Jan 9 16:14:40 2016 UTC (3 years, 9 months ago) by dbug
File MIME type: text/plain
File size: 2900 byte(s)
Updated Oric Tech to use the new FloppyBuilder API, and fixed some bugs.
1 ;
2 ; http://oric.free.fr/programming.html#disc
3 ;
4 #define location_loader $fd00 ; Need to match the information set in loader.asm
5 #define loader_track_position 0 ; Location of the loader on the disk (track number)
6 #define loader_sector_position 4 ; Location of the loader on the disk (sector number)
7 #define loader_zp_start $80 ; Location of the first zero page address used during the loading
8 #define loader_sector_buffer $200 ; Location of the 256 bytes buffer used to load the sectors
9
10 #define wait_status_floppy 30
11
12 ; Jasmin registers are equivalent to microdisc + $e4 / 228
13 #define FDC_OFFSET_MICRODISC $00
14 #define FDC_OFFSET_JASMIN $E4
15
16 #ifdef MICRODISC_LOADER
17
18 #define FDC_command_register $0310
19 #define FDC_status_register $0310
20 #define FDC_track_register $0311
21 #define FDC_sector_register $0312
22 #define FDC_data $0313
23 #define FDC_flags $0314
24 #define FDC_drq $0318
25
26 #define FDC_Flag_DiscSide %00010000
27
28 #define CMD_ReadSector $80
29 #define CMD_Seek $1F
30
31 #else
32 #ifdef JASMIN_LOADER
33 #define FDC_command_register $03f4
34 #define FDC_status_register $03f4
35 #define FDC_track_register $03f5
36 #define FDC_sector_register $03f6
37 #define FDC_data $03f7
38 #define FDC_flags $03f8
39 #define FDC_drq $03FC
40
41 #define FDC_Flag_DiscSide %00000001
42
43 #define CMD_ReadSector $8c
44 #define CMD_Seek $1F
45
46 #endif
47 #endif
48
49
50 ; ____________ bit 7: INTRQ state (only if bit 0 above has been set to 1) in negative logic so it's 0 if FDC requests an Interrupt.
51 ; |
52 ; |x.......| Read
53 ;#define FDC_flags $0314
54 ; |xxxxxxxx| Write
55 ; ||||||||
56 ; ||||||||_____bit 0: enable FDC INTRQ to appear on read location $0314 and to drive cpu IRQ
57 ; |||||||_____ bit 1: ROMDIS (active low). When 0, internal Basic rom is disabled.
58 ; ||||||______ bit 2: along with bit 3, selects the data separator clock divisor (1: double density, 0: single-density)
59 ; |||||_______ bit 3: double density enable (0: double density, 1: single density)
60 ; ||||________ bit 4: side select
61 ; |||_________ bits 56: drive select (0 to 3)
62 ; |___________ bit 7: Eprom select (active low)
63 ;
64 ; %10000101 -> Eprom deselected, double density, ROM disabled, irq enabled
65 ; %10000001 ->
66 ;
67 ; $0318
68 ; bit 7: DRQ state (active low)
69
70

  ViewVC Help
Powered by ViewVC 1.1.26