mirror of
https://github.com/romychs/OK240.2-Firmware.git
synced 2026-11-27 16:42:23 +03:00
MonR9 proto, Type disassm, Jack disassm.
This commit is contained in:
1 parent
1f7e4e3ac9
commit
ba98cd404b
59 files changed
+16793
-451
No files matched your search
@@ -33,7 +33,8 @@ tape_read_f EQU 0xD639
|
||||
tape_write_f EQU 0xD63C
|
||||
tape_wait_f EQU 0xD63F
|
||||
|
||||
bios_var04 EQU 0xD64B
|
||||
drive_B_tracks EQU 0xD64B
|
||||
drive_C_tracks EQU 0xD64C
|
||||
|
||||
ENDMODULE
|
||||
|
||||
|
||||
@@ -39,16 +39,32 @@ CCP_SIZE EQU 0x809
|
||||
CPM_VERSION EQU 0x22 ; Version of CP/M as byte nibbles '2.2'
|
||||
|
||||
CTRL EQU 0x5E ; ^
|
||||
CTRL_A EQU 0x01
|
||||
CTRL_B EQU 0x02
|
||||
CTRL_C EQU 0x03 ; Warm boot
|
||||
CTRL_H EQU 0x08 ; Backspace
|
||||
CTRL_D EQU 0x04
|
||||
CTRL_E EQU 0x05 ; Move to beginning of new line (Physical EOL)
|
||||
CTRL_F EQU 0x06
|
||||
CTRL_G EQU 0x07
|
||||
CTRL_H EQU 0x08 ; Backspace
|
||||
CTRL_I EQU 0x09
|
||||
CTRL_J EQU 0x0A ; LF - Line Feed
|
||||
CTRL_K EQU 0x0B
|
||||
CTRL_L EQU 0x0C
|
||||
CTRL_M EQU 0x0D ; CR - Carriage Return
|
||||
CTRL_N EQU 0x0E
|
||||
CTRL_O EQU 0x0F
|
||||
CTRL_P EQU 0x10 ; turn on/off printer
|
||||
CTRL_Q EQU 0x11
|
||||
CTRL_R EQU 0x12 ; Repeat current cmd line
|
||||
CTRL_S EQU 0x13 ; Temporary stop display data to console (aka DC3)
|
||||
CTRL_T EQU 0x14
|
||||
CTRL_U EQU 0x15 ; Cancel (erase) current cmd line
|
||||
CTRL_V EQU 0x16
|
||||
CTRL_W EQU 0x17
|
||||
CTRL_X EQU 0x18 ; Cancel (erase) current cmd line
|
||||
CTRL_Y EQU 0x19
|
||||
CTRL_Z EQU 0x1A ; CTRL-Z - end of text file marker
|
||||
|
||||
; ------------------------------------------------------
|
||||
DBPLIST EQU 0x0F
|
||||
@@ -69,9 +85,10 @@ FDC_DD80RB EQU 0x21
|
||||
FDC_NOT_READY EQU 0x80
|
||||
FDC_RESTORE_L EQU 0x08
|
||||
FDC_SEEK_LV EQU 0x1C
|
||||
FDC_RESTORE_UH_NV EQU 0x03 ; Restore Unload Head, No Verify, 15ms Rate
|
||||
FDC_RESTORE EQU 0x03 ; Restore Unload Head, No Verify, 15ms Rate
|
||||
FILE_DELETED EQU 0xE5
|
||||
FWF_MASK EQU 0x80 ; File Write Flag mask
|
||||
FLOPPY_SSEL EQU 0x20
|
||||
|
||||
; ---------------------------------------------------
|
||||
; FCB Offsets
|
||||
@@ -109,7 +126,11 @@ IRQ_2 EQU 0x04
|
||||
;LP_IRQ EQU 0x08
|
||||
KBD_IRQ EQU 0x02
|
||||
|
||||
KBD_ACK EQU 0x10
|
||||
KBD_ACK EQU 0x80
|
||||
|
||||
IRQ_KEYBOARD EQU 0x02
|
||||
IRQ_PRINTER EQU 0x08
|
||||
IRQ_TIMER EQU 0x10
|
||||
|
||||
KEY_ALF EQU 0x0D
|
||||
KEY_FIX EQU 0x15
|
||||
|
||||
@@ -28,22 +28,26 @@ USR_DD79CTR EQU 0x03
|
||||
; -------------------------------------------------------
|
||||
; КР1818ВГ93
|
||||
; -------------------------------------------------------
|
||||
; CMD
|
||||
|
||||
; WR: FDC CMD
|
||||
; RD: STATUS
|
||||
FDC_CMD EQU 0x20
|
||||
|
||||
; TRACK
|
||||
; FDC TRACK
|
||||
FDC_TRACK EQU 0x21
|
||||
|
||||
; SECTOR
|
||||
; FDC SECTOR
|
||||
FDC_SECT EQU 0x22
|
||||
|
||||
; DATA
|
||||
; FDC DATA
|
||||
FDC_DATA EQU 0x23
|
||||
|
||||
;
|
||||
; RD: Bit 0 - DRQ
|
||||
FDC_WAIT EQU 0x24
|
||||
|
||||
; Controller port
|
||||
; RD: [MOTST,SSEL,x,x,DRSEL,MOT1,MOT0,INTRQ]
|
||||
; WR: [x,x,SSEL,#DDEN,INIT,DRSEL,MOT1,MOT0]
|
||||
FLOPPY EQU 0x25
|
||||
|
||||
|
||||
|
||||
@@ -0,0 +1,496 @@
|
||||
MONITOR.mon_start 0xe000 f
|
||||
MONITOR.mon_hexb 0xe003 f
|
||||
MONITOR.non_con_status 0xe006 f
|
||||
MONITOR.mon_con_in 0xe009 f
|
||||
MONITOR.mon_con_out 0xe00c f
|
||||
MONITOR.mon_serial_in 0xe00f f
|
||||
MONITOR.mon_serial_out 0xe012 f
|
||||
MONITOR.mon_char_print 0xe015 f
|
||||
MONITOR.mon_tape_read 0xe018 f
|
||||
MONITOR.mon_tape_write 0xe01b f
|
||||
MONITOR.mon_ram_disk_read 0xe01e f
|
||||
MONITOR.mon_ram_disk_write 0xe021 f
|
||||
MONITOR.mon_tape_read_ram 0xe024 f
|
||||
MONITOR.mon_tape_write_ram 0xe027 f
|
||||
MONITOR.mon_tape_wait 0xe02a f
|
||||
MONITOR.mon_tape_detect 0xe02d f
|
||||
MONITOR.mon_read_floppy 0xe030 f
|
||||
MONITOR.mon_write_floppy 0xe033 f
|
||||
MONITOR.mon_out_str_z 0xe036 f
|
||||
MONITOR.m_start 0xe051 f
|
||||
MONITOR.m_start.fill_video 0xe06c f
|
||||
MONITOR.m_start.conf_uart 0xe0a7 f
|
||||
MONITOR.m_start.conf_pic 0xe0ba f
|
||||
MONITOR.m_out_strz 0xe0f1 f
|
||||
MONITOR.mgs_system_nf 0xe0fc f
|
||||
MONITOR.m_sys_halt 0xe111 f
|
||||
MONITOR.m_con_status 0xe112 f
|
||||
MONITOR.m_serial_in 0xe11c f
|
||||
MONITOR.m_con_in 0xe128 f
|
||||
MONITOR.m_serial_out 0xe13d f
|
||||
MONITOR.m_char_print 0xe148 f
|
||||
MONITOR.m_char_print.wait_lp 0xe157 f
|
||||
MONITOR.m_con_out 0xe163 f
|
||||
MONITOR.m_con_out_int 0xe16d f
|
||||
MONITOR.get_esc_param 0xe187 f
|
||||
MONITOR.esc_no_draw_fn 0xe1c1 f
|
||||
MONITOR.esc_exit 0xe1c6 f
|
||||
MONITOR.esc_params_tab 0xe1cb f
|
||||
MONITOR.esc_handler_tab 0xe1db f
|
||||
MONITOR.esc_set_beep 0xe1f9 f
|
||||
MONITOR.esc_set_cursor2 0xe20e f
|
||||
MONITOR.esc_print_screen 0xe211 f
|
||||
MONITOR.esc_print_screen.chk_keys 0xe220 f
|
||||
MONITOR.esc_print_screen.no_keys 0xe22d f
|
||||
MONITOR.m_print_hor_line 0xe23a f
|
||||
MONITOR.m_print_hor_line.print_next_col 0xe248 f
|
||||
MONITOR.m_print_cmd 0xe276 f
|
||||
MONITOR.m_print_cmd.print_nxt 0xe277 f
|
||||
MONITOR.m_print_cmd.cmd_end 0xe285 f
|
||||
MONITOR.m_print_vert_7pix 0xe287 f
|
||||
MONITOR.cmd_esc_inc_Y2 0xe2a5 f
|
||||
MONITOR.cmd_esc_set_X0 0xe2a9 f
|
||||
MONITOR.cmd_esc_set_X 0xe2ae f
|
||||
MONITOR.cmd_esc_print_col 0xe2b1 f
|
||||
MONITOR.m_get_7vpix 0xe2b4 f
|
||||
MONITOR.m_get_7vpix.calc_pix_no 0xe2be f
|
||||
MONITOR.m_get_7vpix.for_all_pix 0xe2dc f
|
||||
MONITOR.m_get_7vpix.all_shifted 0xe2e9 f
|
||||
MONITOR.m_get_7vpix.not_1_1 0xe2f2 f
|
||||
MONITOR.m_get_7vpix.not_1_2 0xe2fa f
|
||||
MONITOR.esc_set_palette 0xe2fe f
|
||||
MONITOR.esp_no_colr 0xe313 f
|
||||
MONITOR.esc_set_charset 0xe317 f
|
||||
MONITOR.m_get_glyph 0xe320 f
|
||||
MONITOR.m_get_glyph.cp_rus 0xe340 f
|
||||
MONITOR.m_get_glyph.cp_common 0xe344 f
|
||||
MONITOR.m_print_no_esc 0xe349 f
|
||||
MONITOR.m_print_no_esc.l1 0xe377 f
|
||||
MONITOR.m_print_no_esc.l2 0xe381 f
|
||||
MONITOR.m_print_no_esc.l3 0xe389 f
|
||||
MONITOR.m_print_no_esc.l4 0xe391 f
|
||||
MONITOR.m_print_no_esc.l5 0xe396 f
|
||||
MONITOR.m_print_no_esc.sym_draw 0xe39a f
|
||||
MONITOR.m_print_no_esc.pne_l7 0xe3a5 f
|
||||
MONITOR.m_print_no_esc.pne_l8 0xe3aa f
|
||||
MONITOR.m40_rt 0xe3ee f
|
||||
MONITOR.m40_wrap_rt 0xe3f9 f
|
||||
MONITOR.m40_lf 0xe405 f
|
||||
MONITOR.m40_bksp 0xe40f f
|
||||
MONITOR.m40_bksp.wrap 0xe41d f
|
||||
MONITOR.m40_up 0xe421 f
|
||||
MONITOR.m40_up.up_no_minus 0xe429 f
|
||||
MONITOR.m20_tab 0xe42b f
|
||||
MONITOR.calc_addr_40 0xe439 f
|
||||
MONITOR.calc_addr_40.l1 0xe454 f
|
||||
MONITOR.calc_addr_40.l2 0xe45a f
|
||||
MONITOR.m2_lf 0xe464 f
|
||||
MONITOR.m2_lf.lf_nowr 0xe46e f
|
||||
MONITOR.m2_lf.cas_l5 0xe47b f
|
||||
MONITOR.m2_lf.cas_l6 0xe480 f
|
||||
MONITOR.m2_lf.cas_l7 0xe496 f
|
||||
MONITOR.m2_lf.cas_l8 0xe49b f
|
||||
MONITOR.m20_bksp 0xe4ab f
|
||||
MONITOR.mp_mode_64 0xe4b8 f
|
||||
MONITOR.mp_mode_64.next_row 0xe4d3 f
|
||||
MONITOR.m64_rt 0xe4e7 f
|
||||
MONITOR.m64_lf 0xe4f0 f
|
||||
MONITOR.scroll_up 0xe4fa f
|
||||
MONITOR.scroll_up.next_row 0xe512 f
|
||||
MONITOR.scroll_up.next_col 0xe514 f
|
||||
MONITOR.m64_bs 0xe524 f
|
||||
MONITOR.m64_up 0xe52f f
|
||||
MONITOR.m64_up.no_wrap 0xe537 f
|
||||
MONITOR.m64_tab 0xe539 f
|
||||
MONITOR.mp_mode_80 0xe545 f
|
||||
MONITOR.mp_mode_80.l1 0xe55e f
|
||||
MONITOR.mp_mode_80.l2 0xe56d f
|
||||
MONITOR.mp_mode_80.l3 0xe58e f
|
||||
MONITOR.mp_mode_80.l4 0xe5b3 f
|
||||
MONITOR.mp_mode_80.l5 0xe5b4 f
|
||||
MONITOR.mp_mode_80.l6 0xe5c4 f
|
||||
MONITOR.m80_rt 0xe5cf f
|
||||
MONITOR.m80_col_wrap 0xe5da f
|
||||
MONITOR.m80_lf 0xe5de f
|
||||
MONITOR.m80_bs 0xe5e8 f
|
||||
MONITOR.m80_bs.wrap 0xe5f6 f
|
||||
MONITOR.m80_up 0xe5fa f
|
||||
MONITOR.m80_up.no_wrap 0xe602 f
|
||||
MONITOR.m80_tab 0xe604 f
|
||||
MONITOR.calc_addr_80 0xe612 f
|
||||
MONITOR.mns_l1 0xe62d f
|
||||
MONITOR.mns_ep_fm_0 0xe633 f
|
||||
MONITOR.m_clear_screen 0xe639 f
|
||||
MONITOR.m_clear_screen.fill_scrn 0xe652 f
|
||||
MONITOR.m_clear_screen.mono_mode 0xe669 f
|
||||
MONITOR.m_cursor_home 0xe66c f
|
||||
MONITOR.m_clear_20_rows 0xe679 f
|
||||
MONITOR.m_clear_20_rows.next_row 0xe683 f
|
||||
MONITOR.m_clear_20_rows.next_col 0xe688 f
|
||||
MONITOR.m_draw_cursor 0xe69a f
|
||||
MONITOR.m_draw_cursor.dc_rt2 0xe6cf f
|
||||
MONITOR.m_draw_cursor.dc_mid 0xe6d7 f
|
||||
MONITOR.m_draw_cursor.dc_lt 0xe6dd f
|
||||
MONITOR.m_draw_cursor.dc_rt1 0xe6e3 f
|
||||
MONITOR.m_draw_cursor.dc_put 0xe6e6 f
|
||||
MONITOR.m_draw_cursor.dc_mode_64 0xe703 f
|
||||
MONITOR.m_draw_cursor.cur_64_next 0xe721 f
|
||||
MONITOR.m_draw_cursor.dc_mode_80 0xe72f f
|
||||
MONITOR.m_draw_cursor.dc_1_byte 0xe75e f
|
||||
MONITOR.m_draw_cursor.dc_2_byte 0xe769 f
|
||||
MONITOR.m_draw_cursor.dc_80_end 0xe776 f
|
||||
MONITOR.m_handle_esc_code 0xe77c f
|
||||
MONITOR.m_handle_control_code 0xe78a f
|
||||
MONITOR.handle_cc_common 0xe7c4 f
|
||||
MONITOR.handle_cc_common.handle_cc_mono 0xe7ff f
|
||||
MONITOR.handle_cc_80x25 0xe833 f
|
||||
MONITOR.m_beep 0xe85a f
|
||||
MONITOR.m_bell_cont 0xe86f f
|
||||
MONITOR.m_bell_wait_tmr1 0xe879 f
|
||||
MONITOR.m_bell_wait_tmr2 0xe886 f
|
||||
MONITOR.esc_set_cursor 0xe890 f
|
||||
MONITOR.esc_set_cursor.mode_40 0xe8bf f
|
||||
MONITOR.esc_set_cursor.mode_80 0xe8ca f
|
||||
MONITOR.esc_set_cursor.common 0xe8d2 f
|
||||
MONITOR.esc_le_24 0xe8df f
|
||||
MONITOR.esc_set_vmode 0xe8e9 f
|
||||
MONITOR.esc_set_vmode.set_color_mode 0xe90f f
|
||||
MONITOR.esc_set_vmode.skip_for_mono_mode 0xe911 f
|
||||
MONITOR.esc_set_vmode.draw_cursor 0xe91a f
|
||||
MONITOR.esc_set_vmode.cursor_hide 0xe91e f
|
||||
MONITOR.esc_set_vmode.cursor_show 0xe928 f
|
||||
MONITOR.esc_set_color 0xe92f f
|
||||
MONITOR.m_set_color 0xe932 f
|
||||
MONITOR.m_print_at_xy 0xe943 f
|
||||
MONITOR.m_print_at_xy.mode_sp 0xe986 f
|
||||
MONITOR.m_print_at_xy.out_sp 0xe99b f
|
||||
MONITOR.m_print_at_xy.next_line 0xe9a2 f
|
||||
MONITOR.m_print_at_xy.l04 0xe9af f
|
||||
MONITOR.m_print_at_xy.l05 0xe9b4 f
|
||||
MONITOR.m_print_at_xy.sprites_en 0xe9e2 f
|
||||
MONITOR.mode2_exit 0xe9e6 f
|
||||
MONITOR.co_ex_l08 0xe9ed f
|
||||
MONITOR.out_no_xor 0xe9f1 f
|
||||
MONITOR.out_no_xor.l10 0xe9fe f
|
||||
MONITOR.out_no_xor.l11 0xea03 f
|
||||
MONITOR.game_sprite_tab 0xea39 f
|
||||
MONITOR.calc_px_addr 0xeb51 f
|
||||
MONITOR.esc_draw_fill_rect 0xeb64 f
|
||||
MONITOR.esc_draw_fill_rect.non_zero_h 0xeb73 f
|
||||
MONITOR.esc_draw_fill_rect.shift_mask_l 0xeb78 f
|
||||
MONITOR.esc_draw_fill_rect.shift_mask_r 0xeb8d f
|
||||
MONITOR.esc_draw_fill_rect.next_line 0xebb7 f
|
||||
MONITOR.esc_draw_fill_rect.rectangle_xor 0xebc6 f
|
||||
MONITOR.esc_draw_fill_rect.edf_l6 0xebd5 f
|
||||
MONITOR.esc_draw_fill_rect.next_8px 0xebdf f
|
||||
MONITOR.esc_draw_fill_rect.w_ne_0 0xebe0 f
|
||||
MONITOR.esc_draw_fill_rect.r_mask 0xebf6 f
|
||||
MONITOR.esc_draw_fill_rect.next_full 0xebfc f
|
||||
MONITOR.esc_draw_fill_rect.complete 0xec0b f
|
||||
MONITOR.esc_paint 0xec18 f
|
||||
MONITOR.esc_paint.l1 0xec57 f
|
||||
MONITOR.ep_fm_0 0xec8b f
|
||||
MONITOR.ep_task_end 0xec9a f
|
||||
MONITOR.ep_l4 0xecb5 f
|
||||
MONITOR.ep_l5 0xecbd f
|
||||
MONITOR.ep_l6 0xecc5 f
|
||||
MONITOR.ep_f_fast 0xecd7 f
|
||||
MONITOR.ep_l8 0xece5 f
|
||||
MONITOR.ep_l9 0xed1d f
|
||||
MONITOR.ep_l10 0xed2c f
|
||||
MONITOR.ep_l11 0xed3d f
|
||||
MONITOR.paint_find_next_right 0xed77 f
|
||||
MONITOR.paint_find_next_right.l1 0xed84 f
|
||||
MONITOR.paint_find_next_right.l2 0xed90 f
|
||||
MONITOR.paint_find_next_left 0xed9a f
|
||||
MONITOR.paint_find_next_left.l1 0xeda7 f
|
||||
MONITOR.paint_find_next_left.l2 0xedb3 f
|
||||
MONITOR.ep_l12 0xedbd f
|
||||
MONITOR.ep_l13 0xedd6 f
|
||||
MONITOR.ep_l14 0xede8 f
|
||||
MONITOR.ep_l15 0xedf1 f
|
||||
MONITOR.ep_l16 0xedfa f
|
||||
MONITOR.paint_find_right 0xedfd f
|
||||
MONITOR.paint_find_right.in_byte 0xee0a f
|
||||
MONITOR.paint_find_left 0xee18 f
|
||||
MONITOR.paint_find_left.in_byte 0xee24 f
|
||||
MONITOR.get_pixel 0xee32 f
|
||||
MONITOR.get_pixel.bit1_set 0xee48 f
|
||||
MONITOR.get_pixel.bit2_set 0xee57 f
|
||||
MONITOR.get_pixel.bit12_set 0xee5f f
|
||||
MONITOR.paint_task 0xee67 f
|
||||
MONITOR.paint_task.lmp_mask 0xee7e f
|
||||
MONITOR.paint_task.rmp_mask 0xee97 f
|
||||
MONITOR.paint_task.lmi_mask 0xeea3 f
|
||||
MONITOR.paint_task.rmi_mask 0xeeac f
|
||||
MONITOR.paint_exit 0xeec6 f
|
||||
MONITOR.draw_line_h 0xeed1 f
|
||||
MONITOR.draw_line_h.next_byte 0xeedc f
|
||||
MONITOR.draw_line_h.width_ne0 0xeedd f
|
||||
MONITOR.draw_line_h.r_mask 0xeef5 f
|
||||
MONITOR.draw_line_h.full_8 0xeefb f
|
||||
MONITOR.draw_line_h.complete 0xef06 f
|
||||
MONITOR.esc_draw_line 0xef0b f
|
||||
MONITOR.esc_draw_line.x1_le_x2 0xef1b f
|
||||
MONITOR.esc_draw_line.pos_height 0xef2b f
|
||||
MONITOR.esc_draw_line.next_16 0xef45 f
|
||||
MONITOR.esc_draw_line.edl_l4 0xef51 f
|
||||
MONITOR.esc_draw_line.edl_l5 0xef54 f
|
||||
MONITOR.esc_draw_line.roll_l 0xef67 f
|
||||
MONITOR.esc_draw_line.edl_l7 0xef6e f
|
||||
MONITOR.esc_draw_line.next_up 0xef89 f
|
||||
MONITOR.esc_draw_line.next_down 0xef9f f
|
||||
MONITOR.esc_draw_line.is_last 0xefb5 f
|
||||
MONITOR.esc_draw_line.edl_l11 0xefc3 f
|
||||
MONITOR.esc_draw_line.width0 0xefcb f
|
||||
MONITOR.esc_draw_line.edl_l13 0xefd1 f
|
||||
MONITOR.esc_draw_line.next_row_up 0xefe5 f
|
||||
MONITOR.esc_draw_line.next_row_down 0xeffb f
|
||||
MONITOR.close_vram_ret 0xf011 f
|
||||
MONITOR.height0 0xf016 f
|
||||
MONITOR.height0.len_ne0 0xf01e f
|
||||
MONITOR.height0.edl_l19 0xf023 f
|
||||
MONITOR.height0.next_col 0xf033 f
|
||||
MONITOR.height0.edl_l21 0xf048 f
|
||||
MONITOR.esc_draw_dot 0xf052 f
|
||||
MONITOR.edd_l1 0xf05b f
|
||||
MONITOR.edd_ep_fm_0 0xf084 f
|
||||
MONITOR.edd_ep_task_end 0xf09d f
|
||||
MONITOR.esc_picture 0xf0a4 f
|
||||
MONITOR.pict_sub1 0xf0d6 f
|
||||
MONITOR.pict_clr 0xf0f3 f
|
||||
MONITOR.ehd_l1 0xf104 f
|
||||
MONITOR.m_fn_39 0xf10f f
|
||||
MONITOR.m_fn_39.l1 0xf12e f
|
||||
MONITOR.m_fn_39.l2 0xf148 f
|
||||
MONITOR.m_fn_39.l3 0xf15f f
|
||||
MONITOR.get_image_hdr 0xf177 f
|
||||
MONITOR.esc_get_put_image 0xf1b5 f
|
||||
MONITOR.get_image 0xf1e1 f
|
||||
MONITOR.get_image.next_row 0xf1e3 f
|
||||
MONITOR.get_image.l2 0xf1f2 f
|
||||
MONITOR.put_image 0xf201 f
|
||||
MONITOR.put_image.next_row 0xf203 f
|
||||
MONITOR.put_image.l2 0xf213 f
|
||||
MONITOR.img_task_end 0xf21e f
|
||||
MONITOR.fn39_sub2 0xf223 f
|
||||
MONITOR.fn39_sub2.l1 0xf224 f
|
||||
MONITOR.fn39_sub2.l2 0xf225 f
|
||||
MONITOR.fn39_sub2.l3 0xf233 f
|
||||
MONITOR.fn39_sub2.l4 0xf238 f
|
||||
MONITOR.fn39_sub2.l5 0xf245 f
|
||||
MONITOR.fn39_sub2.l6 0xf24a f
|
||||
MONITOR.gih_rt 0xf266 f
|
||||
MONITOR.gih_rt.l1 0xf289 f
|
||||
MONITOR.gih_rt.l2 0xf28d f
|
||||
MONITOR.gih_rt.l3 0xf291 f
|
||||
MONITOR.gih_bs 0xf2bd f
|
||||
MONITOR.gih_bs.l1 0xf2dd f
|
||||
MONITOR.gih_bs.l2 0xf2e9 f
|
||||
MONITOR.gih_bs.l3 0xf2ed f
|
||||
MONITOR.gih_ctrl_z 0xf319 f
|
||||
MONITOR.gih_ctrl_z.l1 0xf32e f
|
||||
MONITOR.gih_ctrl_z.l2 0xf332 f
|
||||
MONITOR.gih_ctrl_z.l3 0xf345 f
|
||||
MONITOR.gih_ctrl_z.l4 0xf34a f
|
||||
MONITOR.gih_ctrl_z.l5 0xf35a f
|
||||
MONITOR.gih_up 0xf368 f
|
||||
MONITOR.gih_up.l1 0xf378 f
|
||||
MONITOR.gih_up.l2 0xf390 f
|
||||
MONITOR.gih_up.l3 0xf394 f
|
||||
MONITOR.gih_up.l4 0xf3a7 f
|
||||
MONITOR.gih_up.l5 0xf3ac f
|
||||
MONITOR.gih_up.l6 0xf3bc f
|
||||
MONITOR.pict_sub2 0xf3ca f
|
||||
MONITOR.pict_sub2.l1 0xf3f2 f
|
||||
MONITOR.pict_sub2.l2 0xf3f7 f
|
||||
MONITOR.pict_sub2.l3 0xf3fb f
|
||||
MONITOR.pict_sub2.l4 0xf426 f
|
||||
MONITOR.mov_hl_bc 0xf43b f
|
||||
MONITOR.mov_hl_bc.next 0xf442 f
|
||||
MONITOR.esc_draw_circle 0xf44c f
|
||||
MONITOR.esc_draw_circle.l1 0xf469 f
|
||||
MONITOR.esc_draw_circle.l2 0xf480 f
|
||||
MONITOR.esc_draw_circle.l3 0xf4a2 f
|
||||
MONITOR.dc_draw_8px 0xf4ab f
|
||||
MONITOR.dc_aspect_ratio_1 0xf4c7 f
|
||||
MONITOR.dc_aspect_ratio_1.dc_ax_ne0 0xf4d7 f
|
||||
MONITOR.dc_aspect_ratio_1.dc_ay_ne0 0xf4e0 f
|
||||
MONITOR.dc_aspect_ratio2 0xf4e7 f
|
||||
MONITOR.dc_aspect_ratio2.dc_ax_ne0 0xf4f7 f
|
||||
MONITOR.dc_aspect_ratio2.dc_ay_ne0 0xf500 f
|
||||
MONITOR.dc_mul_e_h 0xf507 f
|
||||
MONITOR.dc_mul_e_h.l1 0xf50f f
|
||||
MONITOR.dc_mul_e_h.l2 0xf514 f
|
||||
MONITOR.dc_mul_e_h.l3 0xf519 f
|
||||
MONITOR.dc_mul_e_h.l4 0xf51e f
|
||||
MONITOR.dc_mul_e_h.l5 0xf523 f
|
||||
MONITOR.dc_mul_e_h.l6 0xf528 f
|
||||
MONITOR.dc_mul_e_h.l7 0xf52d f
|
||||
MONITOR.dc_mul_e_h.l8 0xf532 f
|
||||
MONITOR.dc_draw_4px_bc 0xf534 f
|
||||
MONITOR.dc_draw_4px_bc.l1 0xf540 f
|
||||
MONITOR.dc_draw_4px_bc.l2 0xf54c f
|
||||
MONITOR.dc_draw_4px_bc.l3 0xf558 f
|
||||
MONITOR.dc_draw_4px_cb 0xf563 f
|
||||
MONITOR.dc_draw_4px_cb.l1 0xf56f f
|
||||
MONITOR.dc_draw_4px_cb.l2 0xf57b f
|
||||
MONITOR.l3 0xf587 f
|
||||
MONITOR.dc_put_pixel 0xf592 f
|
||||
MONITOR.dc_put_pixel.roll 0xf59a f
|
||||
MONITOR.m_font_cp0 0xf5bc f
|
||||
MONITOR.m_font_cp1 0xf85c f
|
||||
MONITOR.conv_nibble 0xfa1c f
|
||||
MONITOR.m_hexb 0xfa26 f
|
||||
MONITOR.out_hex 0xfa2f f
|
||||
MONITOR.m_tape_write_ram2 0xfa36 f
|
||||
MONITOR.m_tape_write_ram2.cl_stack 0xfa3b f
|
||||
MONITOR.m_tape_write_ram2.nxt_blk 0xfa5d f
|
||||
MONITOR.twr2_delay 0xfa73 f
|
||||
MONITOR.twr2_delay.delay 0xfa76 f
|
||||
MONITOR.m_tape_read_ram2 0xfa7d f
|
||||
MONITOR.m_tape_read_ram2.srch_first 0xfa88 f
|
||||
MONITOR.m_tape_read_ram2.rd_next 0xfaa6 f
|
||||
MONITOR.m_tape_read_ram2.not_found 0xfac5 f
|
||||
MONITOR.m_tape_read_ram2.rd_error 0xfacc f
|
||||
MONITOR.m_tape_read_ram2.inv_id 0xfae1 f
|
||||
MONITOR.m_tape_read_ram2.err_ubi 0xfaed f
|
||||
MONITOR.m_tape_read_ram2.err_ibu 0xfaf5 f
|
||||
MONITOR.m_tape_read_ram2.end 0xfaf6 f
|
||||
MONITOR.out_hexw 0xfafd f
|
||||
MONITOR.msg_no_start_rec 0xfb08 f
|
||||
MONITOR.msg_checksum 0xfb18 f
|
||||
MONITOR.msg_sequence 0xfb22 f
|
||||
MONITOR.msg_ibg 0xfb2c f
|
||||
MONITOR.msg_break 0xfb30 f
|
||||
MONITOR.me_out_strz 0xfb36 f
|
||||
MONITOR.m_ramdisk_read 0xfb43 f
|
||||
MONITOR.m_ramdisk_read.read 0xfb55 f
|
||||
MONITOR.m_ramdisk_write 0xfb6d f
|
||||
MONITOR.m_ramdisk_write.wr_byte 0xfb7f f
|
||||
MONITOR.m_tape_write 0xfb97 f
|
||||
MONITOR.m_tape_write.l1 0xfbae f
|
||||
MONITOR.m_tape_write.set_lvl 0xfbc0 f
|
||||
MONITOR.m_tape_write.l2 0xfbd0 f
|
||||
MONITOR.m_tape_write.next_byte 0xfbee f
|
||||
MONITOR.m_tape_write.wait_end 0xfc00 f
|
||||
MONITOR.m_tape_wr_byte 0xfc0e f
|
||||
MONITOR.m_tape_wr_byte.get_bit 0xfc15 f
|
||||
MONITOR.m_tape_wr_byte.wait_t 0xfc1b f
|
||||
MONITOR.m_tape_wr_byte.out_bit 0xfc39 f
|
||||
MONITOR.m_tape_wr_byte.bit_hi 0xfc41 f
|
||||
MONITOR.m_tape_wr_byte.out_bit_hi 0xfc5f f
|
||||
MONITOR.m_tape_read 0xfc67 f
|
||||
MONITOR.m_tape_read.wait_3_changes 0xfc79 f
|
||||
MONITOR.m_tape_read.wait_4th_change 0xfc8a f
|
||||
MONITOR.m_tape_read.wait_f5_marker 0xfc99 f
|
||||
MONITOR.m_tape_read.read_next_b 0xfcbd f
|
||||
MONITOR.m_tape_read.checksum_ok 0xfcd6 f
|
||||
MONITOR.m_tape_read.return 0xfcd7 f
|
||||
MONITOR.m_tape_read.err_read_blk 0xfcda f
|
||||
MONITOR.m_tape_read.err_read_id 0xfcde f
|
||||
MONITOR.m_tape_read.key_pressed 0xfce3 f
|
||||
MONITOR.m_tape_read_byte 0xfcee f
|
||||
MONITOR.m_tape_read_byte.next_bit 0xfcf1 f
|
||||
MONITOR.m_tape_read_byte.ret_err 0xfd06 f
|
||||
MONITOR.m_read_tape_bit 0xfd08 f
|
||||
MONITOR.m_read_tape_bit.wait_change 0xfd0d f
|
||||
MONITOR.read_tape_bit_kbd 0xfd2b f
|
||||
MONITOR.read_tape_bit_kbd.wait_change 0xfd30 f
|
||||
MONITOR.read_tape_bit_kbd.key_pressed 0xfd55 f
|
||||
MONITOR.m_tape_wait 0xfd58 f
|
||||
MONITOR.m_tape_wait.wait_t4 0xfd5c f
|
||||
MONITOR.m_tape_wait.wait_next_2ms 0xfd62 f
|
||||
MONITOR.m_tape_wait.wait_tmr_key 0xfd6d f
|
||||
MONITOR.m_tape_wait.wait_no_rst4 0xfd86 f
|
||||
MONITOR.m_tape_wait.key_pressed 0xfd8d f
|
||||
MONITOR.m_tape_blk_detect 0xfd95 f
|
||||
MONITOR.floppy_reset 0xfd9e f
|
||||
MONITOR.floppy_reset.wait_no_busy 0xfda8 f
|
||||
MONITOR.floppy_reset.tr0_ok 0xfdba f
|
||||
MONITOR.floppy_reset.b1 0xfdc9 f
|
||||
MONITOR.m_select_drive 0xfdd1 f
|
||||
MONITOR.m_select_drive.sel_A 0xfddf f
|
||||
MONITOR.m_select_drive.sel_B 0xfde1 f
|
||||
MONITOR.m_select_drive.dpar_a 0xfdf6 f
|
||||
MONITOR.m_select_drive.dpar_b 0xfdf9 f
|
||||
MONITOR.m_select_drive.l_le 0xfe15 f
|
||||
MONITOR.delay_136uS 0xfe24 f
|
||||
MONITOR.delay_b 0xfe26 f
|
||||
MONITOR.delay_1.4mS 0xfe2b f
|
||||
MONITOR.m_read_floppy 0xfe30 f
|
||||
MONITOR.m_write_floppy 0xfe43 f
|
||||
MONITOR.m_start_seek_track 0xfe56 f
|
||||
MONITOR.m_start_floppy 0xfe5f f
|
||||
MONITOR.m_start_floppy.need_m_start 0xfe6b f
|
||||
MONITOR.m_start_floppy.wait_motor 0xfe76 f
|
||||
MONITOR.m_start_floppy.wait_rdy1 0xfe7d f
|
||||
MONITOR.m_start_floppy.long_delay 0xfe8f f
|
||||
MONITOR.m_start_floppy.mst_exi 0xfe95 f
|
||||
MONITOR.fdc_init 0xfe97 f
|
||||
MONITOR.m_fdc_seek_trk 0xfea3 f
|
||||
MONITOR.m_fdc_seek_trk.drv_b 0xfebc f
|
||||
MONITOR.m_fdc_seek_trk.cmn 0xfecd f
|
||||
MONITOR.m_fdc_seek_trk.l1 0xfef5 f
|
||||
MONITOR.m_fdc_seek_trk.l2 0xff06 f
|
||||
MONITOR.m_fdc_seek_trk.l3 0xff1d f
|
||||
MONITOR.m_fdc_seek_trk.l4 0xff20 f
|
||||
MONITOR.m_fdc_write_bytes 0xff26 f
|
||||
MONITOR.m_fdc_write_bytes.w_next 0xff29 f
|
||||
MONITOR.m_fdc_read_c_bytes 0xff37 f
|
||||
MONITOR.m_fdc_read_c_bytes.l1 0xff3d f
|
||||
MONITOR.m_fdc_read_c_bytes.l2 0xff3f f
|
||||
MONITOR.fdc_check_status 0xff4b f
|
||||
MONITOR.fdc_ret 0xff55 f
|
||||
MONITOR.filler1 0xff56 f
|
||||
MONITOR.LAST 0xff57 l
|
||||
MONITOR.CODE_SIZE 0x1f57 l
|
||||
MONITOR.FILL_SIZE 0xa9 l
|
||||
MONITOR.FILLER 0xff57 f
|
||||
M_VARS.buffer 0xbf00 f
|
||||
M_VARS.paint_stack 0xbfa4 l
|
||||
M_VARS.stack1 0xbfc4 l
|
||||
M_VARS.paint_var1 0xbfc5 f
|
||||
M_VARS.paint_var2 0xbfc6 f
|
||||
M_VARS.paint_var3 0xbfc7 f
|
||||
M_VARS.paint_var4 0xbfc8 f
|
||||
M_VARS.paint_var5 0xbfc9 f
|
||||
M_VARS.paint_y 0xbfca f
|
||||
M_VARS.paint_var7 0xbfcb f
|
||||
M_VARS.cmp_color 0xbfcc f
|
||||
M_VARS.paint_sp_save 0xbfcd f
|
||||
M_VARS.pixel_mask_r 0xbfcf f
|
||||
M_VARS.tmp_color 0xbfd0 f
|
||||
M_VARS.rect_var2 0xbfd1 f
|
||||
M_VARS.stack_0 0xbfd2 l
|
||||
M_VARS.rect_var3 0xbfd2 f
|
||||
M_VARS.esc_mode 0xbfd3 f
|
||||
M_VARS.esc_cmd 0xbfd4 f
|
||||
M_VARS.esc_param_cnt 0xbfd5 f
|
||||
M_VARS.esc_param 0xbfd6 f
|
||||
M_VARS.pixel_mask_l_i 0xbfdd f
|
||||
M_VARS.pixel_mask_r_i 0xbfde f
|
||||
M_VARS.pixel_mask_l 0xbfdf f
|
||||
M_VARS.screen_mode 0xbfe0 f
|
||||
M_VARS.cursor_row 0xbfe1 f
|
||||
M_VARS.cursor_col 0xbfe2 f
|
||||
M_VARS.curr_color 0xbfe3 f
|
||||
M_VARS.esc_hex_cmd 0xbfe5 f
|
||||
M_VARS.row_shift 0xbfe5 f
|
||||
M_VARS.codepage 0xbfe6 f
|
||||
M_VARS.cur_palette 0xbfe7 f
|
||||
M_VARS.beep_period 0xbfe8 f
|
||||
M_VARS.beep_duration 0xbfea f
|
||||
M_VARS.pix_shift 0xbfec f
|
||||
M_VARS.strobe_state 0xbfed f
|
||||
M_VARS.prn_start_x 0xbfee f
|
||||
M_VARS.drv_B_inited 0xbfef f
|
||||
M_VARS.drv_C_inited 0xbff0 f
|
||||
M_VARS.drv_current 0xbff1 f
|
||||
M_VARS.drv_B_track 0xbff2 f
|
||||
M_VARS.drv_C_track 0xbff3 f
|
||||
M_VARS.drv_dir_inout 0xbff4 f
|
||||
M_VARS.esc_var0 0xbff5 f
|
||||
M_VARS.esc_var1 0xbff6 f
|
||||
M_VARS.esc_var2 0xbff7 f
|
||||
M_VARS.esc_var3 0xbff8 f
|
||||
@@ -0,0 +1,47 @@
|
||||
buffer 0xbf00 l
|
||||
paint_stack 0xbfa4 l
|
||||
stack1 0xbfc4 l
|
||||
paint_var1 0xbfc5 l
|
||||
paint_var2 0xbfc6 l
|
||||
paint_var3 0xbfc7 l
|
||||
paint_var4 0xbfc8 l
|
||||
paint_var5 0xbfc9 l
|
||||
paint_y 0xbfca l
|
||||
paint_var7 0xbfcb l
|
||||
cmp_color 0xbfcc l
|
||||
paint_sp_save 0xbfcd l
|
||||
pixel_mask_r 0xbfcf l
|
||||
tmp_color 0xbfd0 l
|
||||
rect_var2 0xbfd1 l
|
||||
stack_0 0xbfd2 l
|
||||
rect_var3 0xbfd2 l
|
||||
esc_mode 0xbfd3 l
|
||||
esc_cmd 0xbfd4 l
|
||||
esc_param_cnt 0xbfd5 l
|
||||
esc_param 0xbfd6 l
|
||||
pixel_mask_l_i 0xbfdd l
|
||||
pixel_mask_r_i 0xbfde l
|
||||
pixel_mask_l 0xbfdf l
|
||||
screen_mode 0xbfe0 l
|
||||
cursor_row 0xbfe1 l
|
||||
cursor_col 0xbfe2 l
|
||||
curr_color 0xbfe3 l
|
||||
esc_hex_cmd 0xbfe5 l
|
||||
row_shift 0xbfe5 l
|
||||
codepage 0xbfe6 l
|
||||
cur_palette 0xbfe7 l
|
||||
beep_period 0xbfe8 l
|
||||
beep_duration 0xbfea l
|
||||
pix_shift 0xbfec l
|
||||
strobe_state 0xbfed l
|
||||
prn_start_x 0xbfee l
|
||||
drv_B_inited 0xbfef l
|
||||
drv_C_inited 0xbff0 l
|
||||
drv_current 0xbff1 l
|
||||
drv_B_track 0xbff2 l
|
||||
drv_C_track 0xbff3 l
|
||||
drv_dir_inout 0xbff4 l
|
||||
esc_var0 0xbff5 l
|
||||
esc_var1 0xbff6 l
|
||||
esc_var2 0xbff7 l
|
||||
esc_var3 0xbff8 l
|
||||
+18
-17
@@ -18,13 +18,13 @@ paint_stack EQU $ ; 0xbfa4
|
||||
DS 32
|
||||
stack1: EQU $ ; 0xbfc4
|
||||
DS 1
|
||||
paint_var1 DS 1 ; 0xbfc5
|
||||
paint_var2 DS 1 ; 0xbfc6
|
||||
paint_var3 DS 1 ; 0xbfc7
|
||||
paint_var4 DS 1 ; 0xbfc8
|
||||
paint_var5 DS 1 ; 0xbfc9
|
||||
paint_y DS 1 ; 0xbfca
|
||||
paint_var7 DS 1 ; 0xbfcb
|
||||
paint_var1 DS 1 ; 0xbfc5
|
||||
paint_var2 DS 1 ; 0xbfc6
|
||||
paint_var3 DS 1 ; 0xbfc7
|
||||
paint_var4 DS 1 ; 0xbfc8
|
||||
paint_var5 DS 1 ; 0xbfc9
|
||||
paint_y DS 1 ; 0xbfca
|
||||
paint_var7 DS 1 ; 0xbfcb
|
||||
cmp_color DS 1 ; 0xbfcc
|
||||
paint_sp_save DS 2
|
||||
|
||||
@@ -43,12 +43,13 @@ esc_param DS 7 ; 0xbfd6
|
||||
; Left inverse pixel mask ex: 00011111
|
||||
pixel_mask_l_i DS 1
|
||||
; Right inverse pixel mask ex: 00011111
|
||||
pixel_mask_r_i DS 1
|
||||
pixel_mask_r_i DS 1
|
||||
; Left pixel mask ex: 11100000
|
||||
pixel_mask_l DS 1
|
||||
pixel_mask_l DS 1
|
||||
|
||||
; Current screen mode, bit 3 - hide/show cursor, bit 4 - only 20 rows
|
||||
screen_mode DS 1 ; 0xbfe0
|
||||
cursor_pos:
|
||||
cursor_row DS 1 ; 0xbfe1 Cursor Y position
|
||||
cursor_col DS 1 ; 0xbfe2 Cursor X position
|
||||
curr_color DS 2 ; 0xbfe3 Current color low and hi bytes
|
||||
@@ -62,13 +63,13 @@ beep_period DS 2 ; 0xbfe8
|
||||
beep_duration DS 2 ; 0xbfea
|
||||
pix_shift DS 1 ; 0xbfec
|
||||
strobe_state DS 1 ; 0xbfed
|
||||
ul_var0 DS 1 ; 0xbfee
|
||||
ul_A_var1 DS 1 ; 0xbfef
|
||||
ul_B_var2 DS 1 ; 0xbff0
|
||||
ul_var3 DS 1 ; 0xbff1
|
||||
ul_A_var4 DS 1 ; 0xbff2
|
||||
ul_B_var5 DS 1 ; 0xbff3
|
||||
ul_var6 DS 1 ; 0xbff4
|
||||
prn_start_x DS 1 ; 0xbfee
|
||||
drv_B_inited DS 1 ; 0xbfef
|
||||
drv_C_inited DS 1 ; 0xbff0
|
||||
drv_current DS 1 ; 0xbff1
|
||||
drv_B_track DS 1 ; 0xbff2
|
||||
drv_C_track DS 1 ; 0xbff3
|
||||
drv_dir_inout DS 1 ; 0xbff4
|
||||
esc_var0 DS 1 ; 0xbff5
|
||||
esc_var1 DS 1 ; 0xbff6
|
||||
esc_var2 DS 1 ; 0xbff7
|
||||
@@ -89,7 +90,7 @@ esc_var3 DS 1 ; 0xbff8
|
||||
ASSERT esc_mode = 0xbfd3
|
||||
ASSERT screen_mode = 0xbfe0
|
||||
ASSERT cur_palette = 0xbfe7
|
||||
ASSERT ul_var0 = 0xbfee
|
||||
ASSERT prn_start_x = 0xbfee
|
||||
ASSERT paint_stack = 0xbfa4
|
||||
ASSERT esc_var3 = 0xbff8
|
||||
|
||||
|
||||
@@ -405,10 +405,10 @@ MONITOR.m_tape_wait.wait_tmr_key 0xfd6d f
|
||||
MONITOR.m_tape_wait.wait_no_rst4 0xfd86 f
|
||||
MONITOR.m_tape_wait.key_pressed 0xfd8d f
|
||||
MONITOR.m_tape_blk_detect 0xfd95 f
|
||||
MONITOR.fdc_unload_head 0xfd9e f
|
||||
MONITOR.fdc_unload_head.wait_no_busy 0xfda8 f
|
||||
MONITOR.fdc_unload_head.tr0_ok 0xfdba f
|
||||
MONITOR.fdc_unload_head.b1 0xfdc9 f
|
||||
MONITOR.floppy_reset 0xfd9e f
|
||||
MONITOR.floppy_reset.wait_no_busy 0xfda8 f
|
||||
MONITOR.floppy_reset.tr0_ok 0xfdba f
|
||||
MONITOR.floppy_reset.b1 0xfdc9 f
|
||||
MONITOR.m_select_drive 0xfdd1 f
|
||||
MONITOR.m_select_drive.sel_A 0xfddf f
|
||||
MONITOR.m_select_drive.sel_B 0xfde1 f
|
||||
|
||||
+211
-136
@@ -13,7 +13,9 @@
|
||||
INCLUDE "ram.inc"
|
||||
INCLUDE "bios_entries.inc"
|
||||
|
||||
OUTPUT mon_E000.bin
|
||||
DEFINE CHECK_INTEGRITY
|
||||
|
||||
OUTPUT mon_E000.bin
|
||||
|
||||
|
||||
MODULE MONITOR
|
||||
@@ -224,9 +226,8 @@ m_con_in:
|
||||
NOP ; do not reset hi bit
|
||||
NOP
|
||||
PUSH AF
|
||||
; TODO: Check if it is keyboard ACK
|
||||
; PC7 Set Hi (ACK?)
|
||||
LD A, 0x80
|
||||
; PC7 Set Hi - ACK
|
||||
LD A, KBD_ACK
|
||||
OUT (KBD_DD78PC), A
|
||||
; PC7 Set Lo
|
||||
XOR A
|
||||
@@ -467,7 +468,7 @@ m_print_hor_line:
|
||||
; Set printer X coordinate = 0
|
||||
CALL m_print_cmd
|
||||
LD HL, 4
|
||||
LD (M_VARS.ul_var0), HL ; Set start coord X = 4
|
||||
LD (M_VARS.prn_start_x), HL ; Set start coord X = 4
|
||||
LD B, 0x0 ; TODO: LD B, H (save 1b 3t)
|
||||
|
||||
.print_next_col:
|
||||
@@ -476,20 +477,20 @@ m_print_hor_line:
|
||||
CALL m_get_7vpix
|
||||
AND D
|
||||
CALL NZ, m_print_vert_7pix
|
||||
LD HL, (M_VARS.ul_var0)
|
||||
LD HL, (M_VARS.prn_start_x)
|
||||
INC HL
|
||||
|
||||
; inc X
|
||||
LD (M_VARS.ul_var0), HL
|
||||
LD (M_VARS.prn_start_x), HL
|
||||
LD C, 0x1
|
||||
; 2
|
||||
CALL m_get_7vpix
|
||||
AND D
|
||||
CALL NZ, m_print_vert_7pix
|
||||
LD HL, (M_VARS.ul_var0)
|
||||
LD HL, (M_VARS.prn_start_x)
|
||||
INC HL
|
||||
; inc X
|
||||
LD (M_VARS.ul_var0), HL
|
||||
LD (M_VARS.prn_start_x), HL
|
||||
INC B
|
||||
LD A, B
|
||||
CP 236
|
||||
@@ -525,7 +526,7 @@ m_print_vert_7pix:
|
||||
; Set coordinate X to 0
|
||||
LD HL, cmd_esc_set_X
|
||||
CALL m_print_cmd
|
||||
LD HL, (M_VARS.ul_var0)
|
||||
LD HL, (M_VARS.prn_start_x)
|
||||
LD C,H
|
||||
CALL m_char_print
|
||||
LD C,L
|
||||
@@ -5188,98 +5189,123 @@ m_tape_blk_detect:
|
||||
; FDC DRIVER
|
||||
; ======================================================
|
||||
|
||||
|
||||
fdc_unload_head:
|
||||
LD A, 0x0
|
||||
; ------------------------------------------------------
|
||||
; Set drive head to Track-0 and wait to complete
|
||||
; Inp: B = drive 0-B, 1-C
|
||||
; Out: CF set if error
|
||||
; A = 0x20 if timeout
|
||||
; ------------------------------------------------------
|
||||
floppy_init:
|
||||
; reset data register
|
||||
LD A, 0
|
||||
OUT (FDC_DATA), A
|
||||
LD A, FDC_RESTORE_UH_NV
|
||||
; send seek track 0 command
|
||||
LD A, FDC_RESTORE
|
||||
OUT (FDC_CMD), A
|
||||
; wait
|
||||
NOP
|
||||
NOP
|
||||
|
||||
.wait_no_busy:
|
||||
IN A, (FDC_CMD)
|
||||
AND 00000101b ; Track0 , Busy
|
||||
AND 00000101b ; TR0, Busy
|
||||
CP 00000100b
|
||||
JP Z, .tr0_ok
|
||||
|
||||
;
|
||||
IN A, (FLOPPY)
|
||||
RLCA ; MOTST -> CF
|
||||
JP NC, .wait_no_busy
|
||||
; timeout
|
||||
LD A, 0x20
|
||||
RET
|
||||
|
||||
; ok, head at track 0
|
||||
; set flags
|
||||
.tr0_ok:
|
||||
LD A, B
|
||||
DEC A
|
||||
LD A, 0x1
|
||||
LD A, 1
|
||||
JP Z, .b1
|
||||
LD (M_VARS.ul_A_var1), A
|
||||
LD (M_VARS.drv_B_inited), A
|
||||
XOR A
|
||||
LD (M_VARS.ul_A_var4), A
|
||||
LD (M_VARS.drv_B_track), A
|
||||
RET
|
||||
|
||||
.b1:
|
||||
LD (M_VARS.ul_B_var2), A
|
||||
LD (M_VARS.drv_C_inited), A
|
||||
XOR A
|
||||
LD (M_VARS.ul_B_var5), A
|
||||
LD (M_VARS.drv_C_track), A
|
||||
RET
|
||||
|
||||
; ---------------------------------------------------
|
||||
;
|
||||
; Inp: A - Drive
|
||||
; C - FD1793 CMD
|
||||
; D - Track
|
||||
; ---------------------------------------------------
|
||||
m_select_drive:
|
||||
PUSH AF
|
||||
CALL delay_1.4mS
|
||||
CP 0x1 ; TODO: DEC A to save 1b 3t
|
||||
JP Z, .sel_A
|
||||
JP Z, .sel_b
|
||||
LD A, 0x2
|
||||
JP .sel_B
|
||||
.sel_A
|
||||
JP .sel_c
|
||||
.sel_b:
|
||||
LD A, 0x5
|
||||
.sel_B
|
||||
.sel_c:
|
||||
LD B, A ; 010b or 101b
|
||||
IN A, (FLOPPY) ; read Floppy controller reg
|
||||
AND 0x40 ; SSEL
|
||||
RRA ; SSEL for out
|
||||
OR B ; 0x22 or 0x25 if WP
|
||||
OUT (FLOPPY), A ; Select drive A or B
|
||||
OUT (FLOPPY), A ; Select drive B or C
|
||||
LD B, A
|
||||
POP AF
|
||||
; ckeck drive A = B-0, C-1
|
||||
DEC A
|
||||
JP Z, .dpar_a
|
||||
LD A, (bios_var2)
|
||||
JP .dpar_b
|
||||
.dpar_a
|
||||
LD A, (BIOS.bios_var04)
|
||||
.dpar_b
|
||||
JP Z, .side_b
|
||||
LD A, (disk_C_tracks)
|
||||
JP .side_c
|
||||
.side_b:
|
||||
LD A, (BIOS.drive_B_tracks)
|
||||
.side_c:
|
||||
PUSH BC
|
||||
LD B, A ; B = dpar_A or B
|
||||
LD A, D ; compare with D?
|
||||
LD B, A ; B - track_no
|
||||
LD A, D ; D - track
|
||||
CP B
|
||||
JP C, .l_le ; D < B
|
||||
JP C, .side_0 ; track < track_count -> side_0
|
||||
SUB B
|
||||
LD D, A
|
||||
POP BC
|
||||
; Set hi bit of sector to 1
|
||||
LD A, C
|
||||
OR 0x8
|
||||
LD C, A
|
||||
; A = ssel+drsel+mot_x
|
||||
LD A, B
|
||||
AND 0x20
|
||||
; get SSEL (Side Selected)
|
||||
AND FLOPPY_SSEL
|
||||
OR A
|
||||
; return if already side 1
|
||||
RET NZ
|
||||
; else select side 1
|
||||
LD A, B
|
||||
OR 0x20 ; set SSEL to 1
|
||||
OR FLOPPY_SSEL ; set SSEL to 1
|
||||
OUT (FLOPPY), A
|
||||
CALL delay_136uS
|
||||
RET
|
||||
.l_le
|
||||
.side_0:
|
||||
POP BC
|
||||
; A = ssel+drsel+mot_x
|
||||
LD A, B
|
||||
AND 0x20
|
||||
; get SSEL
|
||||
AND FLOPPY_SSEL
|
||||
OR A
|
||||
; return if already side 0 (SSEL=0)
|
||||
RET Z
|
||||
; else select side 0 (set SSEL=0)
|
||||
LD A, B
|
||||
AND 0x7
|
||||
; mask only drsel+mot_x
|
||||
AND 0x07
|
||||
OUT (FLOPPY), A
|
||||
CALL delay_136uS
|
||||
RET
|
||||
@@ -5320,7 +5346,9 @@ m_read_floppy:
|
||||
RET
|
||||
|
||||
; ---------------------------------------------------
|
||||
;
|
||||
; Write data to floppy drive
|
||||
; Inp: A - Drive No
|
||||
; HL -> buffer
|
||||
; ---------------------------------------------------
|
||||
m_write_floppy:
|
||||
PUSH AF
|
||||
@@ -5334,25 +5362,31 @@ m_write_floppy:
|
||||
RET
|
||||
|
||||
; ---------------------------------------------------
|
||||
;
|
||||
; Start floppy and seek track
|
||||
; Inp: A - drive
|
||||
; D - track
|
||||
; E - sector
|
||||
; ---------------------------------------------------
|
||||
m_start_seek_track:
|
||||
CALL m_start_floppy
|
||||
RET C
|
||||
CALL m_fdc_seek_trk
|
||||
RET C
|
||||
RET ; TODO: remove
|
||||
RET C ; TODO: remove
|
||||
RET
|
||||
|
||||
; ---------------------------------------------------
|
||||
;
|
||||
; Start floppy motor
|
||||
; Inp: A - drive
|
||||
; Out: A = 0 if ok, A = 0x20 if timeout to start motor
|
||||
; ---------------------------------------------------
|
||||
m_start_floppy:
|
||||
LD B, A
|
||||
LD A, (M_VARS.ul_var3)
|
||||
LD A, (M_VARS.drv_current)
|
||||
CP B
|
||||
JP Z, .need_m_start
|
||||
CALL .wait_motor ; TODO: replace call+ret to jp
|
||||
RET
|
||||
|
||||
.need_m_start:
|
||||
IN A, (FLOPPY)
|
||||
RLCA ; check MOTST
|
||||
@@ -5361,112 +5395,136 @@ m_start_floppy:
|
||||
AND FDC_NOT_READY ; not ready flag
|
||||
RET Z
|
||||
|
||||
; ---------------------------------------------------
|
||||
;
|
||||
; ---------------------------------------------------
|
||||
.wait_motor:
|
||||
PUSH BC
|
||||
LD BC, 65535
|
||||
CALL fdc_init
|
||||
|
||||
.wait_rdy1:
|
||||
IN A, (FDC_CMD)
|
||||
AND FDC_NOT_READY
|
||||
JP Z, .long_delay
|
||||
; stop wait if FDC ready
|
||||
JP Z, .stop_wait
|
||||
|
||||
; wait motor start
|
||||
IN A, (FLOPPY)
|
||||
RLCA ; CF<-A[7] MOTST flag
|
||||
JP NC, .wait_rdy1
|
||||
|
||||
LD A, 0x20
|
||||
JP .mst_exi
|
||||
JP .exit
|
||||
|
||||
.stop_wait:
|
||||
|
||||
.long_delay:
|
||||
DEC BC
|
||||
LD A, B
|
||||
OR A
|
||||
JP NZ, .long_delay
|
||||
.mst_exi:
|
||||
; exit with A=0 if no error
|
||||
.exit:
|
||||
POP BC
|
||||
RET
|
||||
|
||||
; ---------------------------------------------------
|
||||
;
|
||||
; Init floppy controller
|
||||
; ---------------------------------------------------
|
||||
fdc_init:
|
||||
; get controller register state
|
||||
IN A, (FLOPPY)
|
||||
AND 01001110b ; Get SSEL, DRSEL, MOT1, MOT0
|
||||
RRA
|
||||
OUT (FLOPPY), A
|
||||
OR 0x08 ; Set INIT bit
|
||||
; Set INIT bit
|
||||
OR 0x08
|
||||
; Sent to controller
|
||||
OUT (FLOPPY), A
|
||||
RET
|
||||
|
||||
; ---------------------------------------------------
|
||||
; Seek track on floppy
|
||||
; Inp: DE - track/sector
|
||||
; Inp: B - floppy drive 0-B, 1-C
|
||||
; DE - track/sector
|
||||
; ---------------------------------------------------
|
||||
m_fdc_seek_trk:
|
||||
LD A, B
|
||||
DEC A
|
||||
JP Z, .drv_b
|
||||
LD A, (M_VARS.ul_A_var1)
|
||||
JP Z, .drv_c
|
||||
; check init flag and init drive if needed
|
||||
LD A, (M_VARS.drv_B_inited)
|
||||
OR A
|
||||
CALL Z, fdc_unload_head
|
||||
CALL Z, floppy_init
|
||||
; return if init error
|
||||
RET C
|
||||
LD A, (M_VARS.ul_A_var4)
|
||||
; out previous track to FDC
|
||||
LD A, (M_VARS.drv_B_track)
|
||||
OUT (FDC_TRACK), A
|
||||
; store new track no
|
||||
LD A, D
|
||||
LD (M_VARS.ul_A_var4), A
|
||||
LD (M_VARS.drv_B_track), A
|
||||
JP .cmn
|
||||
.drv_b:
|
||||
LD A, (M_VARS.ul_B_var2)
|
||||
.drv_c:
|
||||
LD A, (M_VARS.drv_C_inited)
|
||||
OR A
|
||||
CALL Z, fdc_unload_head
|
||||
CALL Z, floppy_init
|
||||
RET C
|
||||
LD A, (M_VARS.ul_B_var5)
|
||||
LD A, (M_VARS.drv_C_track)
|
||||
OUT (FDC_TRACK), A
|
||||
LD A, D
|
||||
LD (M_VARS.ul_B_var5), A
|
||||
|
||||
.cmn:
|
||||
LD A, (M_VARS.ul_var3)
|
||||
LD A, (M_VARS.drv_current)
|
||||
CP B
|
||||
LD A, B
|
||||
LD (M_VARS.ul_var3), A
|
||||
JP NZ, .l2
|
||||
; set new current drive
|
||||
LD (M_VARS.drv_current), A
|
||||
; seek track if drive changed
|
||||
JP NZ, .set_track
|
||||
; compare new and current track no
|
||||
IN A, (FDC_TRACK)
|
||||
CP D
|
||||
JP Z, .l2
|
||||
JP Z, .set_track
|
||||
|
||||
JP C, .l1
|
||||
LD A, (M_VARS.ul_var6)
|
||||
; new track < prev
|
||||
LD A, (M_VARS.drv_dir_inout)
|
||||
OR A
|
||||
JP NZ, .l2
|
||||
JP NZ, .set_track
|
||||
LD B, 0xff
|
||||
CALL delay_b
|
||||
LD A, 0x1
|
||||
LD (M_VARS.ul_var6), A
|
||||
JP .l2
|
||||
LD (M_VARS.drv_dir_inout), A
|
||||
JP .set_track
|
||||
.l1:
|
||||
LD A, (M_VARS.ul_var6)
|
||||
; new track > prev
|
||||
LD A, (M_VARS.drv_dir_inout)
|
||||
OR A
|
||||
JP Z, .l2
|
||||
JP Z, .set_track
|
||||
LD B, 0xff
|
||||
CALL delay_b
|
||||
LD A, 0x0
|
||||
LD (M_VARS.ul_var6), A
|
||||
.l2:
|
||||
LD (M_VARS.drv_dir_inout), A
|
||||
.set_track:
|
||||
; set track no to FDC
|
||||
LD A, D
|
||||
OUT (FDC_DATA), A
|
||||
; seek track command to FDC (Load head & verify trk)
|
||||
LD A, 0x1f
|
||||
OUT (FDC_CMD), A
|
||||
; wait
|
||||
NOP
|
||||
NOP
|
||||
; check status
|
||||
IN A, (FDC_WAIT)
|
||||
IN A, (FDC_CMD)
|
||||
AND 0x19
|
||||
CP 0x0
|
||||
JP NZ, .l3
|
||||
JP .l4
|
||||
.l3:
|
||||
AND 0b00011001 ; SEEK_ERR, CRC_ERR, BUSY
|
||||
CP 0
|
||||
JP NZ, .seek_errs
|
||||
JP .seek_ok
|
||||
.seek_errs:
|
||||
SCF
|
||||
LD A, 0x40
|
||||
.l4:
|
||||
.seek_ok:
|
||||
PUSH AF
|
||||
LD A, E
|
||||
OUT (FDC_SECT), A
|
||||
@@ -5474,36 +5532,49 @@ m_fdc_seek_trk:
|
||||
RET
|
||||
|
||||
; ---------------------------------------------------
|
||||
;
|
||||
; Write bytes to floppy
|
||||
; Inp: C - write sector command
|
||||
; HL -> byte buffer
|
||||
; ---------------------------------------------------
|
||||
m_fdc_write_bytes:
|
||||
; Send command to FDC
|
||||
LD A, C
|
||||
OUT (FDC_CMD), A
|
||||
.w_next:
|
||||
; DRQ -> CF
|
||||
IN A, (FDC_WAIT)
|
||||
RRCA
|
||||
; Send byte to FDC
|
||||
LD A, (HL)
|
||||
OUT (FDC_DATA), A
|
||||
INC HL
|
||||
; repeat until DRQ active
|
||||
JP C, .w_next
|
||||
|
||||
CALL fdc_check_status ; TODO: replace call+ret to jp
|
||||
RET
|
||||
|
||||
; ---------------------------------------------------
|
||||
;
|
||||
; Read bytes from floppy
|
||||
; Inp: C - read sector command
|
||||
; HL -> byte buffer
|
||||
; ---------------------------------------------------
|
||||
m_fdc_read_c_bytes:
|
||||
; Send command to FDC
|
||||
LD A, C
|
||||
OUT (FDC_CMD), A
|
||||
JP .l2
|
||||
.l1:
|
||||
JP .get_drq
|
||||
.read_next:
|
||||
; put byte to buffer
|
||||
LD (HL), A
|
||||
INC HL
|
||||
.l2:
|
||||
.get_drq:
|
||||
; DRQ -> CF
|
||||
IN A, (FDC_WAIT)
|
||||
RRCA
|
||||
; read byte from FDC
|
||||
IN A, (FDC_DATA)
|
||||
JP C, .l1
|
||||
JP C, .read_next
|
||||
CALL fdc_check_status ; TODO: replace call+ret to jp
|
||||
RET
|
||||
|
||||
@@ -5512,10 +5583,13 @@ m_fdc_read_c_bytes:
|
||||
; Out: CF set if errors
|
||||
; ---------------------------------------------------
|
||||
fdc_check_status:
|
||||
; get FDC Status of last command
|
||||
IN A, (FDC_CMD)
|
||||
; mask Write Protect
|
||||
AND 11011111b
|
||||
CP 0x0
|
||||
CP 0
|
||||
JP Z, fdc_ret
|
||||
; error found, set CF
|
||||
SCF
|
||||
fdc_ret:
|
||||
RET
|
||||
@@ -5533,51 +5607,52 @@ CODE_SIZE EQU LAST-0xE000
|
||||
FILL_SIZE EQU ROM_CHIP_SIZE-CODE_SIZE
|
||||
|
||||
|
||||
ASSERT m_start = 0xe051
|
||||
ASSERT m_out_strz = 0xe0f1
|
||||
ASSERT m_con_out_int = 0xe16d
|
||||
ASSERT get_esc_param = 0xe187
|
||||
ASSERT esc_params_tab = 0xe1cb
|
||||
ASSERT esc_handler_tab = 0xe1db
|
||||
ASSERT esc_set_beep = 0xe1f9
|
||||
ASSERT m_print_hor_line = 0xe23a
|
||||
ASSERT m_get_7vpix = 0xe2b4
|
||||
ASSERT esc_set_palette = 0xe2fe
|
||||
ASSERT m_get_glyph = 0xe320
|
||||
ASSERT m_print_no_esc = 0xe349
|
||||
ASSERT calc_addr_40 = 0xe439
|
||||
ASSERT mp_mode_64 = 0xe4b8
|
||||
ASSERT calc_addr_80 = 0xe612
|
||||
ASSERT m_clear_screen = 0xe639
|
||||
ASSERT m_cursor_home = 0xe66c
|
||||
ASSERT m_draw_cursor = 0xe69a
|
||||
ASSERT m_handle_esc_code = 0xe77c
|
||||
ASSERT handle_cc_common = 0xe7c4
|
||||
ASSERT handle_cc_80x25 = 0xe833
|
||||
ASSERT m_beep = 0xe85a
|
||||
ASSERT esc_set_cursor = 0xe890
|
||||
ASSERT esc_set_vmode = 0xe8e9
|
||||
ASSERT esc_set_color = 0xe92f
|
||||
ASSERT m_print_at_xy = 0xe943
|
||||
ASSERT game_sprite_tab = 0xea39
|
||||
ASSERT esc_draw_fill_rect = 0xeb64
|
||||
ASSERT draw_line_h = 0xeed1
|
||||
ASSERT esc_draw_line = 0xef0b
|
||||
ASSERT esc_draw_dot = 0xf052
|
||||
ASSERT esc_picture = 0xf0a4
|
||||
ASSERT m_fn_39 = 0xf10f
|
||||
ASSERT get_image_hdr = 0xf177
|
||||
ASSERT esc_get_put_image = 0xf1b5
|
||||
ASSERT pict_sub2 = 0xf3ca
|
||||
ASSERT m_font_cp0 = 0xf5bc
|
||||
ASSERT me_out_strz = 0xfb36
|
||||
ASSERT m_ramdisk_write = 0xfb6d
|
||||
ASSERT m_tape_write = 0xfb97
|
||||
ASSERT m_tape_wr_byte = 0xfc0e
|
||||
ASSERT m_tape_read_byte = 0xfcee
|
||||
ASSERT m_read_tape_bit = 0xfd08
|
||||
ASSERT m_tape_wait = 0xfd58
|
||||
|
||||
IFDEF CHECK_INTEGRITY
|
||||
ASSERT m_start = 0xe051
|
||||
ASSERT m_out_strz = 0xe0f1
|
||||
ASSERT m_con_out_int = 0xe16d
|
||||
ASSERT get_esc_param = 0xe187
|
||||
ASSERT esc_params_tab = 0xe1cb
|
||||
ASSERT esc_handler_tab = 0xe1db
|
||||
ASSERT esc_set_beep = 0xe1f9
|
||||
ASSERT m_print_hor_line = 0xe23a
|
||||
ASSERT m_get_7vpix = 0xe2b4
|
||||
ASSERT esc_set_palette = 0xe2fe
|
||||
ASSERT m_get_glyph = 0xe320
|
||||
ASSERT m_print_no_esc = 0xe349
|
||||
ASSERT calc_addr_40 = 0xe439
|
||||
ASSERT mp_mode_64 = 0xe4b8
|
||||
ASSERT calc_addr_80 = 0xe612
|
||||
ASSERT m_clear_screen = 0xe639
|
||||
ASSERT m_cursor_home = 0xe66c
|
||||
ASSERT m_draw_cursor = 0xe69a
|
||||
ASSERT m_handle_esc_code = 0xe77c
|
||||
ASSERT handle_cc_common = 0xe7c4
|
||||
ASSERT handle_cc_80x25 = 0xe833
|
||||
ASSERT m_beep = 0xe85a
|
||||
ASSERT esc_set_cursor = 0xe890
|
||||
ASSERT esc_set_vmode = 0xe8e9
|
||||
ASSERT esc_set_color = 0xe92f
|
||||
ASSERT m_print_at_xy = 0xe943
|
||||
ASSERT game_sprite_tab = 0xea39
|
||||
ASSERT esc_draw_fill_rect = 0xeb64
|
||||
ASSERT draw_line_h = 0xeed1
|
||||
ASSERT esc_draw_line = 0xef0b
|
||||
ASSERT esc_draw_dot = 0xf052
|
||||
ASSERT esc_picture = 0xf0a4
|
||||
ASSERT m_fn_39 = 0xf10f
|
||||
ASSERT get_image_hdr = 0xf177
|
||||
ASSERT esc_get_put_image = 0xf1b5
|
||||
ASSERT pict_sub2 = 0xf3ca
|
||||
ASSERT m_font_cp0 = 0xf5bc
|
||||
ASSERT me_out_strz = 0xfb36
|
||||
ASSERT m_ramdisk_write = 0xfb6d
|
||||
ASSERT m_tape_write = 0xfb97
|
||||
ASSERT m_tape_wr_byte = 0xfc0e
|
||||
ASSERT m_tape_read_byte = 0xfcee
|
||||
ASSERT m_read_tape_bit = 0xfd08
|
||||
ASSERT m_tape_wait = 0xfd58
|
||||
ENDIF
|
||||
|
||||
; DISPLAY "Code size is: ", /A, CODE_SIZE
|
||||
|
||||
|
||||
@@ -28,7 +28,7 @@
|
||||
;reserve1 EQU 0x003b
|
||||
@bios_var0 EQU 0x0040 ; 0xaa - bios init r8
|
||||
@bios_var1 EQU 0x0041 ; 0xaa - bios init r8
|
||||
@bios_var2 EQU 0x0042 ; 0x00 - bios init r8
|
||||
@disk_C_tracks EQU 0x0042 ; 0x00 - bios init r8
|
||||
@bios_var3 EQU 0x0043 ; 0xff - bios init r8
|
||||
@interleave_0 EQU 0x0044
|
||||
;reserve2 EQU 0x0050
|
||||
|
||||
Reference in new issue
Block a user