diff --git a/uisimulator/win32/debug-win32.c b/uisimulator/win32/debug-win32.c new file mode 100644 index 0000000000..6a65f4fcd3 --- /dev/null +++ b/uisimulator/win32/debug-win32.c @@ -0,0 +1,38 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2002 by Felix Arends + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include + +char debugmembuf[100]; +char debugbuf[200]; + +void debug( const char *message ) +{ + OutputDebugString (message); +} + +void debugf(char *fmt, ...) +{ + va_list ap; + + va_start( ap, fmt ); + wsprintf( debugmembuf, fmt, ap ); + va_end( ap ); + debug ( debugmembuf ); +} \ No newline at end of file diff --git a/uisimulator/win32/panic-win32.c b/uisimulator/win32/panic-win32.c new file mode 100644 index 0000000000..c4592d5906 --- /dev/null +++ b/uisimulator/win32/panic-win32.c @@ -0,0 +1,43 @@ +/*************************************************************************** + * __________ __ ___. + * Open \______ \ ____ ____ | | _\_ |__ _______ ___ + * Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ / + * Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < < + * Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \ + * \/ \/ \/ \/ \/ + * $Id$ + * + * Copyright (C) 2002 by Felix Arends + * + * All files in this archive are subject to the GNU General Public License. + * See the file COPYING in the source tree root for full license agreement. + * + * This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY + * KIND, either express or implied. + * + ****************************************************************************/ + +#include +#include "debug.h" + +char panic_buf[128]; + +// panic +// whatever it says ;) +void panic( char *message ) +{ + debug( message ); + PostQuitMessage (-1); +} + + +// panicf +// formatted panic +void panicf( char *fmt, ...) +{ + va_list ap; + va_start( ap, fmt ); + wsprintf( panic_buf, fmt, ap ); + va_end( ap ); + panic( panic_buf ); +} \ No newline at end of file diff --git a/uisimulator/win32/uisw32.sln b/uisimulator/win32/uisw32.sln index 855bb2f214..ada5e11e7c 100644 --- a/uisimulator/win32/uisw32.sln +++ b/uisimulator/win32/uisw32.sln @@ -9,8 +9,8 @@ Global GlobalSection(ProjectDependencies) = postSolution EndGlobalSection GlobalSection(ProjectConfiguration) = postSolution - {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.ActiveCfg = Release|Win32 - {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.Build.0 = Release|Win32 + {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.ActiveCfg = Debug|Win32 + {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Debug.Build.0 = Debug|Win32 {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Release.ActiveCfg = Release|Win32 {A81A8EFA-647A-427A-BD04-F6B469752E7A}.Release.Build.0 = Release|Win32 EndGlobalSection diff --git a/uisimulator/win32/uisw32.suo b/uisimulator/win32/uisw32.suo index b14fa23728..62664e5912 100644 Binary files a/uisimulator/win32/uisw32.suo and b/uisimulator/win32/uisw32.suo differ diff --git a/uisimulator/win32/uisw32.vcproj b/uisimulator/win32/uisw32.vcproj index 4419bef715..64bf277453 100644 --- a/uisimulator/win32/uisw32.vcproj +++ b/uisimulator/win32/uisw32.vcproj @@ -19,7 +19,7 @@ - - + + + + + + @@ -128,7 +134,16 @@ RelativePath="..\..\firmware\drivers\lcd.c"> + RelativePath="panic-win32.c"> + + + + + + @@ -137,6 +152,9 @@ + +