HP49_support is always set

This commit is contained in:
Gwenhael Le Moine 2024-10-08 19:14:34 +02:00
parent dc122cf46f
commit bb47a0d0aa
No known key found for this signature in database
GPG key ID: FDFE3669426707A7
4 changed files with 15 additions and 50 deletions

View file

@ -124,8 +124,6 @@
.- */
#include <stdbool.h>
#include "ui4x/config.h"
/* 2.4: N_PORT_2_BANK
@ -146,13 +144,6 @@
/* #define SERIAL_FORCE_OPENPTY */
/* #define SERIAL_FORCE_STREAMSPTY */
/* 3.2: HP49_SUPPORT
Define this symbol to enable HP49-specific support code in the
emulator; it does not harm if this symbol is defined when emulating
a HP48, too, since all changed should be backward-compatible.
*/
#define HP49_SUPPORT
/* 3.14: CPU_SLOW_IN
Define this symbol (recommended) to slow down the A=IN and C=IN
instructions depending on the current emulated CPU speed.

View file

@ -74,7 +74,7 @@
Revision 3.2 2000/09/22 13:46:30 cibrario
Implemented preliminary support of HP49 hw architecture:
- The HP49 firmware (1.19-4) reads a nibble from 0x30 for unknown reasons;
conditionally (#ifdef HP49_SUPPORT) enabled reads from relative
enabled reads from relative
addresses 0x30..0x34 without signaling a warning.
* Revision 3.1 2000/09/20 13:48:52 cibrario
@ -300,7 +300,6 @@ Nibble HdwRead( Address rel_address )
case 0x2F: /* Timer 2 Control */
return mod_status.hdw.t2_ctrl;
#ifdef HP49_SUPPORT
/* 3.2: The HP49 firmware (1.19-4) reads a nibble from 0x30 */
case 0x30:
case 0x31:
@ -308,7 +307,6 @@ Nibble HdwRead( Address rel_address )
case 0x33:
case 0x34:
return ( Nibble )0x0;
#endif
case 0x37: /* Timer 1 value */
return mod_status.hdw.t1_val;

View file

@ -94,7 +94,7 @@
* description table dynamically.
* - ModInit() now refuses to work if no module description table has
* been registered yet.
* - Conditionally (#ifdef HP49_SUPPORT) enabled forced alignment of
* - enabled forced alignment of
* module configuration sizes and addresses in ModConfig()
*
* Revision 3.1 2000/09/20 14:00:02 cibrario
@ -1188,7 +1188,7 @@ void ModReset( void )
2.7, 15-Sep-2000, update
- implemented module config/unconfig cache
3.2, 22-Sep-2000, update
- conditionally (#ifdef HP49_SUPPORT) enabled forced alignment
- enabled forced alignment
of config_info
.- */
void ModConfig( Address config_info )
@ -1200,13 +1200,11 @@ void ModConfig( Address config_info )
debug1( MOD_CHF_MODULE_ID, DEBUG_C_TRACE, MOD_I_CALLED, "ModConfig" );
#ifdef HP49_SUPPORT
/* 3.2: The HP49 firmware (1.19-4) can generate misaligned config
addresses, that is, addresses that are not a multiple of 0x100;
silently align them here.
*/
config_info &= ~0xFF;
#endif
/* ACCESS CONFIG CACHE */
if ( ( nxt = AccessConfigCache( config_info ) ) != ( struct ModMap* )NULL ) {

View file

@ -79,13 +79,13 @@
Revision 3.2 2000/09/22 14:34:55 cibrario
Implemented preliminary support of HP49 hw architecture:
- Conditionally (#ifdef HP49_SUPPORT) simplified handling of
- simplified handling of
RCS_RBZ and RCS_RBF bits of RCS register.
- Conditionally (#ifdef HP49_SUPPORT) disabled local ECHO on master
- disabled local ECHO on master
pty when USE_OPENPTY is in effect; this avoid spurious rx
when no process is connected to the slave pty yet. Apparently,
USE_STREAMSPTY does not suffer from this.
- Conditionally (#ifdef HP49_SUPPORT) removed warning message
- removed warning message
when reading from an empty RRB.
* Revision 2.6 2000/09/15 09:23:02 cibrario
@ -416,7 +416,7 @@ static int slave_pty; /* File descriptor of pty's slave side */
- if the receiver ring buffer is empty,
RCS_RBZ and RCS_RBF are both reset
3.2: If HP49_SUPPORT is enabled, the RCS_RBZ bit is
3.2: the RCS_RBZ bit is
always left clear and only RCS_RBF is updated;
this is simpler and works well on the 48, too.
@ -436,24 +436,12 @@ static int slave_pty; /* File descriptor of pty's slave side */
( ( ioc & IOC_ERBZ ) && ( rcs & RCS_RBZ ) ) ) ) \
CpuIntRequest( INT_REQUEST_IRQ )
#ifdef HP49_SUPPORT
# define UpdateRCS \
if ( FullSlots( rrb ) > 0 ) { \
rcs |= RCS_RBF; \
} else { \
rcs &= ~( RCS_RBF ); \
}
#else
# define UpdateRCS \
if ( FullSlots( rrb ) > 1 ) { \
rcs |= ( RCS_RBF | RCS_RBZ ); \
} else if ( FullSlots( rrb ) > 0 ) { \
rcs |= RCS_RBF; \
rcs &= ~RCS_RBZ; \
} else { \
rcs &= ~( RCS_RBF | RCS_RBZ ); \
}
#endif
#define UpdateRCS \
if ( FullSlots( rrb ) > 0 ) { \
rcs |= RCS_RBF; \
} else { \
rcs &= ~( RCS_RBF ); \
}
#define UpdateTCS \
if ( EmptySlots( trb ) > 1 ) { \
@ -507,7 +495,7 @@ static int slave_pty; /* File descriptor of pty's slave side */
2.6, 15-Sep-2000, update
- implemented USE_STREAMSPTY
3.2, 22-Sep-2000, update
- conditionally (#ifdef HP49_SUPPORT) disabled local ECHO on master
- disabled local ECHO on master
pty when USE_OPENPTY is in effect; this avoid spurious rx
when no process is connected to the slave pty yet.
3.16, 16-Nov-2000, update
@ -618,7 +606,6 @@ const char* SerialInit( void )
}
# endif
# ifdef HP49_SUPPORT
/* 3.17: Ensure that the pty is fully trasparent by default.
This allows to use most non-terminal-aware applications (such as od)
on the pty directly.
@ -657,7 +644,6 @@ const char* SerialInit( void )
ChfSignal( SERIAL_CHF_MODULE_ID );
}
}
# endif
/* Publish pty name */
if ( config.verbose ) {
@ -874,7 +860,7 @@ Nibble Serial_TCS_Read( void )
.notes :
2.5, 13-Sep-2000, creation
3.2, 22-Sep-2000, update
- conditionally (#ifdef HP49_SUPPORT) removed warning message
- removed warning message
when reading from an empty RRB.
.- */
int8 Serial_RBR_Read( void )
@ -889,14 +875,6 @@ int8 Serial_RBR_Read( void )
} else {
/* rrb is empty */
#ifndef HP49_SUPPORT
/* 3.2: The HP49 firmware (1.19-4) can read from an empty RRB;
this is not harmful, and this warning can be removed.
*/
ChfGenerate( SERIAL_CHF_MODULE_ID, __FILE__, __LINE__, SERIAL_W_EMPTY_RRB, CHF_WARNING, rcs );
ChfSignal( SERIAL_CHF_MODULE_ID );
#endif
rx = ( int8 )0xFF;
}