Testing using the attached test.c file shows that both the low level driver functions and the high level stdio.h functions work as expected.The simple test.c uses and additional 1800 bytes to have the full stdio function set available.
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/9ae4c54b-3fdd-45e6-bbb1-409ce987a7c5%40googlegroups.com.
With stdin and stdout in place I compiled a few test programs to try. If you've got some spare roms lying around let us know if they work:
https://drive.google.com/file/d/0B6XhJJ33xpOWUVd5d0FQcElSMms/view?usp=sharing
umchess.c : "zcc +rc2014 -vn -subtype=rom_zx7 -SO3 --max-allocs-per-node200000 umchess.c -o umchess -lm --fsigned-char -create-app"
One of the world's smallest chess programs. Entering a blank line gets the computer to make a move. Human moves are entered in the form "e2 e4" IIRC.
But, unfortunately they're all too large for the 8kB ROM of the rc2014... Would be good to have a 32k/32k memory split version... perhaps?
But, unfortunately they're all too large for the 8kB ROM of the rc2014... Would be good to have a 32k/32k rc2014 memory split version... perhaps?
Bit of a brainfart there. I'm not sure how I had it in my mind it was 32k/32k.
The small standard rom is probably a good reason to create a ram model compile too. It would be possible to have a monitor rom in the bottom 8k and then have a ram model compile make use of the stored routines in the rom (the interrupt driver is there, maybe printf and scanf are there, etc) or a ram model compile could use the basic rom and find a way to use the existing basic i.o for text printing and scanning.
Firstly, thanks for converting these programs to run on the RC2014! Awesome work!
So, I've tested out umchess, Eliza and Super Star Trek on real RC2014 hardware and pretty much good news :-)
The actual set up was with 64k RAM, SD Memory Dump Module and Pi Zero Terminal (plus Z80, clock, serial IO obviously)
All 3 worked on first try, although initially I thought it wasn't reading serial input... then noticed that just the return key did things. Eventually I worked out that serial input is working fine, but it just doesn't echo anything on the screen.
Although I've not tried it yet, I'm sure they'd would work perfectly via FTDI and serial software with local echo turned on.
Cheers
Spencer
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/7393e145-d4a2-44e4-a753-e2b995841c48%40googlegroups.com.
Well it has taken quite a bit of time and posts on another thread, but I think that the rc2014 is now ready for "prime time" in the z88dk.
The z88dk is a fully featured development environment for z80 processor based machines.
Over the past few days aralbrec and pauloscustodio have been working on getting the build process for the rc2014 improved to the point that it is now possible to replace the TASM (or other) assembler with `z80asm` and `appmake` (through z88dk) and get an identical outcome, and soon to allow a C program to built to use the existing serial I/O RST jumps provided by the Nascom BASIC initialisation code.
Next step is to provide an additional startup option to integrate with the serial RST jumps provided by Nascom BASIC. This will allow arbitrary C code to be compiled, then just loaded into free RAM by a HexLoadr, and be called by the Nascom BASIC USR(x) function, and also use the existing serial routines. This will allow C programs to be written and used from RAM by the simplest RC2014 device (without needing optional hardware). More on this soon.For further reading, the Github conversation in z88dk #247
Over the past few days aralbrec and pauloscustodio have been working on getting the build process for the rc2014 improved to the point that it is now possible to replace the TASM (or other) assembler with `z80asm` and `appmake` (through z88dk) and get an identical outcome, and soon to allow a C program to built to use the existing serial I/O RST jumps provided by the Nascom BASIC initialisation code.Next step is to provide an additional startup option to integrate with the serial RST jumps provided by Nascom BASIC. This will allow arbitrary C code to be compiled, then just loaded into free RAM by a HexLoadr, and be called by the Nascom BASIC USR(x) function, and also use the existing serial routines. This will allow C programs to be written and used from RAM by the simplest RC2014 device (without needing optional hardware). More on this soon.For further reading, the Github conversation in z88dk #247
Over the past few days aralbrec has finished off the final piece of the z88dk RC2014 jigsaw to enable users of standard FULL MONTY or MINI RC2014 devices access to programming in C with the z88dk.Tonight (my timezone) he's made the -subtype=basic option available from the z88dk command line. The basic subtype uses the standard ROM ACIA routines and the standard ACIA interrupt so that it supports standard off-the-shelf RC2014 devices.
The memory model for this implementation has the C heap will follow immediately after the C program loaded at 0x9000, and the C stack will be located at 0xFFFF and grow down.To ensure there is no conflict with basic, the initial Memory top? question should be answered with 36863 (0x8FFF) or lower.More on this work at the Github conversation in z88dk #256.
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/a29fc9f9-ed43-4d69-8af8-df1ec76cc38a%40googlegroups.com.
A question for Spencer, or anyone who's got an opinion.Are any "8kB ROM 56kB RAM - ROM versions distributed with the 64kB RAM modules, or otherwise?
Why does this need to be compiled in? You could fairly accurately detect the memory size at runtime and adjust stack, work space, etc at runtime.
A question for Spencer, or anyone who's got an opinion.Are any "8kB ROM 56kB RAM - ROM versions distributed with the 64kB RAM modules, or otherwise?At a guess, I'd say I've shipped around 50 ROMs with 56k BASIC on. Possibly more. (Would be nice and poetic if I'd shipped exactly 56!)
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+unsubscribe@googlegroups.com.
To post to this group, send email to rc201...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/a677ca07-cd1f-447d-b84d-97ec3efd6a2d%40googlegroups.com.
There's been 183 of the 64k RAM Module sold to date, which us roughly 25% of the overall RC2014 numbers. However, the vast majority of those sold were along with a compact flash and CP/M ROM.
My expectation is that 64kB will become the norm at some point.
Over the past few days aralbrec and pauloscustodio have been working on getting the build process for the rc2014 improved to the point that it is now possible to replace the TASM (or other) assembler with `z80asm` and `appmake` (through z88dk) and get an identical outcome, and soon to allow a C program to built to use the existing serial I/O RST jumps provided by the Nascom BASIC initialisation code.
For further reading, the Github conversation in z88dk #247
Over the past few days aralbrec has finished off the final piece of the z88dk RC2014 jigsaw to enable users of standard FULL MONTY or MINI RC2014 devices access to programming in C with the z88dk.
Tonight (my timezone) he's made the -subtype=basic option available from the z88dk command line. The basic subtype uses the standard ROM ACIA routines and the standard ACIA interrupt so that it supports standard off-the-shelf RC2014 devices.
The memory model for this implementation has the C heap will follow immediately after the C program loaded at 0x9000, and the C stack will be located at 0xFFFF and grow down.
To ensure there is no conflict with basic, the initial Memory top? question should be answered with 36863 (0x8FFF) or lower.
More on this work at the Github conversation in z88dk #256.
Over the past few days aralbrec has finished off the final piece of the z88dk RC2014 jigsaw to enable users of standard FULL MONTY or MINI RC2014 devices access to programming in C with the z88dk.
Tonight (my timezone) he's made the -subtype=basic option available from the z88dk command line. The basic subtype uses the standard ROM ACIA routines and the standard ACIA interrupt so that it supports standard off-the-shelf RC2014 devices.
The memory model for this implementation has the C heap will follow immediately after the C program loaded at 0x9000, and the C stack will be located at 0xFFFF and grow down.
To ensure there is no conflict with Basic, the initial Memory top? question should be answered with 35071 (0x88FF) or lower.
More on this work at the Github conversation in z88dk #256.
Ok, I promise this nearly the end of this work. The last link between the z88dk development environment, and the standard RC2014 Full Monty or Mini Kit. And that is adapting the hexload program, written by Filippo Bergamasco, to be assembled by z88dk, and then to load itself into the RC2014 using slowprint.py, and then automatically start a C program which it has loaded into the default location for the z88dk +rc2014 -subtype=basic.Cold Start the RC2014, and set the Memory top? to be 35071 (0x88FF).The hexload.bas file is then "typed" into the RC2014 either by hand (ahhgh noooo), or by using
That will automatically start the hexload program running from origin at 0x8900, and it will wait for a z88dk HEX encoded program (asm or C) to be cat'ed to the RC2014.
cat > /dev/ttyUSB0 < eliza.ihxYou could also use slowprint.py for this job, but who has time for that?The default origin for the rc2014 basic subtype for z88dk is 0x9000, but this can be flexibly changed as desired.The hexload program origin is 0x8900, and this leaves some free space before the z88dk default origin.
# in a directory with the source files
:~$ zcc +rc2014 -v -subtype=basic_dcio -SO3 -clib=sdcc_iy --max-allocs-per-node200000 password.c -o password -create-app
:~$ zcc +rc2014 -v -subtype=basic_dcio -SO3 -clib=sdcc_iy --max-allocs-per-node200000 eliza.c -o eliza -create-app
# with your RC2014 connected
:~$ python slowprint.py > /dev/ttyUSB0 < hexload.bas
:~$ cat > /dev/ttyUSB0 < password.ihx # or
:~$ cat > /dev/ttyUSB0 < eliza.ihx# in a directory with the source files
:~$ zcc +rc2014 -v -subtype=basic_dcio -SO3 -clib=sdcc_iy --max-allocs-per-node200000 password.c -o password -create-app
:~$ zcc +rc2014 -v -subtype=basic_dcio -SO3 -clib=sdcc_iy --max-allocs-per-node200000 eliza.c -o eliza -create-app
# with your RC2014 connected
:~$ python slowprint.py > /dev/ttyUSB0 < hexload.bas
:~$ cat > /dev/ttyUSB0 < password.ihx # or
:~$ cat > /dev/ttyUSB0 < eliza.ihxI've attached compiled versions of two programs (eliza, password), which can be checked by using the hexload.bas.Note again the starting point for this is the standard "Full Monty" or "Mini" RC2014, with 32kB of RAM, and the standard ROM.
# in a directory with the source files
# with your RC2014 connected
:~$ python slowprint.py > /dev/ttyUSB0 < hexload.bas
:~$ cat > /dev/ttyUSB0 < password.ihx # or
:~$ cat > /dev/ttyUSB0 < eliza.ihx
I've attached compiled versions of two programs (eliza, password), which can be checked by using the hexload.bas.Note again the starting point for this is the standard "Full Monty" or "Mini" RC2014, with 32kB of RAM, and the standard ROM.
I'd like to note that the serial interface drivers for the RC2014 within z88dk have been completely revamped. They are now "terminal" drivers by default, rather than "character" drivers.
I got the latest nightly for z88dk compiled and I was able to compile a basic hello world using the rc2014 cpm subtype and run it successfully under the Altair 8800 CP/M disk image using z80ctrl.
I wasn't able to get any graphical programs to compile using the rc2014 platform though. I get a message that graphics.h can't be found.
But since I have my TMS9918A card configured to use the ColecoVision ports, I tried compiling them for Coleco Adam, and it works. I got the chess board, marilyn monroe, and spirograph working to run under CP/M. Here's an example invocation that I used.zcc +cpm -subtype=adam -lm /opt/z88dk/examples/graphics/spirograph.c -create-app -ospiro.com
After that, I just xmodemed the com file over to my Altair 8800 CP/M image running on z80ctrl and ran it. I assume it would work with my TMS9918A board under RomWBW too but I'm not going to switch out all the boards to test it right now. The ColecoVision ports aren't compatible with the 64K pageable rom module, so to get it to work there, I'd probably have to compile for MSX instead.
Yes, the RC2014 target only has the 82C55, ACIA and SIO devices, and IDE and Terminal drivers presently integrated into the libraries.The intention is to add support for additional hardware, but that depends on someone having both hardware (to test) and time to do it.
Adding video support to the RC2014 target depends on someone having interest to do the driver, and of course a card to base the work on.If you want to do a driver, then z88dk has a third-party library capability z88dk-lib, which allows you to test something without digging through all the development kit.
Or, if later you want to maintain the library yourself (without waiting on others to commit your PRs), then it is a good solution.
The CP/M target subtypes may (potentially) also rely on ROM entrance points relevant to their own hardware. CP/M should be pretty safe though, using BDOS calls only.
If your TMS9918A card replicates an established machine, then you'll be (as you discovered) much better served by target CP/M and selecting a subtype matching the machine you're configured for, provided the machine doesn't require the use of specific ROM entrance points for other things.
If you swing the library usage over to the new library using the -clib=sdcc_iy or -clib=new option, then you'd lose access to these machine types, AFAIK, and only be able to access BDOS calls. Also, AFAIK, the CP/M file system I/O is not finished in the new library, but it is when using the classic library.
I'd probably have to compile for MSX instead.Looking forward to hearing if it works, or not.
Yes, the RC2014 target only has the 82C55, ACIA and SIO devices, and IDE and Terminal drivers presently integrated into the libraries.The intention is to add support for additional hardware, but that depends on someone having both hardware (to test) and time to do it.Ah, I misunderstood your last email to mean that audio and video support was already done.
Adding video support to the RC2014 target depends on someone having interest to do the driver, and of course a card to base the work on.If you want to do a driver, then z88dk has a third-party library capability z88dk-lib, which allows you to test something without digging through all the development kit.I don't really think there's any driver work to be done. The existing TMS driver for the Adam just needs to be enabled for the RC2014. I poked around a bit in the z88dk source code but I don't fully understand how the target configuration works well enough to do that without some guidance. Hopefully it's possible to configure the driver to use either port 98/99 from the MSX or BE/BF from the ColecoVision so that it would be compatible with either.
My card is a stock TMS9918A chip with configuration jumpers to select different ports and route the interrupts to either INT (for MSX) or NMI (for Coleco). I've successfully run both MSX-BASIC and ColecoVision games on it without any modification.
I'd probably have to compile for MSX instead.Looking forward to hearing if it works, or not.It didn't.
The ColecoVision and Adam are much simpler machines than the MSX, so it would probably be easier to just modify those drivers to use a different port instead of trying to get the MSX target to work.
I added a diode to the latest REV of my TMS9918A card to make the INT line behave like an open collector. https://github.com/jblang/TMS9918A/blob/master/TMS9918.pdfThen you can use interrupt mode 1 and when you get an interrupt, poll the status register on the TMS9918 or other potential interrupt sources to see what triggered it. This is how the MSX did it.
There is a problem with using NMI in CP/M since the NMI vector is in the middle of the FCB.
I am not sure if the z88dk graphics libraries even use interrupts. Certainly none of the examples seemed to.
Yes. I forgot, about a week of hand wringing trying to think around this problem of NMI and CP/M.In the end, I decided for my purposes it was too much of a problem, and just gave up and tied up the NMI.
It has been a while since I updated this thread, but over the past year there have been constant updates and improvements.
On Friday, 2 March 2018 00:40:47 UTC+11, Phillip Stevens wrote:I'd like to note that the serial interface drivers for the RC2014 within z88dk have been completely revamped. They are now "terminal" drivers by default, rather than "character" drivers.Also the subtype options for the +rc2014 target have been expanded. There are now four options:
- -subtype=acia which can be used when you want to create a complete standalone ROM, with the ACIA UART hardware.
- -subtype=sio which can be used when you want to create a complete standalone ROM, with the SIO/2 UART hardware.
- -subtype=basic which can be used where a HexLoad program can be used together with a version of MSBASIC.
- -subtype=cpm which can be used where the RC2014 is running any version of CP/M.
All of the subtypes (except CP/M) default to the Classic or Mini RC2014 configuration of 8kB of ROM, and 32kB of RAM from 0x8000.But they can also can easily be configured to work with 56kB of RAM if desired, using #pragma to drive the configuration.So why is there an additional zcc +rc2014 -subtype=cpm option, when the zcc +cpm platform already exists and works perfectly with the RC2014?Having CP/M as a subtype will allow RC2014 specific libraries (think AY/YM sound library, and graphics library) to be easily linked into programs to be used within a CP/M environment. This wouldn't be possible with the default CP/M environment, which is correctly limited to using BDOS calls.In a related topic, the z88dk customisation of sdcc will be updated to r10892 (v3.8.5) as a precursor to moving to the to-be-announced stable v3.9.0 release later this year.Any issues can be reported at z88dk, or perhaps better directly at sdcc.
It has been a while since I updated this thread, but over the past year there have been constant updates and improvements.Not that z88dk is now at Release 1.99C, perhaps it is time to add some more updates about RC2014 support.Note that the CP/M subtype was committed after the 1.99C release, and so daily builds (the normal way) after 1.99C are required.
On Friday, 2 March 2018 00:40:47 UTC+11, Phillip Stevens wrote:I'd like to note that the serial interface drivers for the RC2014 within z88dk have been completely revamped. They are now "terminal" drivers by default, rather than "character" drivers.
Also the subtype options for the +rc2014 target have been expanded. There are now five options:
- -subtype=acia which can be used when you want to create a complete standalone ROM, with the ACIA UART hardware.
- -subtype=sio which can be used when you want to create a complete standalone ROM, with the SIO/2 UART hardware.
- -subtype=basic which can be used where a HexLoad program can be used together with a version of MSBASIC.
- -subtype=cpm which can be used where the RC2014 is running any version of CP/M.
All of the subtypes (except HBIOS and CP/M) default to the Classic or Mini RC2014 configuration of 8kB of ROM, and 32kB of RAM from 0x8000.
But they can also can easily be configured to work with 56kB of RAM if desired, using #pragma to drive the configuration.So why is there an additional zcc +rc2014 -subtype=cpm option, when the zcc +cpm platform already exists and works perfectly with the RC2014?Having CP/M as a subtype will allow RC2014 specific libraries (think AY/YM sound library, and graphics library) to be easily linked into programs to be used within a CP/M environment.This wouldn't be possible with the default CP/M environment, which is correctly limited to using BDOS calls.
// HBIOS FUNCTIONS
// return DEHL, function BC
uint32_t hbios(uint16_t func);
// return A, function BC
uint8_t hbios_a(uint16_t func);
// return A, function BC, arg DE
uint8_t hbios_a_de(uint16_t func,uint16_t arg);
// return A, function BC, arg DEHL
uint8_t hbios_a_dehl(uint16_t func,uint32_t arg);
// return A, function BC, arg DE, void * HL
uint8_t hbios_a_de_hl(uint16_t func,uint16_t arg,void * buffer);
// return E, function BC
uint8_t hbios_e(uint16_t func);
// return E, function BC, arg DE
uint8_t hbios_e_de(uint16_t func,uint16_t arg);
// return E, function BC, arg DEHL
uint8_t hbios_e_dehl(uint16_t func,uint32_t arg);
// return E, function BC, arg DE, void * HL
uint8_t hbios_e_de_hl(uint16_t func,uint16_t arg,void * buffer);// zcc +rc2014 -subtype=hbios -SO3 -clib=sdcc_iy -v -m --list --math32 --c-code-in-asm --max-allocs-per-node20000 test.c -o test -create-app
#include <stdlib.h>
#include <stdio.h>
#include <string.h>
#include <arch.h>
#ifdef __RC2014
#include <arch/rc2014.h>
#include <arch/hbios.h>
#endif
#ifdef __SCZ180
#include <arch/scz180.h>
#include <arch/hbios.h>
#endif
void serialPrint( const uint8_t * str);
void main(void)
{
serialPrint("\nHello World\nHello World\nHello World\nHello World\nHello World\n");
puts("\nHello World R\nHello World C\nHello World 2\nHello World 0\nHello World 1\nHello World 4\n");
fprintf(stdout,"\nHello World R\nHello World C\nHello World 2\nHello World 0\nHello World 1\nHello World 4\n");
fprintf(ttyout,"\nHello World R\nHello World C\nHello World 2\nHello World 0\nHello World 1\nHello World 4\n");
}
void serialPrint( const uint8_t * str)
{
int16_t i = 0;
size_t stringlength;
stringlength = strlen((char *)str);
while(i < stringlength)
hbios_a_de(BF_CIOOUT<<8|00, str[i++]);
}
In a related topic, the z88dk customisation of sdcc will be updated to r10892 (v3.8.5) as a precursor to moving to the to-be-announced stable v3.9.0 release later this year.
It has been a while since I updated this thread, but over the past year there have been constant updates and improvements.Not that z88dk is now at Release 1.99C, perhaps it is time to add some more updates about RC2014 support.Note that the CP/M subtype was committed after the 1.99C release, and so daily builds (the normal way) after 1.99C are required.
On Friday, 2 March 2018 00:40:47 UTC+11, Phillip Stevens wrote:I'd like to note that the serial interface drivers for the RC2014 within z88dk have been completely revamped. They are now "terminal" drivers by default, rather than "character" drivers.Also the subtype options for the +rc2014 target have been expanded. There are now four options:
- -subtype=acia which can be used when you want to create a complete standalone ROM, with the ACIA UART hardware.
- -subtype=sio which can be used when you want to create a complete standalone ROM, with the SIO/2 UART hardware.
- -subtype=basic which can be used where a HexLoad program can be used together with a version of MSBASIC.
- -subtype=cpm which can be used where the RC2014 is running any version of CP/M.
All of the subtypes (except CP/M) default to the Classic or Mini RC2014 configuration of 8kB of ROM, and 32kB of RAM from 0x8000.But they can also can easily be configured to work with 56kB of RAM if desired, using #pragma to drive the configuration.So why is there an additional zcc +rc2014 -subtype=cpm option, when the zcc +cpm platform already exists and works perfectly with the RC2014?Having CP/M as a subtype will allow RC2014 specific libraries (think AY/YM sound library, and graphics library) to be easily linked into programs to be used within a CP/M environment.This wouldn't be possible with the default CP/M environment, which is correctly limited to using BDOS calls.
// return DEHL, function BC
uint32_t hbios(uint16_t func);
// return A, function BC
uint8_t hbios_a(uint16_t func);
// return A, function BC, arg DE
uint8_t hbios_a_de(uint16_t func, uint16_t arg);
// return A, function BC, arg DEHL
uint8_t hbios_a_dehl(uint16_t func, uint32_t arg);
// return A, function BC, arg DE, void * HL
uint8_t hbios_a_de_hl(uint16_t func, uint16_t arg, void * buffer);
// return E, function BC
extern uint8_t hbios_e(uint16_t func);
// return E, function BC, arg DE
extern uint8_t hbios_e_de(uint16_t func, uint16_t arg);
// return E, function BC, arg DEHL
uint8_t hbios_e_dehl(uint16_t func, uint32_t arg);
// return E, function BC, arg DE, void * HL
uint8_t hbios_e_de_hl(uint16_t func, uint16_t arg, void * buffer);#pragma output CRT_ORG_BSS = 0x9000 /* move bss origin to address 0x9000 (check map to confirm there is no overlap between data and bss sections) */
static FIL FileIn, FileOut; /* File object needed for each open file */
#define BUFFER_SIZE 4096 /* size of working buffer (on heap) */
static BYTE * buffer; /* working buffer */
/* must be in bss (which is above 0x8000) for romwbw hbios buffer */
static FATFS * FatFs; /* FatFs work area needed for each volume */
/* Pointer to the filesystem object (on heap) */
int main (void)
{
UINT bw;
UINT br;
DWORD bwt = 0;
FRESULT res;
FatFs = (FATFS *)malloc(sizeof(FATFS)); /* Get work area for the volume */
buffer = (BYTE *)malloc(sizeof(BYTE)*BUFFER_SIZE); /* Get working buffer space */
if ((res = f_mount(FatFs, "2:", 1)) == FR_OK) { /* Give a work area to the default drive */
printf("\r\n\nFatFs->fs_type %u\nFatFs->fsize %lu\n", FatFs->fs_type, FatFs->fsize);
printf("\r\nOpening 2:random1.txt");
if ((res = f_open(&FileIn, "2:random1.txt", FA_READ)) == FR_OK) { printf(" - Opened");
if ((res = f_lseek(&FileIn, 0)) == FR_OK) { printf("\r\nCreating 2:random2.txt");
if ((res = f_open(&FileOut, "2:random2.txt", FA_CREATE_ALWAYS | FA_WRITE)) == FR_OK) { printf(" - Created\r\n\nCopying...");
for (;;) { res = f_read(&FileIn, buffer, sizeof(BYTE)*BUFFER_SIZE, &br);
if (res != FR_OK || br == 0) break; // error or eof
res = f_write(&FileOut, buffer, br, &bw);
bwt += bw;
if (res != FR_OK || bw != br) break; // error or disk full }
f_close(&FileOut);
if ((res = f_unlink("2:random2.txt")) != FR_OK) { printf("\r\nCouldn't delete 2:random2.txt - f_unlink error #%u\r\n", res);
}
} else {
printf("\r\nCouldn't open 2:random2.txt - f_open error #%u\r\n", res);
}
} else {
printf("\r\nCouldn't seek 2:random1.txt - f_lseek error #%u\r\n", res);
}
f_close(&FileIn);
} else {
printf("\r\nCouldn't open 2:random1.txt - f_open error #%u\r\n", res);
}
printf("\r\nCopied %lu bytes", bwt );
f_mount(0, "2:", 0); /* Free work area */
} else { printf("\r\nCouldn't mount drive - f_mount error #%u\r\n", res);
}
// Perform any shutdown/cleanup.
free(buffer);
free(FatFs);
return 0;
}zcc +hbios -clib=sdcc_iy -SO3 -v -m --list --max-allocs-per-node100000 -llib/scz180/time -llib/hbios/diskio_hbios -llib/hbios/ff fileCopyTest.c -o fileCopyTest -create-appWell it has taken quite a bit of time and posts on another thread, but I think that the rc2014 is now ready for "prime time" in the z88dk.The z88dk is a fully featured development environment for z80 processor based machines.
--
You received this message because you are subscribed to the Google Groups "RC2014-Z80" group.
To unsubscribe from this group and stop receiving emails from it, send an email to rc2014-z80+...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/rc2014-z80/3d04162c-5a94-4436-923e-2a529e4935e4%40googlegroups.com.
I wrote a page in the RC2014 Wiki, which I hope will make more sense, which can be maintained and updated as needed,and which has links across to a number of other resources already existing with much more detail where needed.
Yes it's on the classic library side only. So not for a RC2014-8080, at this stage.
It comes in two parts. The classic library has support for an Intel code path now. And the assembler has emulations of all non Z80 equivalent instructions.
This means (I think) that SDCC doesn't even know that it is not compiling for Z80, and the resulting assembly is fixed up by the z88dk assembler, and correct library functions.
What I'm not totally sure about is whether support is via both ZSDCC and SCCZ80 compilers, or just SCCZ80. But the repository tells no lies.
Phillip
I didn't realise the 8080 fork had been added. That's cool.
Just need 8085 support now 8)
I wrote a page in the RC2014 Wiki, which I hope will make more sense, which can be maintained and updated as needed, and which has links across to a number of other resources already existing with much more detail where needed.