System Information για ZX Spectrum!!!
- Darth_Cotsos
- Συντάκτης θέματος
- Platinum Member
Λιγότερα
Περισσότερα
- Δημοσιεύσεις: 664
- Ληφθείσες Ευχαριστίες 676
29/07/2012 15:59 #1180
από Darth_Cotsos
Don't underestimate the power of the 8bit side!
System Information για ZX Spectrum!!! δημιουργήθηκε από Darth_Cotsos
Και όπως είπα σε προηγούμενο ποστ, ώρα να πάμε ένα σκαλοπάτι ποιο πάνω. Για τον commodore όταν έκανα τέστ τον CC65 (C cross compiler) έφτιαξα ένα πρόγραμμα υπολογισμού του Πάσχα. Όταν ανακάλυψα τον Z88dk για τον ZX Spectrum (και γενικά για υπολογιστές με Z80) έφτιαξα ένα απλό system information για να δω πως παίζουν οι επιπλέον βιβλιοθήκες που περιέχει ο compiler για τον ZX Spectrum!!!
Για τον Z88DK θα πούμε εκτενέστερα σε άλλο άρθρο...
Έτσι το πρόγραμμα ανιχνεύει το hardware του αγαπημένου σας spectrum και σας αναφέρει ποιο μηχάνημα έχετε, με τι μνήμη, σε ποιο mode, αν υπάρχει drive ή εκτυπωτής κ.α.
Δοκιμάστε το ανάμεσα στα μοντέλα 48Κ, 128Κ, +2 και +3 για να δείτε το διαφορετικό report που δίνει στο καθένα από αυτά!!!!
Και φυσικά για τους... ανήσυχους ο κώδικας!!!
Για τον Z88DK θα πούμε εκτενέστερα σε άλλο άρθρο...
Έτσι το πρόγραμμα ανιχνεύει το hardware του αγαπημένου σας spectrum και σας αναφέρει ποιο μηχάνημα έχετε, με τι μνήμη, σε ποιο mode, αν υπάρχει drive ή εκτυπωτής κ.α.
Δοκιμάστε το ανάμεσα στα μοντέλα 48Κ, 128Κ, +2 και +3 για να δείτε το διαφορετικό report που δίνει στο καθένα από αυτά!!!!
Και φυσικά για τους... ανήσυχους ο κώδικας!!!
//Compile with : zcc +zx -lndos -lm -create-app si.c
#include <stdio.h>
#include <spectrum.h>
#include <zxinterface1.h>
main()
{
int x,model,mode,printer,sound,fd,ifone,kempston,multiface;
printf ("%c%c%c",27,1,64); // 32 - 64 Rows
printf ("%c",12); // cls
printf ("www.retrocomputers.gr A retro gamers and collectros site \n");
printf ("-------------------------PRESENTS------------------------ \n");
printf ("System Information for ZX Spectrum Models by Darth_Cotsos \n");
printf ("\n");
model = zx_model();
mode = zx_128mode();
sound = zx_soundchip();
printer = zx_printer();
fd = zx_plus3fdc();
ifone = zx_interface1();
switch (model)
{
case 0:
printf ("Your ZX Spectrum model is unknown - Sorry!!! \n");
break;
case 1:
printf ("Your ZX Spectrum model is a 48K or Spectrum+ \n");
break;
case 2:
printf ("Your ZX Spectrum model is a 128K or a +2 \n");
break;
case 3:
printf ("Your ZX Spectrum model is a +2A or a Pentagon \n");
break;
case 4:
printf ("Your ZX Spectrum model is a +3 Spectrum \n");
break;
case 5:
printf ("Your ZX Spectrum model is a +2A/ +3 with bus fixed for games!!! \n");
break;
case 6:
printf ("Your ZX Spectrum model is a TS2068 \n");
break;
}
switch (mode)
{
case 0:
printf ("Your ZX Spectrum is in 48K mode. \n");
break;
case 1:
printf ("Your ZX Spectrum model is in 128K mode \n");
break;
}
switch (sound)
{
case 0:
printf ("Your ZX Spectrum model haven't a Yamaha Sound Chip - Sorry!!! \n");
break;
case 1:
printf ("Your ZX Spectrum model have a Yamaha Sound Chip!!! \n");
break;
}
switch (printer)
{
case 0:
printf ("You have not a installed printer \n");
break;
case 1:
printf ("You have a printer!!! \n");
break;
}
switch (fd)
{
case 0:
printf ("No Floppy Drive Present \n");
break;
case 1:
printf ("Floppy Drive Present!!! \n");
break;
}
switch (ifone)
{
case 0:
printf ("You have not an interface 1 installed \n");
break;
case 1:
printf ("You have interface 1 installed!!! \n");
break;
}
// printf ("----------------------------------------- \n");
printf (" \n ");
//printf ("Model %d \n",model);
// printf ("Mode %d \n",mode);
// printf ("Sound chip %d \n",sound);
// printf ("Printer %d \n",printer);
// printf ("floppy %d \n",fd);
// printf ("Interface 1 %d \n",ifone);
printf ("(c) Copyright 2008 Ola ta tavlia rezerve!!!!!");
scanf("%d",&x);
return 0;
}
Don't underestimate the power of the 8bit side!
Οι ακόλουθοι χρήστες είπαν "Σε Ευχαριστώ": chriskgnr, DAT-Alex
Παρακαλούμε Σύνδεση ή Δημιουργία λογαριασμού για να συμμετάσχετε στη συζήτηση.
- chriskgnr
- Retro Elite
- Well, i got one chance left in a nine live cat.
Λιγότερα
Περισσότερα
- Δημοσιεύσεις: 2358
- Ληφθείσες Ευχαριστίες 1472
29/07/2012 16:53 #1183
από chriskgnr
21st century breakdown...
Απαντήθηκε από chriskgnr στο θέμα Απ: System Information για ZX Spectrum!!!
Δε πιστευα ποτε οτι θά'βλεπα "System Information" προγραμμα για ZX Spectrum! Εξαιρετικό!!
21st century breakdown...
Παρακαλούμε Σύνδεση ή Δημιουργία λογαριασμού για να συμμετάσχετε στη συζήτηση.
- Fotis_KFOR
- Site Owner / Admin
- PC / Sinclair ZX Spectrum+3
29/07/2012 16:54 #1184
από Fotis_KFOR
My Collection / Projects / Various :
Computers , Consoles-Pongs , Various , Not-working , Handhelds-Tabletops , Intel p4004 (First CPU) , Old Hardware Parts , Magazines ,
Retro Computer Project , M.A.M.E. Cabinets , My Retro Computers & Consoles Room
UP THE IRONS!!! - My Iron Maiden Collection
My Wish List : www.retrocomputers.gr/collection/my-wish-list ;)
KEEP RETRO
Απαντήθηκε από Fotis_KFOR στο θέμα Απ: System Information για ZX Spectrum!!!
Ούτε εγώ το πίστευα ποτέ!!! Πόσο μάλλον να γράφει και www.retrocomputers.gr πάνω - πάνω :woohoo:
My Collection / Projects / Various :
Computers , Consoles-Pongs , Various , Not-working , Handhelds-Tabletops , Intel p4004 (First CPU) , Old Hardware Parts , Magazines ,
Retro Computer Project , M.A.M.E. Cabinets , My Retro Computers & Consoles Room
UP THE IRONS!!! - My Iron Maiden Collection
My Wish List : www.retrocomputers.gr/collection/my-wish-list ;)
KEEP RETRO
Παρακαλούμε Σύνδεση ή Δημιουργία λογαριασμού για να συμμετάσχετε στη συζήτηση.
Χρόνος δημιουργίας σελίδας: 0.239 δευτερόλεπτα