floppy streamer gui.

git-svn-id: svn://svn.code.sf.net/p/hxcfloppyemu/code/HxCFloppyEmulator/HxCFloppyEmulator_software/trunk@1932 63fa2f70-6a9b-4bc4-b855-9c6a949b1d69
This commit is contained in:
Jean-François DEL NERO committed 2020-01-31 22:50:06 +00:00
1 parent 0bc13c9859
commit 7308349f6a
5 files changed
+1110

No files matched your search

@@ -0,0 +1,573 @@
/*
//
// Copyright (C) 2006-2020 Jean-François DEL NERO
//
// This file is part of HxCFloppyEmulator.
//
// HxCFloppyEmulator may be used and distributed without restriction provided
// that this copyright statement is not removed from the file and that any
// derivative work contains the original copyright notice and the associated
// disclaimer.
//
// HxCFloppyEmulator is free software; you can redistribute it
// and/or modify it under the terms of the GNU General Public License
// as published by the Free Software Foundation; either version 2
// of the License, or (at your option) any later version.
//
// HxCFloppyEmulator is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
// See the GNU General Public License for more details.
//
// You should have received a copy of the GNU General Public License
// along with HxCFloppyEmulator; if not, write to the Free Software
// Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA
//
*/
///////////////////////////////////////////////////////////////////////////////////
//-------------------------------------------------------------------------------//
//-------------------------------------------------------------------------------//
//-----------H----H--X----X-----CCCCC----22222----0000-----0000------11----------//
//----------H----H----X-X-----C--------------2---0----0---0----0--1--1-----------//
//---------HHHHHH-----X------C----------22222---0----0---0----0-----1------------//
//--------H----H----X--X----C----------2-------0----0---0----0-----1-------------//
//-------H----H---X-----X---CCCCC-----222222----0000-----0000----1111------------//
//-------------------------------------------------------------------------------//
//----------------------------------------------------- http://hxc2001.free.fr --//
///////////////////////////////////////////////////////////////////////////////////
// File : cb_floppy_streamer_window.cxx
// Contains: Floppy Streamer GUI.
//
// Written by: Jean François DEL NERO
//
// Change History (most recent first):
///////////////////////////////////////////////////////////////////////////////////
#include "floppy_streamer_window.h"
#include <stdio.h>
#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <math.h>
#include <stdint.h>
#include "fl_includes.h"
#include "batch_converter_window.h"
#include "filesystem_generator_window.h"
#include "cb_filesystem_generator_window.h"
#include "cb_floppy_streamer_window.h"
#include "floppy_dump_window.h"
#include "floppy_infos_window.h"
#include "floppy_streamer_window.h"
#include "rawfile_loader_window.h"
#include "sdhxcfecfg_window.h"
#include "usbhxcfecfg_window.h"
#include "log_gui.h"
#include "about_gui.h"
#include "edittool_window.h"
#include "parameters_gui.h"
#include "libhxcfe.h"
#include "libhxcadaptor.h"
#include "usb_hxcfloppyemulator.h"
#include "main.h"
#include "loader.h"
#include "fl_mouse_box.h"
#include "main_gui.h"
extern s_gui_context * guicontext;
void * cmd_connection;
void * dat_connection;
#pragma pack(1)
typedef struct _chunk_header
{
uint32_t header; // CHKH - 0x43, 0x48, 0x4B, 0x48 - 484B4843
uint32_t size; // Header + data +CRC
uint32_t packet_number;
}chunk_header;
#define HXCSTREAM_HEADERSIGN 0x484B4843
FILE * fstreamin = NULL;
#pragma pack()
void update_graph(floppy_streamer_window * w)
{
}
void streamer_tick_infos(void *w)
{
HXCFE_TD * td;
floppy_streamer_window *window;
window=(floppy_streamer_window *)w;
if(window->window->shown())
{
window->window->make_current();
td = guicontext->td;
if(td)
{
fl_draw_image((unsigned char *)guicontext->flayoutframebuffer, window->floppy_map_disp->x(), window->floppy_map_disp->y(), hxcfe_td_getframebuffer_xres(td), hxcfe_td_getframebuffer_yres(td), 3, 0);
}
}
Fl::repeat_timeout(0.1, streamer_tick_infos, w);
}
static double adjust_timescale(double slide)
{
if(slide >= 250 * 1000)
{
slide -= (250 * 1000);
slide += 250;
}
else
{
slide = (slide * 250) / (double)(250 * 1000);
}
return slide;
}
int StreamerThreadRxStatusProc(void* floppycontext,void* context)
{
char tmpstr[1024];
streamthread * streamth;
floppy_streamer_window *w;
streamth = (streamthread*)context;
w = streamth->window;
while(1)
{
if(cmd_connection && dat_connection)
{
memset(tmpstr,0,sizeof(tmpstr));
network_read2(cmd_connection, (unsigned char*)tmpstr, sizeof(tmpstr),0);
w->global_status->value(tmpstr);
}
else
{
hxc_pause(100);
}
}
return 0;
}
#define MAX_CHUNKSIZE 512*1024
#define MAX_CHUNK_BLOCKS_PER_PICTURE 16
int StreamerThreadRxDataProc(void* floppycontext,void* context)
{
unsigned char * buffer;
chunk_header * ch;
int ret,failure;
buffer =(unsigned char*) malloc(MAX_CHUNKSIZE);
if(!buffer)
return -1;
ret = 0;
ch = (chunk_header *)buffer;
while( ret >= 0 )
{
if(cmd_connection && dat_connection)
{
failure = 1;
memset(ch,0,sizeof(chunk_header));
ret = network_read(dat_connection, (unsigned char*)ch, sizeof(chunk_header),0);
if(ch->header == HXCSTREAM_HEADERSIGN)
{
if( (ch->size >= sizeof(chunk_header)) && ch->size < MAX_CHUNKSIZE)
{
ret = network_read(dat_connection, (unsigned char*)&buffer[sizeof(chunk_header)], ch->size - sizeof(chunk_header),0);
if(!fstreamin)
fstreamin = fopen("tmp.hxcstream","wb");
if(fstreamin)
{
fwrite(buffer,ch->size,1,fstreamin);
fflush(fstreamin);
}
failure = 0;
}
}
if(failure)
{
hxc_pause(100);
}
}
else
{
hxc_pause(100);
}
}
free(buffer);
if(fstreamin)
fclose(fstreamin);
return 0;
}
int StreamerThreadProc(void* floppycontext,void* context)
{
int i,nbpixel;
HXCFE_TD * td;
streamthread * streamth;
s_gui_context * guicontext;
floppy_streamer_window *w;
unsigned char * ptr1;
unsigned char * ptr2;
unsigned char * buffer;
unsigned char * full_track_buffer;
int file_offset,tmp_file_offset,current_file_size;
unsigned long * offset_table;
int offset_table_index;
FILE * f;
chunk_header * ch;
int ret;
HXCFE_FXSA * fxsa;
HXCFE_TRKSTREAM* trkstream;
streamth = (streamthread*)context;
guicontext = (s_gui_context *)streamth->guicontext;
w = streamth->window;
buffer = NULL;
offset_table = NULL;
full_track_buffer = NULL;
buffer = (unsigned char*) malloc(1024*1024);
if(!buffer)
goto error;
offset_table = (unsigned long *)malloc(128*1024);
if(!offset_table)
goto error;
memset(offset_table, 0, 128*1024);
full_track_buffer = (unsigned char*) malloc(1024*1024);
if(!full_track_buffer)
goto error;
memset(full_track_buffer,0,1024*1024);
ret = 0;
ch = (chunk_header *)buffer;
offset_table_index = 0;
file_offset = 0;
while( ret >= 0 )
{
if(cmd_connection && dat_connection)
{
do
{
hxc_pause(100);
}while(!fstreamin);
hxc_pause(50);
f = fopen("tmp.hxcstream","rb");
if(f)
{
do
{
fseek(f,0,SEEK_END);
current_file_size = ftell(f);
fseek(f,file_offset,SEEK_SET);
ret = fread(buffer,sizeof(chunk_header), 1, f);
if(ret == 1)
{
if( (int)(file_offset + ch->size) <= current_file_size )
{
ret = fread(&buffer[sizeof(chunk_header)],ch->size - sizeof(chunk_header), 1, f);
if(ret == 1)
{
fxsa = hxcfe_initFxStream(guicontext->hxcfe);
if(fxsa)
{
trkstream = hxcfe_FxStream_ImportHxCStreamBuffer(fxsa,buffer,ch->size);
if(trkstream)
{
if(ch->packet_number == 0)
{
offset_table_index=0;
}
offset_table[offset_table_index] = file_offset;
offset_table_index++;
hxcfe_FxStream_FreeStream( fxsa, trkstream );
if(offset_table_index > MAX_CHUNK_BLOCKS_PER_PICTURE)
tmp_file_offset = offset_table[offset_table_index - MAX_CHUNK_BLOCKS_PER_PICTURE];
else
tmp_file_offset = offset_table[0];
fseek(f,tmp_file_offset,SEEK_SET);
if( fread(full_track_buffer,(file_offset - tmp_file_offset) + ch->size,1, f) == 1)
{
trkstream = hxcfe_FxStream_ImportHxCStreamBuffer(fxsa,full_track_buffer,(file_offset - tmp_file_offset) + ch->size);
file_offset += ch->size;
td = (HXCFE_TD *)guicontext->td;
hxcfe_td_activate_analyzer(td,ISOIBM_MFM_ENCODING,w->iso_mfm_bt->value());
hxcfe_td_activate_analyzer(td,ISOIBM_FM_ENCODING,w->iso_fm_bt->value());
hxcfe_td_activate_analyzer(td,AMIGA_MFM_ENCODING,w->amiga_mfm_bt->value());
hxcfe_td_activate_analyzer(td,EMU_FM_ENCODING,w->eemu_bt->value());
hxcfe_td_activate_analyzer(td,MEMBRAIN_MFM_ENCODING,w->membrain_bt->value());
hxcfe_td_activate_analyzer(td,TYCOM_FM_ENCODING,w->tycom_bt->value());
hxcfe_td_activate_analyzer(td,APPLEII_GCR1_ENCODING,w->apple2_bt->value());
hxcfe_td_activate_analyzer(td,APPLEII_GCR2_ENCODING,w->apple2_bt->value());
hxcfe_td_activate_analyzer(td,ARBURGDAT_ENCODING,w->arburg_bt->value());
hxcfe_td_activate_analyzer(td,ARBURGSYS_ENCODING,w->arburg_bt->value());
hxcfe_td_activate_analyzer(td,AED6200P_MFM_ENCODING,w->aed6200p_bt->value());
hxcfe_td_activate_analyzer(td,NORTHSTAR_HS_MFM_ENCODING,w->northstar_bt->value());
hxcfe_td_activate_analyzer(td,HEATHKIT_HS_FM_ENCODING,w->heathkit_bt->value());
hxcfe_td_activate_analyzer(td,DEC_RX02_M2FM_ENCODING,w->decrx02_bt->value());
hxcfe_td_setparams(td,(int)(adjust_timescale(w->x_time->value())),(int)w->y_time->value(),0);
if(trkstream)
{
hxcfe_td_draw_stream_track( td, trkstream );
ptr1 = (unsigned char*)hxcfe_td_getframebuffer(td);
ptr2 = (unsigned char*)guicontext->flayoutframebuffer;
nbpixel = hxcfe_td_getframebuffer_xres(td)*hxcfe_td_getframebuffer_yres(td);
for(i=0;i<nbpixel;i++)
{
*ptr2++ = *ptr1++;
*ptr2++ = *ptr1++;
*ptr2++ = *ptr1++;
ptr1++;
}
//fl_draw_image((unsigned char *)guicontext->flayoutframebuffer, w->floppy_map_disp->x(), w->floppy_map_disp->y(), hxcfe_td_getframebuffer_xres(td), hxcfe_td_getframebuffer_yres(td), 3, 0);
hxcfe_FxStream_FreeStream( fxsa, trkstream );
}
}
}
else
{
hxc_pause(10);
}
hxcfe_deinitFxStream( fxsa );
}
else
{
hxc_pause(10);
}
}
else
{
hxc_pause(10);
}
}
else
{
fseek(f,file_offset,SEEK_SET);
hxc_pause(10);
}
}
else
{
hxc_pause(50);
}
fseek(f,file_offset,SEEK_SET);
}while(1);
}
else
{
printf("Error!!!!\n");
}
}
else
{
hxc_pause(200);
}
}
return 0;
error:
if(buffer)
free(buffer);
if(offset_table)
free(offset_table);
if(full_track_buffer)
free(full_track_buffer);
return -1;
}
void floppy_streamer_ok(Fl_Button*, void* w)
{
floppy_streamer_window *fdw;
fdw=(floppy_streamer_window *)w;
fdw->window->hide();
}
void floppy_streamer_connect(Fl_Button*, void* w)
{
floppy_streamer_window *fdw;
fdw=(floppy_streamer_window *)w;
cmd_connection = network_connect((char*)fdw->server_address->value(),600);
if(cmd_connection)
{
dat_connection = network_connect((char*)fdw->server_address->value(),601);
if(dat_connection)
{
fdw->global_status->value("Connected");
}
}
}
void floppy_streamer_readdisk(Fl_Button*, void* w)
{
char tmp[256];
floppy_streamer_window *fdw;
fdw=(floppy_streamer_window *)w;
if(cmd_connection && dat_connection)
{
sprintf(tmp,"index_to_dump %d\n",atoi(fdw->index_delay->value()));
network_write(cmd_connection, (unsigned char*)tmp, strlen(tmp),2);
sprintf(tmp,"dump_time %d\n",atoi(fdw->dump_lenght->value()));
network_write(cmd_connection, (unsigned char*)tmp, strlen(tmp),2);
sprintf(tmp,"dump 0 %d %d %d %d %d %d %d 0\n",atoi(fdw->min_track->value()),atoi(fdw->max_track->value()), (fdw->Side_0->value()^1)&1 , fdw->Side_1->value() ,fdw->high_res->value(),fdw->double_step->value(),fdw->ignore_index->value());
network_write(cmd_connection, (unsigned char*)tmp, strlen(tmp),2);
}
}
void floppy_streamer_readtrack(Fl_Button*, void* w)
{
char tmp[256];
floppy_streamer_window *fdw;
fdw=(floppy_streamer_window *)w;
if(cmd_connection)
{
sprintf(tmp,"index_to_dump %d\n",atoi(fdw->index_delay->value()));
network_write(cmd_connection, (unsigned char*)tmp, strlen(tmp),2);
sprintf(tmp,"dump_time %d\n",atoi(fdw->dump_lenght->value()));
network_write(cmd_connection, (unsigned char*)tmp, strlen(tmp),2);
sprintf(tmp,"dump 0 -1 -1 %g %g %d %d %d 0\n",fdw->side_number_slide->value(),fdw->side_number_slide->value(),fdw->high_res->value(),fdw->double_step->value(),fdw->ignore_index->value());
network_write(cmd_connection, (unsigned char*)tmp, strlen(tmp),2);
}
}
void floppy_streamer_spybus(Fl_Button*, void* w)
{
char tmp[256];
floppy_streamer_window *fdw;
fdw=(floppy_streamer_window *)w;
if(cmd_connection)
{
sprintf(tmp,"index_to_dump %d\n",atoi(fdw->index_delay->value()));
network_write(cmd_connection, (unsigned char*)tmp, strlen(tmp),2);
sprintf(tmp,"dump_time %d\n",atoi(fdw->dump_lenght->value()));
network_write(cmd_connection, (unsigned char*)tmp, strlen(tmp),2);
sprintf(tmp,"dump 0 -1 -1 %g %g %d %d %d 1\n",fdw->side_number_slide->value(),fdw->side_number_slide->value(),fdw->high_res->value(),fdw->double_step->value(),fdw->ignore_index->value());
network_write(cmd_connection, (unsigned char*)tmp, strlen(tmp),2);
}
}
void floppy_streamer_stop(Fl_Button*, void* w)
{
char tmpstr[64];
if(cmd_connection)
{
sprintf(tmpstr,"stop\n");
network_write(cmd_connection, (unsigned char*)tmpstr, strlen(tmpstr),2);
}
}
void floppy_streamer_trackup(Fl_Button*, void* w)
{
char tmpstr[64];
if(cmd_connection)
{
sprintf(tmpstr,"headstep 0 1\n");
network_write(cmd_connection, (unsigned char*)tmpstr, strlen(tmpstr),2);
}
}
void floppy_streamer_down(Fl_Button*, void* w)
{
char tmpstr[64];
if(cmd_connection)
{
sprintf(tmpstr,"headstep 0 -1\n");
network_write(cmd_connection, (unsigned char*)tmpstr, strlen(tmpstr),2);
}
}
void floppy_streamer_recalibrate(Fl_Button*, void* w)
{
char tmpstr[64];
if(cmd_connection)
{
sprintf(tmpstr,"recalibrate 0\n");
network_write(cmd_connection, (unsigned char*)tmpstr, strlen(tmpstr),2);
}
}
void floppy_streamer_movehead(Fl_Button*, void* w)
{
char tmpstr[64];
floppy_streamer_window *fdw;
fdw=(floppy_streamer_window *)w;
if(cmd_connection)
{
sprintf(tmpstr,"movehead 0 %g\n",fdw->track_number_slide->value());
network_write(cmd_connection, (unsigned char*)tmpstr, strlen(tmpstr),2);
}
}
void disk_streamer_window_callback(Fl_Widget *o, void *v)
{
}
@@ -0,0 +1,15 @@
void floppy_streamer_window_bt_read(Fl_Button* bt, void*);
void streamer_tick_infos(void *v);
void disk_streamer_window_callback(Fl_Widget *o, void *v);
void disk_streamer_window_bt_edit_callback(Fl_Widget *o, void *v);
typedef struct _streamthread
{
floppy_streamer_window *window;
void * guicontext;
}streamthread;
int StreamerThreadProc(void* floppycontext,void* context);
int StreamerThreadRxStatusProc(void* floppycontext,void* context);
int StreamerThreadRxDataProc(void* floppycontext,void* context);
@@ -0,0 +1,210 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0304
#include "floppy_streamer_window.h"
#include "gui_strings.h"
#include <stdint.h>
extern "C"
{
#include "libhxcfe.h"
#include "usb_hxcfloppyemulator.h"
}
#include "cb_floppy_streamer_window.h"
#include "fl_mouse_box.h"
floppy_streamer_window::floppy_streamer_window() {
{ window = new Fl_Double_Window(1330, 620, "Visual Floppy disk");
window->user_data((void*)(this));
{ Fl_Group* o = new Fl_Group(1050, 331, 275, 84, "Track / Side selection");
o->box(FL_ENGRAVED_FRAME);
o->labeltype(FL_EMBOSSED_LABEL);
o->labelsize(12);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ track_number_slide = new Fl_Value_Slider(1056, 347, 269, 19, "Track number");
track_number_slide->type(1);
track_number_slide->labelsize(12);
track_number_slide->textsize(12);
track_number_slide->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Value_Slider* track_number_slide
{ side_number_slide = new Fl_Value_Slider(1055, 379, 270, 19, "Side number");
side_number_slide->type(1);
side_number_slide->labelsize(12);
side_number_slide->textsize(12);
side_number_slide->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Value_Slider* side_number_slide
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(1050, 1, 275, 248, "Status");
o->box(FL_ENGRAVED_FRAME);
o->labeltype(FL_ENGRAVED_LABEL);
o->labelsize(12);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ x_pos = new Fl_Output(1055, 16, 265, 15);
x_pos->labelsize(10);
x_pos->textsize(10);
} // Fl_Output* x_pos
{ y_pos = new Fl_Output(1055, 32, 265, 15);
y_pos->labelsize(10);
y_pos->textsize(10);
} // Fl_Output* y_pos
{ global_status = new Fl_Output(1055, 48, 265, 16);
global_status->labelsize(10);
global_status->textsize(10);
} // Fl_Output* global_status
{ object_txt = new Fl_Text_Display(1055, 67, 265, 178);
object_txt->labelsize(10);
object_txt->textsize(10);
object_txt->user_data((void*)(this));
} // Fl_Text_Display* object_txt
o->end();
} // Fl_Group* o
{ Fl_Button* o = new Fl_Button(1220, 589, 105, 26, "Connect");
o->callback((Fl_Callback*)floppy_streamer_connect, (void*)(this));
} // Fl_Button* o
{ floppy_map_disp = new Fl_Group(0, 1, 1050, 576, "Floppy Map");
floppy_map_disp->box(FL_ENGRAVED_FRAME);
floppy_map_disp->labeltype(FL_EMBOSSED_LABEL);
floppy_map_disp->labelsize(12);
floppy_map_disp->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
floppy_map_disp->end();
} // Fl_Group* floppy_map_disp
{ Fl_Group* o = new Fl_Group(0, 575, 1050, 45);
o->box(FL_ENGRAVED_FRAME);
o->labeltype(FL_EMBOSSED_LABEL);
o->labelsize(12);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ y_time = new Fl_Value_Slider(727, 577, 300, 25, "full y time scale (us)");
y_time->type(5);
y_time->labelsize(12);
y_time->textsize(12);
y_time->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Value_Slider* y_time
{ x_offset = new Fl_Value_Slider(17, 577, 300, 24, "x offset (% of the track len)");
x_offset->type(5);
x_offset->labelsize(12);
x_offset->textsize(12);
x_offset->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Value_Slider* x_offset
{ x_time = new Fl_Slider(382, 577, 301, 25, "full x time scale");
x_time->type(1);
x_time->labelsize(12);
x_time->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Slider* x_time
o->end();
} // Fl_Group* o
{ Fl_Group* o = new Fl_Group(1050, 246, 275, 84, "Track analysis format");
o->box(FL_ENGRAVED_FRAME);
o->labeltype(FL_EMBOSSED_LABEL);
o->labelsize(10);
o->align(Fl_Align(FL_ALIGN_TOP_LEFT|FL_ALIGN_INSIDE));
{ iso_mfm_bt = new Fl_Light_Button(1065, 264, 76, 15, "ISO MFM");
iso_mfm_bt->labelsize(10);
iso_mfm_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* iso_mfm_bt
{ iso_fm_bt = new Fl_Light_Button(1065, 279, 76, 15, "ISO FM");
iso_fm_bt->labelsize(10);
iso_fm_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* iso_fm_bt
{ amiga_mfm_bt = new Fl_Light_Button(1065, 294, 76, 15, "AMIGA MFM");
amiga_mfm_bt->labelsize(10);
amiga_mfm_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* amiga_mfm_bt
{ membrain_bt = new Fl_Light_Button(1149, 294, 76, 15, "MEMBRAIN");
membrain_bt->labelsize(10);
membrain_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* membrain_bt
{ tycom_bt = new Fl_Light_Button(1149, 279, 76, 15, "TYCOM");
tycom_bt->labelsize(10);
tycom_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* tycom_bt
{ eemu_bt = new Fl_Light_Button(1149, 264, 76, 15, "E-Emu");
eemu_bt->labelsize(10);
eemu_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* eemu_bt
{ apple2_bt = new Fl_Light_Button(1065, 309, 76, 15, "Apple II");
apple2_bt->labelsize(10);
apple2_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* apple2_bt
{ arburg_bt = new Fl_Light_Button(1149, 309, 76, 15, "Arburg");
arburg_bt->labelsize(10);
arburg_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* arburg_bt
{ aed6200p_bt = new Fl_Light_Button(1233, 264, 76, 15, "AED 6200P");
aed6200p_bt->labelsize(10);
aed6200p_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* aed6200p_bt
{ northstar_bt = new Fl_Light_Button(1233, 279, 76, 15, "NORTHSTAR");
northstar_bt->labelsize(10);
northstar_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* northstar_bt
{ heathkit_bt = new Fl_Light_Button(1233, 294, 76, 15, "HEATHKIT");
heathkit_bt->labelsize(10);
heathkit_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* heathkit_bt
{ decrx02_bt = new Fl_Light_Button(1233, 309, 76, 15, "DEC RX02");
decrx02_bt->labelsize(10);
decrx02_bt->callback((Fl_Callback*)disk_streamer_window_callback, (void*)(this));
} // Fl_Light_Button* decrx02_bt
o->end();
} // Fl_Group* o
{ server_address = new Fl_Input(1105, 590, 110, 25, "Server");
} // Fl_Input* server_address
{ Fl_Button* o = new Fl_Button(1102, 417, 78, 40, "Read Disk");
o->callback((Fl_Callback*)floppy_streamer_readdisk, (void*)(this));
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(1077, 418, 23, 20, "+");
o->callback((Fl_Callback*)floppy_streamer_trackup, (void*)(this));
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(1052, 418, 23, 20, "-");
o->callback((Fl_Callback*)floppy_streamer_down, (void*)(this));
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(1052, 464, 48, 21, "recal");
o->callback((Fl_Callback*)floppy_streamer_recalibrate, (void*)(this));
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(1180, 417, 85, 40, "Read Track");
o->callback((Fl_Callback*)floppy_streamer_readtrack, (void*)(this));
} // Fl_Button* o
{ Fl_Button* o = new Fl_Button(1103, 460, 222, 25, "STOP !");
o->callback((Fl_Callback*)floppy_streamer_stop, (void*)(this));
} // Fl_Button* o
{ max_track = new Fl_Input(1134, 516, 40, 15, "Max track");
max_track->labelsize(10);
max_track->textsize(10);
} // Fl_Input* max_track
{ min_track = new Fl_Input(1134, 501, 40, 15, "Min track");
min_track->labelsize(10);
min_track->textsize(10);
} // Fl_Input* min_track
{ Side_0 = new Fl_Light_Button(1177, 500, 80, 15, "Side 0");
Side_0->labelsize(10);
} // Fl_Light_Button* Side_0
{ Side_1 = new Fl_Light_Button(1177, 515, 80, 15, "Side 1");
Side_1->labelsize(10);
} // Fl_Light_Button* Side_1
{ double_step = new Fl_Light_Button(1177, 530, 80, 15, "Double step");
double_step->labelsize(10);
} // Fl_Light_Button* double_step
{ index_delay = new Fl_Input(1134, 544, 40, 15, "Index delay (us)");
index_delay->labelsize(10);
index_delay->textsize(10);
} // Fl_Input* index_delay
{ dump_lenght = new Fl_Input(1134, 529, 40, 15, "lenght (ms)");
dump_lenght->labelsize(10);
dump_lenght->textsize(10);
} // Fl_Input* dump_lenght
{ ignore_index = new Fl_Light_Button(1177, 545, 80, 15, "Ignore index");
ignore_index->labelsize(10);
} // Fl_Light_Button* ignore_index
{ Fl_Button* o = new Fl_Button(1052, 439, 48, 21, "move");
o->callback((Fl_Callback*)floppy_streamer_movehead, (void*)(this));
} // Fl_Button* o
{ high_res = new Fl_Light_Button(1260, 500, 65, 15, "50Mhz ");
high_res->labelsize(10);
} // Fl_Light_Button* high_res
{ Fl_Button* o = new Fl_Button(1265, 417, 59, 40, "Spy bus");
o->callback((Fl_Callback*)floppy_streamer_spybus, (void*)(this));
} // Fl_Button* o
window->end();
} // Fl_Double_Window* window
}
@@ -0,0 +1,65 @@
// generated by Fast Light User Interface Designer (fluid) version 1.0304
#ifndef floppy_streamer_window_h
#define floppy_streamer_window_h
#include <FL/Fl.H>
#include <FL/Fl_Double_Window.H>
#include <FL/Fl_Group.H>
#include <FL/Fl_Value_Slider.H>
extern void disk_streamer_window_callback(Fl_Value_Slider*, void*);
#include <FL/Fl_Output.H>
#include <FL/Fl_Text_Display.H>
#include <FL/Fl_Button.H>
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_Light_Button.H>
extern void disk_streamer_window_callback(Fl_Light_Button*, void*);
#include <FL/Fl_Input.H>
extern void floppy_streamer_readdisk(Fl_Button*, void*);
extern void floppy_streamer_trackup(Fl_Button*, void*);
extern void floppy_streamer_down(Fl_Button*, void*);
extern void floppy_streamer_recalibrate(Fl_Button*, void*);
extern void floppy_streamer_readtrack(Fl_Button*, void*);
extern void floppy_streamer_stop(Fl_Button*, void*);
extern void floppy_streamer_movehead(Fl_Button*, void*);
extern void floppy_streamer_spybus(Fl_Button*, void*);
class floppy_streamer_window {
public:
floppy_streamer_window();
Fl_Double_Window *window;
Fl_Value_Slider *track_number_slide;
Fl_Value_Slider *side_number_slide;
Fl_Output *x_pos;
Fl_Output *y_pos;
Fl_Output *global_status;
Fl_Text_Display *object_txt;
Fl_Group *floppy_map_disp;
Fl_Value_Slider *y_time;
Fl_Value_Slider *x_offset;
Fl_Slider *x_time;
Fl_Light_Button *iso_mfm_bt;
Fl_Light_Button *iso_fm_bt;
Fl_Light_Button *amiga_mfm_bt;
Fl_Light_Button *membrain_bt;
Fl_Light_Button *tycom_bt;
Fl_Light_Button *eemu_bt;
Fl_Light_Button *apple2_bt;
Fl_Light_Button *arburg_bt;
Fl_Light_Button *aed6200p_bt;
Fl_Light_Button *northstar_bt;
Fl_Light_Button *heathkit_bt;
Fl_Light_Button *decrx02_bt;
Fl_Input *server_address;
Fl_Input *max_track;
Fl_Input *min_track;
Fl_Light_Button *Side_0;
Fl_Light_Button *Side_1;
Fl_Light_Button *double_step;
Fl_Input *index_delay;
Fl_Input *dump_lenght;
Fl_Light_Button *ignore_index;
Fl_Light_Button *high_res;
};
#endif
@@ -0,0 +1,247 @@
# data file for the Fltk User Interface Designer (fluid)
version 1.0304
header_name {.h}
code_name {.cxx}
class floppy_streamer_window {open
} {
Function {floppy_streamer_window()} {open
} {
Fl_Window window {
label {Visual Floppy disk} open selected
xywh {18 76 1330 620} type Double visible
} {
Fl_Group {} {
label {Track / Side selection} open
xywh {1050 331 275 84} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 12 align 21
} {
Fl_Value_Slider track_number_slide {
label {Track number}
user_data this
callback disk_streamer_window_callback
xywh {1056 347 269 19} type Horizontal labelsize 12 textsize 12
}
Fl_Value_Slider side_number_slide {
label {Side number}
user_data this
callback disk_streamer_window_callback
xywh {1055 379 270 19} type Horizontal labelsize 12 textsize 12
}
}
Fl_Group {} {
label Status open
xywh {1050 1 275 248} box ENGRAVED_FRAME labeltype ENGRAVED_LABEL labelsize 12 align 21
} {
Fl_Output x_pos {
xywh {1055 16 265 15} labelsize 10 textsize 10
}
Fl_Output y_pos {
xywh {1055 32 265 15} labelsize 10 textsize 10
}
Fl_Output global_status {
xywh {1055 48 265 16} labelsize 10 textsize 10
}
Fl_Text_Display object_txt {
user_data this
xywh {1055 67 265 178} labelsize 10 textsize 10
}
}
Fl_Button {} {
label Connect
user_data this
callback floppy_streamer_connect
xywh {1220 589 105 26}
}
Fl_Group floppy_map_disp {
label {Floppy Map} open
xywh {0 1 1050 576} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 12 align 21
} {}
Fl_Group {} {open
xywh {0 575 1050 45} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 12 align 21
} {
Fl_Value_Slider y_time {
label {full y time scale (us)}
user_data this
callback disk_streamer_window_callback
xywh {727 577 300 25} type {Horz Knob} labelsize 12 textsize 12
}
Fl_Value_Slider x_offset {
label {x offset (% of the track len)}
user_data this
callback disk_streamer_window_callback
xywh {17 577 300 24} type {Horz Knob} labelsize 12 textsize 12
}
Fl_Slider x_time {
label {full x time scale}
user_data this
callback disk_streamer_window_callback
xywh {382 577 301 25} type Horizontal labelsize 12
}
}
Fl_Group {} {
label {Track analysis format} open
xywh {1050 246 275 84} box ENGRAVED_FRAME labeltype EMBOSSED_LABEL labelsize 10 align 21
} {
Fl_Light_Button iso_mfm_bt {
label {ISO MFM}
user_data this
callback disk_streamer_window_callback
xywh {1065 264 76 15} labelsize 10
}
Fl_Light_Button iso_fm_bt {
label {ISO FM}
user_data this
callback disk_streamer_window_callback
xywh {1065 279 76 15} labelsize 10
}
Fl_Light_Button amiga_mfm_bt {
label {AMIGA MFM}
user_data this
callback disk_streamer_window_callback
xywh {1065 294 76 15} labelsize 10
}
Fl_Light_Button membrain_bt {
label MEMBRAIN
user_data this
callback disk_streamer_window_callback
xywh {1149 294 76 15} labelsize 10
}
Fl_Light_Button tycom_bt {
label TYCOM
user_data this
callback disk_streamer_window_callback
xywh {1149 279 76 15} labelsize 10
}
Fl_Light_Button eemu_bt {
label {E-Emu}
user_data this
callback disk_streamer_window_callback
xywh {1149 264 76 15} labelsize 10
}
Fl_Light_Button apple2_bt {
label {Apple II}
user_data this
callback disk_streamer_window_callback
xywh {1065 309 76 15} labelsize 10
}
Fl_Light_Button arburg_bt {
label Arburg
user_data this
callback disk_streamer_window_callback
xywh {1149 309 76 15} labelsize 10
}
Fl_Light_Button aed6200p_bt {
label {AED 6200P}
user_data this
callback disk_streamer_window_callback
xywh {1233 264 76 15} labelsize 10
}
Fl_Light_Button northstar_bt {
label NORTHSTAR
user_data this
callback disk_streamer_window_callback
xywh {1233 279 76 15} labelsize 10
}
Fl_Light_Button heathkit_bt {
label HEATHKIT
user_data this
callback disk_streamer_window_callback
xywh {1233 294 76 15} labelsize 10
}
Fl_Light_Button decrx02_bt {
label {DEC RX02}
user_data this
callback disk_streamer_window_callback
xywh {1233 309 76 15} labelsize 10
}
}
Fl_Input server_address {
label Server
xywh {1105 590 110 25}
}
Fl_Button {} {
label {Read Disk}
user_data this
callback floppy_streamer_readdisk
xywh {1102 417 78 40}
}
Fl_Button {} {
label {+}
user_data this
callback floppy_streamer_trackup
xywh {1077 418 23 20}
}
Fl_Button {} {
label {-}
user_data this
callback floppy_streamer_down
xywh {1052 418 23 20}
}
Fl_Button {} {
label recal
user_data this
callback floppy_streamer_recalibrate
xywh {1052 464 48 21}
}
Fl_Button {} {
label {Read Track}
user_data this
callback floppy_streamer_readtrack
xywh {1180 417 85 40}
}
Fl_Button {} {
label {STOP !}
user_data this
callback floppy_streamer_stop
xywh {1103 460 222 25}
}
Fl_Input max_track {
label {Max track}
xywh {1134 516 40 15} labelsize 10 textsize 10
}
Fl_Input min_track {
label {Min track}
xywh {1134 501 40 15} labelsize 10 textsize 10
}
Fl_Light_Button Side_0 {
label {Side 0}
xywh {1177 500 80 15} labelsize 10
}
Fl_Light_Button Side_1 {
label {Side 1}
xywh {1177 515 80 15} labelsize 10
}
Fl_Light_Button double_step {
label {Double step}
xywh {1177 530 80 15} labelsize 10
}
Fl_Input index_delay {
label {Index delay (us)}
xywh {1134 544 40 15} labelsize 10 textsize 10
}
Fl_Input dump_lenght {
label {lenght (ms)}
xywh {1134 529 40 15} labelsize 10 textsize 10
}
Fl_Light_Button ignore_index {
label {Ignore index}
xywh {1177 545 80 15} labelsize 10
}
Fl_Button {} {
label move
user_data this
callback floppy_streamer_movehead
xywh {1052 439 48 21}
}
Fl_Light_Button high_res {
label {50Mhz }
xywh {1260 500 65 15} labelsize 10
}
Fl_Button {} {
label {Spy bus}
user_data this
callback floppy_streamer_spybus
xywh {1265 417 59 40}
}
}
}
}