mirror of
https://github.com/jfdelnero/HxCFloppyEmulator.git
synced 2026-10-26 22:10:31 +00:00
eject and mode 3 buttons.
git-svn-id: svn://svn.code.sf.net/p/hxcfloppyemu/code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk@2135 63fa2f70-6a9b-4bc4-b855-9c6a949b1d69
This commit is contained in:
1 parent
da6b5698a6
commit
329ea40c71
4 files changed
+57
-7
No files matched your search
@@ -703,6 +703,35 @@ void floppy_streamer_stop(Fl_Button*, void* w)
|
||||
}
|
||||
}
|
||||
|
||||
void floppy_streamer_eject(Fl_Button*, void* w)
|
||||
{
|
||||
char tmpstr[64];
|
||||
floppy_streamer_window *fdw;
|
||||
|
||||
fdw=(floppy_streamer_window *)w;
|
||||
|
||||
if(cmd_connection)
|
||||
{
|
||||
sprintf(tmpstr,"ejectdisk %d\n",fdw->drive_choice->value());
|
||||
network_write(cmd_connection, (unsigned char*)tmpstr, strlen(tmpstr),2);
|
||||
}
|
||||
}
|
||||
|
||||
void floppy_streamer_mode3(Fl_Light_Button* b, void* w)
|
||||
{
|
||||
char tmpstr[64];
|
||||
|
||||
if(cmd_connection)
|
||||
{
|
||||
if(b->value())
|
||||
sprintf(tmpstr,"setio DRIVES_PORT_PIN02_OUT\n");
|
||||
else
|
||||
sprintf(tmpstr,"cleario DRIVES_PORT_PIN02_OUT\n");
|
||||
|
||||
network_write(cmd_connection, (unsigned char*)tmpstr, strlen(tmpstr),2);
|
||||
}
|
||||
}
|
||||
|
||||
void floppy_streamer_trackup(Fl_Button*, void* w)
|
||||
{
|
||||
char tmpstr[64];
|
||||
|
||||
@@ -145,7 +145,7 @@ floppy_streamer_window::floppy_streamer_window() {
|
||||
{ Fl_Button* o = new Fl_Button(1265, 431, 59, 40, "Spy bus");
|
||||
o->callback((Fl_Callback*)floppy_streamer_spybus, (void*)(this));
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(1103, 474, 222, 25, "STOP !");
|
||||
{ Fl_Button* o = new Fl_Button(1103, 474, 162, 25, "STOP !");
|
||||
o->callback((Fl_Callback*)floppy_streamer_stop, (void*)(this));
|
||||
} // Fl_Button* o
|
||||
{ Fl_Button* o = new Fl_Button(1077, 432, 23, 20, "+");
|
||||
@@ -194,7 +194,7 @@ floppy_streamer_window::floppy_streamer_window() {
|
||||
{ high_contrast = new Fl_Light_Button(1135, 568, 100, 15, "High contrast");
|
||||
high_contrast->labelsize(10);
|
||||
} // Fl_Light_Button* high_contrast
|
||||
{ fat_dots = new Fl_Light_Button(1240, 567, 84, 15, "Fat dots");
|
||||
{ fat_dots = new Fl_Light_Button(1240, 568, 84, 15, "Fat dots");
|
||||
fat_dots->labelsize(10);
|
||||
} // Fl_Light_Button* fat_dots
|
||||
{ server_address = new Fl_Input(1125, 589, 110, 25, "Pauline IP");
|
||||
@@ -232,7 +232,7 @@ floppy_streamer_window::floppy_streamer_window() {
|
||||
o->labeltype(FL_EMBOSSED_LABEL);
|
||||
o->labelsize(12);
|
||||
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
|
||||
{ drive_choice = new Fl_Choice(1107, 314, 210, 22, "Drive");
|
||||
{ drive_choice = new Fl_Choice(1090, 314, 210, 22, "Drive");
|
||||
drive_choice->down_box(FL_BORDER_BOX);
|
||||
drive_choice->labelsize(12);
|
||||
drive_choice->textsize(12);
|
||||
@@ -240,6 +240,13 @@ floppy_streamer_window::floppy_streamer_window() {
|
||||
} // Fl_Choice* drive_choice
|
||||
o->end();
|
||||
} // Fl_Group* o
|
||||
{ mode3 = new Fl_Light_Button(1260, 517, 65, 15, "mode 3");
|
||||
mode3->labelsize(10);
|
||||
mode3->callback((Fl_Callback*)floppy_streamer_mode3);
|
||||
} // Fl_Light_Button* mode3
|
||||
{ Fl_Button* o = new Fl_Button(1265, 474, 60, 25, "Eject");
|
||||
o->callback((Fl_Callback*)floppy_streamer_eject, (void*)(this));
|
||||
} // Fl_Button* o
|
||||
window->end();
|
||||
window->resizable(window);
|
||||
} // Fl_Window* window
|
||||
|
||||
@@ -26,6 +26,8 @@ extern void floppy_streamer_connect(Fl_Button*, void*);
|
||||
#include <FL/Fl_Slider.H>
|
||||
extern void disk_streamer_window_callback(Fl_Slider*, void*);
|
||||
#include <FL/Fl_Choice.H>
|
||||
extern void floppy_streamer_mode3(Fl_Light_Button*, void*);
|
||||
extern void floppy_streamer_eject(Fl_Button*, void*);
|
||||
|
||||
class floppy_streamer_window {
|
||||
public:
|
||||
@@ -69,5 +71,6 @@ public:
|
||||
Fl_Slider *x_time;
|
||||
Fl_Value_Slider *y_time;
|
||||
Fl_Choice *drive_choice;
|
||||
Fl_Light_Button *mode3;
|
||||
};
|
||||
#endif
|
||||
@@ -13,7 +13,7 @@ class floppy_streamer_window {open
|
||||
Fl_Button {} {
|
||||
label Clear
|
||||
user_data this
|
||||
callback floppy_streamer_clear_bt selected
|
||||
callback floppy_streamer_clear_bt
|
||||
xywh {1270 54 55 22}
|
||||
}
|
||||
Fl_Input dump_name {
|
||||
@@ -166,7 +166,7 @@ class floppy_streamer_window {open
|
||||
label {STOP !}
|
||||
user_data this
|
||||
callback floppy_streamer_stop
|
||||
xywh {1103 474 222 25}
|
||||
xywh {1103 474 162 25}
|
||||
}
|
||||
Fl_Button {} {
|
||||
label {+}
|
||||
@@ -234,7 +234,7 @@ class floppy_streamer_window {open
|
||||
}
|
||||
Fl_Light_Button fat_dots {
|
||||
label {Fat dots}
|
||||
xywh {1240 567 84 15} labelsize 10
|
||||
xywh {1240 568 84 15} labelsize 10
|
||||
}
|
||||
Fl_Input server_address {
|
||||
label {Pauline IP}
|
||||
@@ -275,9 +275,20 @@ class floppy_streamer_window {open
|
||||
Fl_Choice drive_choice {
|
||||
label Drive
|
||||
user_data this open
|
||||
xywh {1107 314 210 22} down_box BORDER_BOX labelsize 12 textsize 12
|
||||
xywh {1090 314 210 22} down_box BORDER_BOX labelsize 12 textsize 12
|
||||
} {}
|
||||
}
|
||||
Fl_Light_Button mode3 {
|
||||
label {mode 3}
|
||||
callback floppy_streamer_mode3 selected
|
||||
xywh {1260 517 65 15} labelsize 10
|
||||
}
|
||||
Fl_Button {} {
|
||||
label Eject
|
||||
user_data this
|
||||
callback floppy_streamer_eject
|
||||
xywh {1265 474 60 25}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user